Merge "Use plurals for the developer steps countdown" into jb-mr1.1-dev

This commit is contained in:
Evan Charlton
2012-11-30 10:15:24 -08:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 3 deletions

View File

@@ -33,7 +33,10 @@
<!-- Device Info screen. Used for a status item's value when the proper value is not known --> <!-- Device Info screen. Used for a status item's value when the proper value is not known -->
<string name="device_info_default">Unknown</string> <string name="device_info_default">Unknown</string>
<!-- [CHAR LIMIT=NONE] Device Info screen. Countdown for user taps to enable development settings --> <!-- [CHAR LIMIT=NONE] Device Info screen. Countdown for user taps to enable development settings -->
<string name="show_dev_countdown">You are now <xliff:g id="step_count">%1$d</xliff:g> steps away from being a developer.</string> <plurals name="show_dev_countdown">
<item quantity="one">You are now <xliff:g id="step_count">%1$d</xliff:g> step away from being a developer.</item>
<item quantity="other">You are now <xliff:g id="step_count">%1$d</xliff:g> steps away from being a developer.</item>
</plurals>
<!-- [CHAR LIMIT=NONE] Device Info screen. Confirmation that developer settings are enabled --> <!-- [CHAR LIMIT=NONE] Device Info screen. Confirmation that developer settings are enabled -->
<string name="show_dev_on">You are now a developer!</string> <string name="show_dev_on">You are now a developer!</string>
<!-- [CHAR LIMIT=NONE] Device Info screen. Okay we get it, stop pressing, you already have it on --> <!-- [CHAR LIMIT=NONE] Device Info screen. Okay we get it, stop pressing, you already have it on -->

View File

@@ -191,8 +191,8 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
if (mDevHitToast != null) { if (mDevHitToast != null) {
mDevHitToast.cancel(); mDevHitToast.cancel();
} }
mDevHitToast = Toast.makeText(getActivity(), getResources().getString( mDevHitToast = Toast.makeText(getActivity(), getResources().getQuantityString(
R.string.show_dev_countdown, mDevHitCountdown), R.plurals.show_dev_countdown, mDevHitCountdown, mDevHitCountdown),
Toast.LENGTH_SHORT); Toast.LENGTH_SHORT);
mDevHitToast.show(); mDevHitToast.show();
} }