Cleanup plurals in Settings, change <one> to <1> in string res file.

"One" and "1" are not same, such as "1st place" vs "a
place". Also in many languages, plurals expression is different with English, for more detail please check: go/android-i18n-plurals.
So in string res file, replace "one" with excat value "1" is a more
proper way.

Test: Existing unit tests still pass.
Bug: 199230342
Change-Id: I832abc38afc5d8816fa803865c25e6017cffa2c6
This commit is contained in:
xinghailu
2022-12-06 11:55:26 +08:00
parent ef2652887a
commit b5293a2d1c
13 changed files with 168 additions and 85 deletions

View File

@@ -36,6 +36,7 @@ import android.util.ArraySet;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import com.android.settings.R;
import com.android.settings.testutils.shadow.ShadowUtils;
import com.android.settingslib.widget.FooterPreference;
@@ -144,8 +145,9 @@ public class OpenSupportedLinksTest {
anyInt());
doReturn(mCategory).when(mSettings).findPreference(any(CharSequence.class));
doReturn(mResources).when(mSettings).getResources();
when(mResources.getQuantityString(anyInt(), anyInt(), anyInt())).thenReturn(TEST_SUMMARY);
doReturn(true).when(mCategory).addPreference(any(Preference.class));
when(mResources.getString(R.string.app_link_open_always_summary))
.thenReturn("App claims to handle # links");
}
public static class TestFragment extends OpenSupportedLinks {