Expose hotkeys to localisation.

Allows the Settings > Hotkeys screen to be localised, including hotkey decriptions, groups and contexts.

The hotkey names are exposed to localisation via KeycodeExts. Hotkey modifiers are similarly exposed via ModifersExts.

The Settings > Input screen has a Zoom Modifier dropdown, which shows the localised modifier name.

The --check-yaml utility command is taught to recognise all hotkey translation, so it can validate their usage.
This commit is contained in:
RoosterDragon
2024-09-17 19:42:42 +01:00
committed by Gustas
parent 10856ccfd0
commit 6f6fb5b393
39 changed files with 1284 additions and 722 deletions

View File

@@ -493,6 +493,17 @@ label-gl-profile-dropdown-container = OpenGL Profile:
label-restart-required-container-video-desc = Display and OpenGL changes require restart
## settings-hotkeys.yaml
hotkey-group-game-commands = Game Commands
hotkey-group-viewport-commands = Viewport Commands
hotkey-group-observer-replay-commands = Observer / Replay Commands
hotkey-group-unit-commands = Unit Commands
hotkey-group-unit-stance-commands = Unit Stance Commands
hotkey-group-production-commands = Production Commands
hotkey-group-support-power-commands = Support Power Commands
hotkey-group-music-commands = Music Commands
hotkey-group-chat-commands = Chat Commands
hotkey-group-control-groups = Control Groups
hotkey-group-editor-commands = Editor Commands
label-hotkeys-panel-filter-input = Filter by name:
label-hotkeys-panel-context-dropdown = Context:
label-hotkey-empty-list-message = No hotkeys match the filter criteria.

View File

@@ -403,6 +403,7 @@ checkbox-frame-limiter = Enable Frame Limiter ({ $fps } FPS)
## HotkeysSettingsLogic
label-original-notice = The default is "{ $key }"
label-duplicate-notice = This is already used for "{ $key }" in the { $context } context
hotkey-context-any = Any
## InputSettingsLogic
options-mouse-scroll-type =
@@ -416,13 +417,6 @@ options-control-scheme =
.classic = Classic
.modern = Modern
options-zoom-modifier =
.alt = Alt
.ctrl = Ctrl
.meta = Meta
.shift = Shift
.none = None
## SettingsLogic
dialog-settings-save =
.title = Restart Required
@@ -872,3 +866,253 @@ enumerated-bot-name =
*[zero] {""}
[other] { $number }
}
## ModifiersExts
keycode-modifier =
.alt = Alt
.ctrl = Ctrl
.meta = Meta
.cmd = Cmd
.shift = Shift
.none = None
## KeycodeExts
keycode =
.unknown = Undefined
.return = Return
.escape = Escape
.backspace = Backspace
.tab = Tab
.space = Space
.exclaim = !
.quotedbl = "
.hash = #
.percent = %
.dollar = $
.ampersand = &
.quote = '
.leftparen = (
.rightparen = )
.asterisk = *
.plus = +
.comma = ,
.minus = -
.period = .
.slash = /
.number_0 = 0
.number_1 = 1
.number_2 = 2
.number_3 = 3
.number_4 = 4
.number_5 = 5
.number_6 = 6
.number_7 = 7
.number_8 = 8
.number_9 = 9
.colon = :
.semicolon = ;
.less = <
.equals = =
.greater = >
.question = ?
.at = @
.leftbracket = [
.backslash = \
.rightbracket = ]
.caret = ^
.underscore = _
.backquote = `
.a = A
.b = B
.c = C
.d = D
.e = E
.f = F
.g = G
.h = H
.i = I
.j = J
.k = K
.l = L
.m = M
.n = N
.o = O
.p = P
.q = Q
.r = R
.s = S
.t = T
.u = U
.v = V
.w = W
.x = X
.y = Y
.z = Z
.capslock = CapsLock
.f1 = F1
.f2 = F2
.f3 = F3
.f4 = F4
.f5 = F5
.f6 = F6
.f7 = F7
.f8 = F8
.f9 = F9
.f10 = F10
.f11 = F11
.f12 = F12
.printscreen = PrintScreen
.scrolllock = ScrollLock
.pause = Pause
.insert = Insert
.home = Home
.pageup = PageUp
.delete = Delete
.end = End
.pagedown = PageDown
.right = Right
.left = Left
.down = Down
.up = Up
.numlockclear = Numlock
.kp_divide = Keypad /
.kp_multiply = Keypad *
.kp_minus = Keypad -
.kp_plus = Keypad +
.kp_enter = Keypad Enter
.kp_1 = Keypad 1
.kp_2 = Keypad 2
.kp_3 = Keypad 3
.kp_4 = Keypad 4
.kp_5 = Keypad 5
.kp_6 = Keypad 6
.kp_7 = Keypad 7
.kp_8 = Keypad 8
.kp_9 = Keypad 9
.kp_0 = Keypad 0
.kp_period = Keypad .
.application = Application
.power = Power
.kp_equals = Keypad =
.f13 = F13
.f14 = F14
.f15 = F15
.f16 = F16
.f17 = F17
.f18 = F18
.f19 = F19
.f20 = F20
.f21 = F21
.f22 = F22
.f23 = F23
.f24 = F24
.execute = Execute
.help = Help
.menu = Menu
.select = Select
.stop = Stop
.again = Again
.undo = Undo
.cut = Cut
.copy = Copy
.paste = Paste
.find = Find
.mute = Mute
.volumeup = VolumeUp
.volumedown = VolumeDown
.kp_comma = Keypad ,
.kp_equalsas400 = Keypad (AS400)
.alterase = AltErase
.sysreq = SysReq
.cancel = Cancel
.clear = Clear
.prior = Prior
.return2 = Return
.separator = Separator
.out = Out
.oper = Oper
.clearagain = Clear / Again
.crsel = CrSel
.exsel = ExSel
.kp_00 = Keypad 00
.kp_000 = Keypad 000
.thousandsseparator = ThousandsSeparator
.decimalseparator = DecimalSeparator
.currencyunit = CurrencyUnit
.currencysubunit = CurrencySubUnit
.kp_leftparen = Keypad (
.kp_rightparen = Keypad )
.kp_leftbrace = Keypad {"{"}
.kp_rightbrace = Keypad {"}"}
.kp_tab = Keypad Tab
.kp_backspace = Keypad Backspace
.kp_a = Keypad A
.kp_b = Keypad B
.kp_c = Keypad C
.kp_d = Keypad D
.kp_e = Keypad E
.kp_f = Keypad F
.kp_xor = Keypad XOR
.kp_power = Keypad ^
.kp_percent = Keypad %
.kp_less = Keypad <
.kp_greater = Keypad >
.kp_ampersand = Keypad &
.kp_dblampersand = Keypad &&
.kp_verticalbar = Keypad |
.kp_dblverticalbar = Keypad ||
.kp_colon = Keypad :
.kp_hash = Keypad #
.kp_space = Keypad Space
.kp_at = Keypad @
.kp_exclam = Keypad !
.kp_memstore = Keypad MemStore
.kp_memrecall = Keypad MemRecall
.kp_memclear = Keypad MemClear
.kp_memadd = Keypad MemAdd
.kp_memsubtract = Keypad MemSubtract
.kp_memmultiply = Keypad MemMultiply
.kp_memdivide = Keypad MemDivide
.kp_plusminus = Keypad +/-
.kp_clear = Keypad Clear
.kp_clearentry = Keypad ClearEntry
.kp_binary = Keypad Binary
.kp_octal = Keypad Octal
.kp_decimal = Keypad Decimal
.kp_hexadecimal = Keypad Hexadecimal
.lctrl = Left Ctrl
.lshift = Left Shift
.lalt = Left Alt
.lgui = Left GUI
.rctrl = Right Ctrl
.rshift = Right Shift
.ralt = Right Alt
.rgui = Right GUI
.mode = ModeSwitch
.audionext = AudioNext
.audioprev = AudioPrev
.audiostop = AudioStop
.audioplay = AudioPlay
.audiomute = AudioMute
.mediaselect = MediaSelect
.www = WWW
.mail = Mail
.calculator = Calculator
.computer = Computer
.ac_search = AC Search
.ac_home = AC Home
.ac_back = AC Back
.ac_forward = AC Forward
.ac_stop = AC Stop
.ac_refresh = AC Refresh
.ac_bookmarks = AC Bookmarks
.brightnessdown = BrightnessDown
.brightnessup = BrightnessUp
.displayswitch = DisplaySwitch
.kbdillumtoggle = KBDIllumToggle
.kbdillumdown = KBDIllumDown
.kbdillumup = KBDIllumUp
.eject = Eject
.sleep = Sleep
.mouse4 = Mouse 4
.mouse5 = Mouse 5

View File

@@ -0,0 +1,184 @@
hotkey-context-player = Player
hotkey-context-spectator = Spectator
hotkey-context-chat-input = Chat Input
hotkey-context-menu = Menu
hotkey-context-editor = Editor
## chat.yaml
hotkey-description-OpenTeamChat = Open Team Chat
hotkey-description-OpenGeneralChat = Open General Chat
hotkey-description-ToggleChatMode = Toggle Chat Mode
hotkey-description-Autocomplete = Autocomplete
## control-groups.yaml
hotkey-description-ControlGroupSelect01 = Select group 1
hotkey-description-ControlGroupSelect02 = Select group 2
hotkey-description-ControlGroupSelect03 = Select group 3
hotkey-description-ControlGroupSelect04 = Select group 4
hotkey-description-ControlGroupSelect05 = Select group 5
hotkey-description-ControlGroupSelect06 = Select group 6
hotkey-description-ControlGroupSelect07 = Select group 7
hotkey-description-ControlGroupSelect08 = Select group 8
hotkey-description-ControlGroupSelect09 = Select group 9
hotkey-description-ControlGroupSelect10 = Select group 0
hotkey-description-ControlGroupCreate01 = Create group 1
hotkey-description-ControlGroupCreate02 = Create group 2
hotkey-description-ControlGroupCreate03 = Create group 3
hotkey-description-ControlGroupCreate04 = Create group 4
hotkey-description-ControlGroupCreate05 = Create group 5
hotkey-description-ControlGroupCreate06 = Create group 6
hotkey-description-ControlGroupCreate07 = Create group 7
hotkey-description-ControlGroupCreate08 = Create group 8
hotkey-description-ControlGroupCreate09 = Create group 9
hotkey-description-ControlGroupCreate10 = Create group 0
hotkey-description-ControlGroupAddTo01 = Add to group 1
hotkey-description-ControlGroupAddTo02 = Add to group 2
hotkey-description-ControlGroupAddTo03 = Add to group 3
hotkey-description-ControlGroupAddTo04 = Add to group 4
hotkey-description-ControlGroupAddTo05 = Add to group 5
hotkey-description-ControlGroupAddTo06 = Add to group 6
hotkey-description-ControlGroupAddTo07 = Add to group 7
hotkey-description-ControlGroupAddTo08 = Add to group 8
hotkey-description-ControlGroupAddTo09 = Add to group 9
hotkey-description-ControlGroupAddTo10 = Add to group 0
hotkey-description-ControlGroupCombineWith01 = Combine with group 1
hotkey-description-ControlGroupCombineWith02 = Combine with group 2
hotkey-description-ControlGroupCombineWith03 = Combine with group 3
hotkey-description-ControlGroupCombineWith04 = Combine with group 4
hotkey-description-ControlGroupCombineWith05 = Combine with group 5
hotkey-description-ControlGroupCombineWith06 = Combine with group 6
hotkey-description-ControlGroupCombineWith07 = Combine with group 7
hotkey-description-ControlGroupCombineWith08 = Combine with group 8
hotkey-description-ControlGroupCombineWith09 = Combine with group 9
hotkey-description-ControlGroupCombineWith10 = Combine with group 0
hotkey-description-ControlGroupJumpTo01 = Jump to group 1
hotkey-description-ControlGroupJumpTo02 = Jump to group 2
hotkey-description-ControlGroupJumpTo03 = Jump to group 3
hotkey-description-ControlGroupJumpTo04 = Jump to group 4
hotkey-description-ControlGroupJumpTo05 = Jump to group 5
hotkey-description-ControlGroupJumpTo06 = Jump to group 6
hotkey-description-ControlGroupJumpTo07 = Jump to group 7
hotkey-description-ControlGroupJumpTo08 = Jump to group 8
hotkey-description-ControlGroupJumpTo09 = Jump to group 9
hotkey-description-ControlGroupJumpTo10 = Jump to group 0
hotkey-description-RemoveFromControlGroup = Remove from control group
## editor.yaml
hotkey-description-EditorUndo = Undo
hotkey-description-EditorRedo = Redo
hotkey-description-EditorCopy = Copy
hotkey-description-EditorQuickSave = Save Map
hotkey-description-EditorPaste = Paste
hotkey-description-EditorSelectTab = Select Tab
hotkey-description-EditorTilesTab = Tiles Tab
hotkey-description-EditorOverlaysTab = Overlays Tab
hotkey-description-EditorActorsTab = Actors Tab
hotkey-description-EditorToolsTab = Tools Tab
hotkey-description-EditorHistoryTab = History Tab
hotkey-description-EditorSettingsTab = Settings Tab
hotkey-description-EditorToggleGridOverlay = Grid Overlay
hotkey-description-EditorToggleBuildableOverlay = Buildable Terrain Overlay
hotkey-description-EditorToggleMarkerOverlay = Marker Layer Overlay
## game.yaml
hotkey-description-CycleBase = Jump to base
hotkey-description-ToLastEvent = Jump to last radar event
hotkey-description-ToSelection = Jump to selection
hotkey-description-SelectAllUnits = Select all combat units
hotkey-description-SelectUnitsByType = Select units by type
hotkey-description-CycleHarvesters = Cycle Harvesters
hotkey-description-Pause = Pause / Unpause
hotkey-description-Sell = Sell mode
hotkey-description-Repair = Repair mode
hotkey-description-PlaceBeacon = Place beacon
hotkey-description-CycleStatusBars = Cycle status bars display
hotkey-description-ToggleMute = Toggle audio mute
hotkey-description-TogglePlayerStanceColor = Toggle player stance colors
hotkey-description-TakeScreenshot = Take screenshot
hotkey-description-AttackMove = Attack Move
hotkey-description-Stop = Stop
hotkey-description-Scatter = Scatter
hotkey-description-Deploy = Deploy
hotkey-description-Guard = Guard
hotkey-description-StanceAttackAnything = Attack anything
hotkey-description-StanceDefend = Defend
hotkey-description-StanceReturnFire = Return fire
hotkey-description-StanceHoldFire = Hold fire
hotkey-description-StopMusic = Stop
hotkey-description-PauseMusic = Pause or Resume
hotkey-description-PrevMusic = Previous
hotkey-description-NextMusic = Next
## observer.yaml
hotkey-description-ObserverCombinedView = All Players
hotkey-description-ObserverWorldView = Disable Shroud
hotkey-description-ReplaySpeedSlow = Slow speed
hotkey-description-ReplaySpeedRegular = Regular speed
hotkey-description-ReplaySpeedFast = Fast speed
hotkey-description-ReplaySpeedMax = Maximum speed
hotkey-description-StatisticsNone = Disable statistics
hotkey-description-StatisticsBasic = Basic statistics
hotkey-description-StatisticsEconomy = Economy statistics
hotkey-description-StatisticsProduction = Production statistics
hotkey-description-StatisticsSupportPowers = Support Power statistics
hotkey-description-StatisticsCombat = Combat statistics
hotkey-description-StatisticsArmy = Army statistics
hotkey-description-StatisticsGraph = Statistics graph
hotkey-description-StatisticsArmyGraph = Army value graph
## production-common.yaml
hotkey-description-CycleProductionBuildings = Next facility
hotkey-description-SelectProductionBuilding = Current facility
hotkey-description-Production01 = Slot 01
hotkey-description-Production02 = Slot 02
hotkey-description-Production03 = Slot 03
hotkey-description-Production04 = Slot 04
hotkey-description-Production05 = Slot 05
hotkey-description-Production06 = Slot 06
hotkey-description-Production07 = Slot 07
hotkey-description-Production08 = Slot 08
hotkey-description-Production09 = Slot 09
hotkey-description-Production10 = Slot 10
hotkey-description-Production11 = Slot 11
hotkey-description-Production12 = Slot 12
hotkey-description-Production13 = Slot 13
hotkey-description-Production14 = Slot 14
hotkey-description-Production15 = Slot 15
hotkey-description-Production16 = Slot 16
hotkey-description-Production17 = Slot 17
hotkey-description-Production18 = Slot 18
hotkey-description-Production19 = Slot 19
hotkey-description-Production20 = Slot 20
hotkey-description-Production21 = Slot 21
hotkey-description-Production22 = Slot 22
hotkey-description-Production23 = Slot 23
hotkey-description-Production24 = Slot 24
## supportpowers.yaml
hotkey-description-SupportPower01 = Slot 01
hotkey-description-SupportPower02 = Slot 02
hotkey-description-SupportPower03 = Slot 03
hotkey-description-SupportPower04 = Slot 04
hotkey-description-SupportPower05 = Slot 05
hotkey-description-SupportPower06 = Slot 06
## viewport.yaml
hotkey-description-MapScrollUp = Scroll up
hotkey-description-MapScrollDown = Scroll down
hotkey-description-MapScrollLeft = Scroll left
hotkey-description-MapScrollRight = Scroll right
hotkey-description-MapJumpToTopEdge = Jump to top edge
hotkey-description-MapJumpToBottomEdge = Jump to bottom edge
hotkey-description-MapJumpToLeftEdge = Jump to left edge
hotkey-description-MapJumpToRightEdge = Jump to right edge
hotkey-description-MapBookmarkSave01 = Record bookmark 1
hotkey-description-MapBookmarkRestore01 = Jump to bookmark 1
hotkey-description-MapBookmarkSave02 = Record bookmark 2
hotkey-description-MapBookmarkRestore02 = Jump to bookmark 2
hotkey-description-MapBookmarkSave03 = Record bookmark 3
hotkey-description-MapBookmarkRestore03 = Jump to bookmark 3
hotkey-description-MapBookmarkSave04 = Record bookmark 4
hotkey-description-MapBookmarkRestore04 = Jump to bookmark 4
hotkey-description-ZoomIn = Zoom in
hotkey-description-ZoomOut = Zoom out
hotkey-description-ResetZoom = Reset zoom