Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12f2fc71 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Display custom input style name in system locale"

parents 0f1ccbff 8203f7af
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -120,18 +120,14 @@
    </string-array>

    <!-- Subtype locale display name exceptions.
         For each exception, there should be related string resource for display name that has
         explicit keyboard layout. The string resource name must be "subtype_with_layout_<locale>. -->
         For each exception, there should be related string resources for display name that may have
         explicit keyboard layout. The string resource name must be "subtype_<locale>" or
         "subtype_with_layout_<locale>. Please refer to strings.xml for these resources. -->
    <string-array name="subtype_locale_exception_keys">
        <item>en_US</item>
        <item>en_GB</item>
        <item>es_US</item>
    </string-array>
    <string-array name="subtype_locale_exception_values">
        <item>English (US)</item>
        <item>English (UK)</item>
        <item>Español (EE.UU.)</item>
    </string-array>

    <!-- Generic subtype label -->
    <string name="subtype_generic">%s</string>
+5 −0
Original line number Diff line number Diff line
@@ -319,12 +319,17 @@
    <string name="subtype_en_GB">English (UK)</string>
    <!-- Description for English (United States) keyboard subtype [CHAR LIMIT=25] -->
    <string name="subtype_en_US">English (US)</string>
    <!-- Description for Spanish (United States) keyboard subtype [CHAR LIMIT=25] -->
    <string name="subtype_es_US">Spanish (US)</string>
    <!-- Description for English (United Kingdom) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
         This should be identical to subtype_en_GB aside from the trailing (%s). -->
    <string name="subtype_with_layout_en_GB">English (UK) (<xliff:g id="layout">%s</xliff:g>)</string>
    <!-- Description for English (United States) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
         This should be identical to subtype_en_US aside from the trailing (%s). -->
    <string name="subtype_with_layout_en_US">English (US) (<xliff:g id="layout">%s</xliff:g>)</string>
    <!-- Description for Spanish (United States) keyboard subtype with explicit keyboard layout [CHAR LIMIT=25]
         This should be identical to subtype_es_US aside from the trailing (%s). -->
    <string name="subtype_with_layout_es_US">Spanish (US) (<xliff:g id="layout">%s</xliff:g>)</string>
    <!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
         Description for Serbian Cyrillic keyboard subtype [CHAR LIMIT=25]
    <string name="subtype_serbian_cyrillic">Serbian (Cyrillic)</string>
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@
            android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
    />
    <subtype android:icon="@drawable/ic_subtype_keyboard"
            android:label="@string/subtype_generic"
            android:label="@string/subtype_es_US"
            android:subtypeId="0x84d2efc6"
            android:imeSubtypeLocale="es_US"
            android:imeSubtypeMode="keyboard"
+6 −4
Original line number Diff line number Diff line
@@ -72,7 +72,8 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment {
        }

        public SubtypeLocaleItem(final String localeString) {
            this(localeString, SubtypeLocale.getSubtypeLocaleDisplayName(localeString));
            this(localeString,
                    SubtypeLocale.getSubtypeLocaleDisplayNameInSystemLocale(localeString));
        }

        @Override
@@ -103,7 +104,7 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment {
                if (DEBUG_SUBTYPE_ID) {
                    android.util.Log.d(TAG, String.format("%-6s 0x%08x %11d %s",
                            subtype.getLocale(), subtype.hashCode(), subtype.hashCode(),
                            SubtypeLocale.getSubtypeDisplayName(subtype)));
                            SubtypeLocale.getSubtypeDisplayNameInSystemLocale(subtype)));
                }
                if (subtype.containsExtraValueKey(ASCII_CAPABLE)) {
                    items.add(createItem(context, subtype.getLocale()));
@@ -205,7 +206,8 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment {
                setDialogTitle(R.string.add_style);
                setKey(KEY_NEW_SUBTYPE);
            } else {
                final String displayName = SubtypeLocale.getSubtypeDisplayName(subtype);
                final String displayName =
                        SubtypeLocale.getSubtypeDisplayNameInSystemLocale(subtype);
                setTitle(displayName);
                setDialogTitle(displayName);
                setKey(KEY_PREFIX + subtype.getLocale() + "_"
@@ -497,7 +499,7 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment {
        final Context context = getActivity();
        final Resources res = context.getResources();
        final String message = res.getString(R.string.custom_input_style_already_exists,
                SubtypeLocale.getSubtypeDisplayName(subtype));
                SubtypeLocale.getSubtypeDisplayNameInSystemLocale(subtype));
        Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
    }

+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
        final StringBuilder styles = new StringBuilder();
        for (final InputMethodSubtype subtype : subtypes) {
            if (styles.length() > 0) styles.append(", ");
            styles.append(SubtypeLocale.getSubtypeDisplayName(subtype));
            styles.append(SubtypeLocale.getSubtypeDisplayNameInSystemLocale(subtype));
        }
        customInputStyles.setSummary(styles);
    }
Loading