[Physical Keyboard] Fix L18n test bugs
1. update string to match with Markup 2. a space for label keys as suggested Bug: 387267421 Bug: 387572420 Flag: com.android.settings.keyboard.keyboard_and_touchpad_a11y_new_page_enabled Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/inputmethod Change-Id: I787cf6ff4e15509d669317a0d968235a08b4dc43
This commit is contained in:
@@ -4699,7 +4699,7 @@
|
|||||||
<string name="mouse_keys_release2_summary">Use the \“<xliff:g id="release_2_label" example="/">%s</xliff:g>\” key to click the secondary mouse button</string>
|
<string name="mouse_keys_release2_summary">Use the \“<xliff:g id="release_2_label" example="/">%s</xliff:g>\” key to click the secondary mouse button</string>
|
||||||
|
|
||||||
<!-- Title for the button to trigger the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=35] -->
|
<!-- Title for the button to trigger the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=35] -->
|
||||||
<string name="keyboard_shortcuts_helper">Keyboard shortcuts</string>
|
<string name="keyboard_shortcuts_helper">View keyboard shortcuts</string>
|
||||||
<!-- Summary text for the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=100] -->
|
<!-- Summary text for the 'keyboard shortcuts helper' dialog. [CHAR LIMIT=100] -->
|
||||||
<string name="keyboard_shortcuts_helper_summary">Show list of shortcuts</string>
|
<string name="keyboard_shortcuts_helper_summary">Show list of shortcuts</string>
|
||||||
<!-- Title for the 'Work profile keyboards & tools' preference category inside Languages and inputs'. [CHAR LIMIT=50] -->
|
<!-- Title for the 'Work profile keyboards & tools' preference category inside Languages and inputs'. [CHAR LIMIT=50] -->
|
||||||
|
@@ -24,8 +24,7 @@
|
|||||||
android:title="@string/keyboard_options_category">
|
android:title="@string/keyboard_options_category">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="keyboard_shortcuts_helper"
|
android:key="keyboard_shortcuts_helper"
|
||||||
android:title="@string/keyboard_shortcuts_helper"
|
android:title="@string/keyboard_shortcuts_helper"/>
|
||||||
android:summary="@string/keyboard_shortcuts_helper_summary" />
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="modifier_keys_settings"
|
android:key="modifier_keys_settings"
|
||||||
|
@@ -38,6 +38,7 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class MouseKeysImageListAdapter extends
|
public class MouseKeysImageListAdapter extends
|
||||||
RecyclerView.Adapter<MouseKeysImageListAdapter.MouseKeyImageViewHolder> {
|
RecyclerView.Adapter<MouseKeysImageListAdapter.MouseKeyImageViewHolder> {
|
||||||
|
private static final String LABEL_DELIMITER = ", ";
|
||||||
private static final ImmutableList<Integer> DRAWABLE_LIST = ImmutableList.of(
|
private static final ImmutableList<Integer> DRAWABLE_LIST = ImmutableList.of(
|
||||||
R.drawable.mouse_keys_directional, R.drawable.mouse_keys_click,
|
R.drawable.mouse_keys_directional, R.drawable.mouse_keys_click,
|
||||||
R.drawable.mouse_keys_press_hold, R.drawable.mouse_keys_release,
|
R.drawable.mouse_keys_press_hold, R.drawable.mouse_keys_release,
|
||||||
@@ -93,7 +94,7 @@ public class MouseKeysImageListAdapter extends
|
|||||||
List<String> directionalLabelList = DIRECTIONAL_CHAR_KEYCODE_LIST.stream().map(
|
List<String> directionalLabelList = DIRECTIONAL_CHAR_KEYCODE_LIST.stream().map(
|
||||||
(key) -> getDisplayLabel(currentInputDevice, key)).toList();
|
(key) -> getDisplayLabel(currentInputDevice, key)).toList();
|
||||||
mComposedSummaryList.add(context.getString(R.string.mouse_keys_directional_summary,
|
mComposedSummaryList.add(context.getString(R.string.mouse_keys_directional_summary,
|
||||||
String.join(",", directionalLabelList)));
|
String.join(LABEL_DELIMITER, directionalLabelList)));
|
||||||
String leftClickLabel = getDisplayLabel(currentInputDevice, LEFT_CLICK_CHAR_KEYCODE);
|
String leftClickLabel = getDisplayLabel(currentInputDevice, LEFT_CLICK_CHAR_KEYCODE);
|
||||||
mComposedSummaryList.add(
|
mComposedSummaryList.add(
|
||||||
context.getString(R.string.mouse_keys_click_summary, leftClickLabel));
|
context.getString(R.string.mouse_keys_click_summary, leftClickLabel));
|
||||||
@@ -107,7 +108,8 @@ public class MouseKeysImageListAdapter extends
|
|||||||
(key) -> getDisplayLabel(currentInputDevice, key)).toList();
|
(key) -> getDisplayLabel(currentInputDevice, key)).toList();
|
||||||
mComposedSummaryList.add(context.getString(R.string.mouse_keys_toggle_scroll_summary,
|
mComposedSummaryList.add(context.getString(R.string.mouse_keys_toggle_scroll_summary,
|
||||||
toggleScrollLabelList.getFirst(),
|
toggleScrollLabelList.getFirst(),
|
||||||
String.join(",", toggleScrollLabelList.subList(1, toggleScrollLabelList.size()))
|
String.join(LABEL_DELIMITER,
|
||||||
|
toggleScrollLabelList.subList(1, toggleScrollLabelList.size()))
|
||||||
));
|
));
|
||||||
String rightClickLabel = getDisplayLabel(currentInputDevice, RIGHT_CLICK_CHAR_KEYCODE);
|
String rightClickLabel = getDisplayLabel(currentInputDevice, RIGHT_CLICK_CHAR_KEYCODE);
|
||||||
mComposedSummaryList.add(
|
mComposedSummaryList.add(
|
||||||
|
Reference in New Issue
Block a user