mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Rewrite more plural handling of 'Days'
This commit is contained in:
@@ -678,7 +678,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (UserConfig.autoLockIn < 60 * 60 * 24) {
|
||||
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)));
|
||||
val = ApplicationLoader.applicationContext.getResources().getQuantityString(R.plurals.Days, (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60 / 24), (int) Math.ceil(UserConfig.autoLockIn / 60.0f / 60 / 24));
|
||||
}
|
||||
textCell.setTextAndValue(LocaleController.getString("AutoLock", R.string.AutoLock), val, true);
|
||||
textCell.setTextColor(0xff000000);
|
||||
|
||||
@@ -589,7 +589,8 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
|
||||
// @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)));
|
||||
// @TODO: Maybe this should be reworded a bit.
|
||||
val = mContext.getResources().getQuantityString(R.plurals.Days, (int) Math.ceil(delta / 60.0f / 60 / 24), (int) Math.ceil(delta / 60.0f / 60 / 24));
|
||||
} else {
|
||||
val = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user