diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java index 652232ac8..91e1b9eb9 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java @@ -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() { diff --git a/MessengerProj/src/main/java/com/b44t/ui/NotificationsSettingsActivity.java b/MessengerProj/src/main/java/com/b44t/ui/NotificationsSettingsActivity.java index f0331e5b2..aa0130cef 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/NotificationsSettingsActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/NotificationsSettingsActivity.java @@ -437,9 +437,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, 5, 5), ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, 10, 10), ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, 30, 30), - LocaleController.formatPluralString("Hours", 1), - LocaleController.formatPluralString("Hours", 2), - LocaleController.formatPluralString("Hours", 4) + ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, 1, 1), + ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, 2, 2), + ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, 4, 4) }, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { @@ -681,7 +681,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif } else if (minutes < 60) { value = ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, minutes, minutes); } else { - value = LocaleController.formatPluralString("Hours", minutes / 60); + value = ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, minutes / 60, minutes / 60); } textCell.setTextAndValue(LocaleController.getString("RepeatNotifications", R.string.RepeatNotifications), value, true); } diff --git a/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java index 4bdeb4df8..8287ddda9 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java @@ -375,9 +375,9 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter } else if (value == 2) { return ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, 5, 5); } else if (value == 3) { - return LocaleController.formatString("AutoLockInTime", R.string.AutoLockInTime, LocaleController.formatPluralString("Hours", 1)); + return ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, 1, 1); } else if (value == 4) { - return LocaleController.formatString("AutoLockInTime", R.string.AutoLockInTime, LocaleController.formatPluralString("Hours", 5)); + return ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, 5, 5); } return ""; } @@ -676,7 +676,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter } else if (UserConfig.autoLockIn < 60 * 60) { val = ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Minutes, UserConfig.autoLockIn / 60, UserConfig.autoLockIn / 60); } else if (UserConfig.autoLockIn < 60 * 60 * 24) { - val = LocaleController.formatString("AutoLockInTime", R.string.AutoLockInTime, LocaleController.formatPluralString("Hours", (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60))); + val = ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Hours, (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60), (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60)); } else { val = LocaleController.formatString("AutoLockInTime", R.string.AutoLockInTime, LocaleController.formatPluralString("Days", (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60 / 24))); } diff --git a/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java index 524dbdf83..3eb57a5b0 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java @@ -586,7 +586,8 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi // @TODO: Maybe this should be reworded a bit. val = mContext.getResources().getQuantityString(R.plurals.Minutes, delta / 60, delta / 60); } else if (delta < 60 * 60 * 24) { - val = LocaleController.formatString("WillUnmuteIn", R.string.WillUnmuteIn, LocaleController.formatPluralString("Hours", (int) Math.ceil(delta / 60.0f / 60))); + // @TODO: Maybe this should be reworded a bit. + val = mContext.getResources().getQuantityString(R.plurals.Hours, (int) Math.ceil(delta / 60.0f / 60), (int) Math.ceil(delta / 60.0f / 60)); } else if (delta < 60 * 60 * 24 * 365) { val = LocaleController.formatString("WillUnmuteIn", R.string.WillUnmuteIn, LocaleController.formatPluralString("Days", (int) Math.ceil(delta / 60.0f / 60 / 24))); } else { diff --git a/MessengerProj/src/main/res/values-de/strings.xml b/MessengerProj/src/main/res/values-de/strings.xml index ce6a2d9a8..f86328fb3 100644 --- a/MessengerProj/src/main/res/values-de/strings.xml +++ b/MessengerProj/src/main/res/values-de/strings.xml @@ -20,6 +20,9 @@ Chat auswählen … Suche Stummschalten + Stumm für 1 Stunde + Stumm für 8 Stunden + Stumm für 2 Tage Stumm für %1$s Stumm aus In %1$s diff --git a/MessengerProj/src/main/res/values/strings.xml b/MessengerProj/src/main/res/values/strings.xml index 857b419aa..74d92f032 100644 --- a/MessengerProj/src/main/res/values/strings.xml +++ b/MessengerProj/src/main/res/values/strings.xml @@ -20,7 +20,9 @@ Select chat … Search Mute notifications - Mute for %1$s + Mute for 1 hour + Mute for 8 hours + Mute for 2 days Unmute In %1$s Draft