From 673130bbf8017cf0e082dc65a24609290da4daa4 Mon Sep 17 00:00:00 2001 From: Evan Charlton Date: Wed, 7 Nov 2012 16:18:17 -0800 Subject: [PATCH] Use plurals for the developer steps countdown When counting down how many steps are left before the user becomes a developer, use plurals so that "steps" becomes "step" correctly. Change-Id: I5dbe2c229c9e6ed0c45aaae8c303b23efc76f75d --- res/values/strings.xml | 5 ++++- src/com/android/settings/DeviceInfoSettings.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index d6abe94d61f..1a09ee27ebb 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -27,7 +27,10 @@ Unknown - You are now %1$d steps away from being a developer. + + You are now %1$d step away from being a developer. + You are now %1$d steps away from being a developer. + You are now a developer! diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index a4abfea36e3..d2ff6db5cf4 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -191,8 +191,8 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment { if (mDevHitToast != null) { mDevHitToast.cancel(); } - mDevHitToast = Toast.makeText(getActivity(), getResources().getString( - R.string.show_dev_countdown, mDevHitCountdown), + mDevHitToast = Toast.makeText(getActivity(), getResources().getQuantityString( + R.plurals.show_dev_countdown, mDevHitCountdown, mDevHitCountdown), Toast.LENGTH_SHORT); mDevHitToast.show(); }