diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd index b363d013d8d..f330c49703c 100644 --- a/mobile/android/base/locales/en-US/android_strings.dtd +++ b/mobile/android/base/locales/en-US/android_strings.dtd @@ -151,9 +151,11 @@ size. --> - - - + + + + + diff --git a/mobile/android/base/preferences/CustomListPreference.java b/mobile/android/base/preferences/CustomListPreference.java index ba68859a590..502e134c705 100644 --- a/mobile/android/base/preferences/CustomListPreference.java +++ b/mobile/android/base/preferences/CustomListPreference.java @@ -29,13 +29,14 @@ public abstract class CustomListPreference extends Preference implements View.On public static final int INDEX_SET_DEFAULT_BUTTON = 0; // Dialog item labels. - protected String[] mDialogItems; + protected final String[] mDialogItems; // Dialog displayed when this element is tapped. protected AlertDialog mDialog; // Cache label to avoid repeated use of the resource system. public final String LABEL_IS_DEFAULT; + public final String LABEL_SET_AS_DEFAULT; protected boolean mIsDefault; @@ -66,8 +67,9 @@ public abstract class CustomListPreference extends Preference implements View.On Resources res = getContext().getResources(); - // Fetch this resource now, instead of every time we ever want to relabel a button. - LABEL_IS_DEFAULT = res.getString(R.string.pref_search_default); + // Fetch these strings now, instead of every time we ever want to relabel a button. + LABEL_IS_DEFAULT = res.getString(R.string.pref_default); + LABEL_SET_AS_DEFAULT = res.getString(R.string.pref_dialog_set_default); mDialogItems = getDialogStrings(); } diff --git a/mobile/android/base/preferences/SearchEnginePreference.java b/mobile/android/base/preferences/SearchEnginePreference.java index 3bdde15b948..e7398a4aba9 100644 --- a/mobile/android/base/preferences/SearchEnginePreference.java +++ b/mobile/android/base/preferences/SearchEnginePreference.java @@ -72,8 +72,8 @@ public class SearchEnginePreference extends CustomListPreference { @Override protected String[] getDialogStrings() { Resources res = getContext().getResources(); - return new String[] { res.getString(R.string.pref_search_set_default), - res.getString(R.string.pref_search_remove) }; + return new String[] { LABEL_SET_AS_DEFAULT, + res.getString(R.string.pref_dialog_remove) }; } @Override diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in index 08de2ef70e7..c5d50e1fab1 100644 --- a/mobile/android/base/strings.xml.in +++ b/mobile/android/base/strings.xml.in @@ -169,10 +169,11 @@ &pref_vendor_faqs; &pref_vendor_feedback; + &pref_dialog_set_default; + &pref_dialog_default; + &pref_dialog_remove; + - &pref_search_set_default; - &pref_search_default; - &pref_search_remove; &pref_search_last_toast; &datareporting_notification_title;