Sudan's former President Omar al-Bashir is sentenced to two years in detention, but he plans to appeal.