diff options
| author | 2024-07-10 10:42:45 +0000 | |
|---|---|---|
| committer | 2024-07-10 10:42:45 +0000 | |
| commit | bb0767c00852284fc89837f911ee8230b717bd0c (patch) | |
| tree | 4a33e2c830855fefad879db81eb21ef602d3d578 | |
| parent | edc0370e60fb53ff8ee98780d19482d1ecd1e0ea (diff) | |
| parent | a70115713ef5174b96e8f6406ccf2f353cd5440c (diff) | |
Merge "Shortcut Helper - Make sure "Esc" is using a localized string" into main
4 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index dee55289958e..c1e99db63e3a 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2050,6 +2050,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"); |