diff options
| author | 2024-07-09 14:08:46 +0100 | |
|---|---|---|
| committer | 2024-07-09 14:08:46 +0100 | |
| commit | a70115713ef5174b96e8f6406ccf2f353cd5440c (patch) | |
| tree | 632f042b77a19d23cb3e9cd51f5689c48d7a70f2 | |
| parent | 5627a8981b60224fc1070e9d4eef218a7bc5f293 (diff) | |
Shortcut Helper - Make sure "Esc" is using a localized string
Flag: EXEMPT trivial
Test: Manually
Fixes: 329139612
Change-Id: I00aa41ff56ea340228a5753557b34caab38af806
4 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 0637d3911b29..1c793523ad9e 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2038,6 +2038,8 @@ <string name="keyboard_key_page_down">Page Down</string> <!-- Name used to refer to the "Delete" key on the keyboard. --> <string name="keyboard_key_forward_del">Delete</string> + <!-- Name used to refer to the "Esc" or "Escape" key on the keyboard. --> + <string name="keyboard_key_esc">Esc</string> <!-- Name used to refer to the "Home" move key on the keyboard. --> <string name="keyboard_key_move_home">Home</string> <!-- Name used to refer to the "End" move key on the keyboard. --> diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt index 0aced8c95662..cbe6fc7c6026 100644 --- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt +++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt @@ -222,7 +222,7 @@ object ShortcutHelperKeys { { context -> context.getString(R.string.keyboard_key_forward_del) }, - KEYCODE_ESCAPE to { "Esc" }, + KEYCODE_ESCAPE to { context -> context.getString(R.string.keyboard_key_esc) }, KEYCODE_SYSRQ to { "SysRq" }, KEYCODE_BREAK to { "Break" }, KEYCODE_SCROLL_LOCK to { "Scroll Lock" }, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java index 342ec0dc228d..5bb2936c91d4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java @@ -274,7 +274,8 @@ public final class KeyboardShortcutListSearch { context.getString(R.string.keyboard_key_button_template, "Mode")); mSpecialCharacterNames.put( KeyEvent.KEYCODE_FORWARD_DEL, context.getString(R.string.keyboard_key_forward_del)); - mSpecialCharacterNames.put(KeyEvent.KEYCODE_ESCAPE, "Esc"); + mSpecialCharacterNames.put( + KeyEvent.KEYCODE_ESCAPE, context.getString(R.string.keyboard_key_esc)); mSpecialCharacterNames.put(KeyEvent.KEYCODE_SYSRQ, "SysRq"); mSpecialCharacterNames.put(KeyEvent.KEYCODE_BREAK, "Break"); mSpecialCharacterNames.put(KeyEvent.KEYCODE_SCROLL_LOCK, "Scroll Lock"); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java index 6ee13c3b1801..a49ca3889876 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java @@ -259,7 +259,8 @@ public final class KeyboardShortcuts { context.getString(R.string.keyboard_key_button_template, "Mode")); mSpecialCharacterNames.put( KeyEvent.KEYCODE_FORWARD_DEL, context.getString(R.string.keyboard_key_forward_del)); - mSpecialCharacterNames.put(KeyEvent.KEYCODE_ESCAPE, "Esc"); + mSpecialCharacterNames.put( + KeyEvent.KEYCODE_ESCAPE, context.getString(R.string.keyboard_key_esc)); mSpecialCharacterNames.put(KeyEvent.KEYCODE_SYSRQ, "SysRq"); mSpecialCharacterNames.put(KeyEvent.KEYCODE_BREAK, "Break"); mSpecialCharacterNames.put(KeyEvent.KEYCODE_SCROLL_LOCK, "Scroll Lock"); |