Rewrite more plural handling of 'Hours'

This commit is contained in:
Dr. Tobias Quathamer
2017-02-09 09:48:22 +01:00
parent 82382f31f1
commit 5f00826e65
6 changed files with 18 additions and 12 deletions
@@ -1529,9 +1529,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); // was: BottomSheet.Builder
//builder.setTitle(LocaleController.getString("Notifications", R.string.Notifications)); -- a title seems more confusing than helping -- the user has clicked "mute" before and there are several options all starting with "mute...", I think, this is very clear
CharSequence[] items = new CharSequence[]{
LocaleController.formatString("MuteFor", R.string.MuteFor, LocaleController.formatPluralString("Hours", 1)),
LocaleController.formatString("MuteFor", R.string.MuteFor, LocaleController.formatPluralString("Hours", 8)),
LocaleController.formatString("MuteFor", R.string.MuteFor, LocaleController.formatPluralString("Days", 2)),
ApplicationLoader.applicationContext.getString(R.string.MuteFor1Hour),
ApplicationLoader.applicationContext.getString(R.string.MuteFor8Hours),
ApplicationLoader.applicationContext.getString(R.string.MuteFor2Days),
LocaleController.getString("MuteAlways", R.string.MuteAlways)
};
builder.setItems(items, new DialogInterface.OnClickListener() {