diff --git a/OpenRA.Game/HotkeyDefinition.cs b/OpenRA.Game/HotkeyDefinition.cs index ad4a09a85a..7a94912571 100644 --- a/OpenRA.Game/HotkeyDefinition.cs +++ b/OpenRA.Game/HotkeyDefinition.cs @@ -17,9 +17,15 @@ namespace OpenRA { public readonly string Name; public readonly Hotkey Default = Hotkey.Invalid; + + [FluentReference] public readonly string Description = ""; + public readonly HashSet Types = new(); + + [FluentReference] public readonly HashSet Contexts = new(); + public readonly bool Readonly = false; public bool HasDuplicates { get; internal set; } diff --git a/OpenRA.Game/Input/Hotkey.cs b/OpenRA.Game/Input/Hotkey.cs index f7bf45b742..63d60d9460 100644 --- a/OpenRA.Game/Input/Hotkey.cs +++ b/OpenRA.Game/Input/Hotkey.cs @@ -91,16 +91,16 @@ namespace OpenRA var ret = KeycodeExts.DisplayString(Key); if (Modifiers.HasModifier(Modifiers.Shift)) - ret = "Shift + " + ret; + ret = $"{ModifiersExts.DisplayString(Modifiers.Shift)} + {ret}"; if (Modifiers.HasModifier(Modifiers.Alt)) - ret = "Alt + " + ret; + ret = $"{ModifiersExts.DisplayString(Modifiers.Alt)} + {ret}"; if (Modifiers.HasModifier(Modifiers.Ctrl)) - ret = "Ctrl + " + ret; + ret = $"{ModifiersExts.DisplayString(Modifiers.Ctrl)} + {ret}"; if (Modifiers.HasModifier(Modifiers.Meta)) - ret = (Platform.CurrentPlatform == PlatformType.OSX ? "Cmd + " : "Meta + ") + ret; + ret = $"{ModifiersExts.DisplayString(Modifiers.Meta)} + {ret}"; return ret; } diff --git a/OpenRA.Game/Input/IInputHandler.cs b/OpenRA.Game/Input/IInputHandler.cs index 7698d5f3ce..be8347cd12 100644 --- a/OpenRA.Game/Input/IInputHandler.cs +++ b/OpenRA.Game/Input/IInputHandler.cs @@ -10,6 +10,7 @@ #endregion using System; +using System.Collections.Generic; namespace OpenRA { @@ -61,6 +62,33 @@ namespace OpenRA Meta = 8, } + public static class ModifiersExts + { + [FluentReference] + public const string Cmd = "keycode-modifier.cmd"; + + [FluentReference(Traits.LintDictionaryReference.Values)] + public static readonly IReadOnlyDictionary ModifierFluentKeys = new Dictionary() + { + { Modifiers.None, "keycode-modifier.none" }, + { Modifiers.Shift, "keycode-modifier.shift" }, + { Modifiers.Alt, "keycode-modifier.alt" }, + { Modifiers.Ctrl, "keycode-modifier.ctrl" }, + { Modifiers.Meta, "keycode-modifier.meta" }, + }; + + public static string DisplayString(Modifiers m) + { + if (m == Modifiers.Meta && Platform.CurrentPlatform == PlatformType.OSX) + return FluentProvider.GetString(Cmd); + + if (!ModifierFluentKeys.TryGetValue(m, out var fluentKey)) + return m.ToString(); + + return FluentProvider.GetString(fluentKey); + } + } + public enum KeyInputEvent { Down, Up } public struct KeyInput { diff --git a/OpenRA.Game/Input/Keycode.cs b/OpenRA.Game/Input/Keycode.cs index 547def4870..7f0afb9cf6 100644 --- a/OpenRA.Game/Input/Keycode.cs +++ b/OpenRA.Game/Input/Keycode.cs @@ -259,254 +259,255 @@ namespace OpenRA public static class KeycodeExts { - static readonly Dictionary KeyNames = new() + [FluentReference(Traits.LintDictionaryReference.Values)] + public static readonly IReadOnlyDictionary KeycodeFluentKeys = new Dictionary() { - { Keycode.UNKNOWN, "Undefined" }, - { Keycode.RETURN, "Return" }, - { Keycode.ESCAPE, "Escape" }, - { Keycode.BACKSPACE, "Backspace" }, - { Keycode.TAB, "Tab" }, - { Keycode.SPACE, "Space" }, - { Keycode.EXCLAIM, "!" }, - { Keycode.QUOTEDBL, "\"" }, - { Keycode.HASH, "#" }, - { Keycode.PERCENT, "%" }, - { Keycode.DOLLAR, "$" }, - { Keycode.AMPERSAND, "&" }, - { Keycode.QUOTE, "'" }, - { Keycode.LEFTPAREN, "(" }, - { Keycode.RIGHTPAREN, ")" }, - { Keycode.ASTERISK, "*" }, - { Keycode.PLUS, "+" }, - { Keycode.COMMA, "," }, - { Keycode.MINUS, "-" }, - { Keycode.PERIOD, "." }, - { Keycode.SLASH, "/" }, - { Keycode.NUMBER_0, "0" }, - { Keycode.NUMBER_1, "1" }, - { Keycode.NUMBER_2, "2" }, - { Keycode.NUMBER_3, "3" }, - { Keycode.NUMBER_4, "4" }, - { Keycode.NUMBER_5, "5" }, - { Keycode.NUMBER_6, "6" }, - { Keycode.NUMBER_7, "7" }, - { Keycode.NUMBER_8, "8" }, - { Keycode.NUMBER_9, "9" }, - { Keycode.COLON, ":" }, - { Keycode.SEMICOLON, ";" }, - { Keycode.LESS, "<" }, - { Keycode.EQUALS, "=" }, - { Keycode.GREATER, ">" }, - { Keycode.QUESTION, "?" }, - { Keycode.AT, "@" }, - { Keycode.LEFTBRACKET, "[" }, - { Keycode.BACKSLASH, "\\" }, - { Keycode.RIGHTBRACKET, "]" }, - { Keycode.CARET, "^" }, - { Keycode.UNDERSCORE, "_" }, - { Keycode.BACKQUOTE, "`" }, - { Keycode.A, "A" }, - { Keycode.B, "B" }, - { Keycode.C, "C" }, - { Keycode.D, "D" }, - { Keycode.E, "E" }, - { Keycode.F, "F" }, - { Keycode.G, "G" }, - { Keycode.H, "H" }, - { Keycode.I, "I" }, - { Keycode.J, "J" }, - { Keycode.K, "K" }, - { Keycode.L, "L" }, - { Keycode.M, "M" }, - { Keycode.N, "N" }, - { Keycode.O, "O" }, - { Keycode.P, "P" }, - { Keycode.Q, "Q" }, - { Keycode.R, "R" }, - { Keycode.S, "S" }, - { Keycode.T, "T" }, - { Keycode.U, "U" }, - { Keycode.V, "V" }, - { Keycode.W, "W" }, - { Keycode.X, "X" }, - { Keycode.Y, "Y" }, - { Keycode.Z, "Z" }, - { Keycode.CAPSLOCK, "CapsLock" }, - { Keycode.F1, "F1" }, - { Keycode.F2, "F2" }, - { Keycode.F3, "F3" }, - { Keycode.F4, "F4" }, - { Keycode.F5, "F5" }, - { Keycode.F6, "F6" }, - { Keycode.F7, "F7" }, - { Keycode.F8, "F8" }, - { Keycode.F9, "F9" }, - { Keycode.F10, "F10" }, - { Keycode.F11, "F11" }, - { Keycode.F12, "F12" }, - { Keycode.PRINTSCREEN, "PrintScreen" }, - { Keycode.SCROLLLOCK, "ScrollLock" }, - { Keycode.PAUSE, "Pause" }, - { Keycode.INSERT, "Insert" }, - { Keycode.HOME, "Home" }, - { Keycode.PAGEUP, "PageUp" }, - { Keycode.DELETE, "Delete" }, - { Keycode.END, "End" }, - { Keycode.PAGEDOWN, "PageDown" }, - { Keycode.RIGHT, "Right" }, - { Keycode.LEFT, "Left" }, - { Keycode.DOWN, "Down" }, - { Keycode.UP, "Up" }, - { Keycode.NUMLOCKCLEAR, "Numlock" }, - { Keycode.KP_DIVIDE, "Keypad /" }, - { Keycode.KP_MULTIPLY, "Keypad *" }, - { Keycode.KP_MINUS, "Keypad -" }, - { Keycode.KP_PLUS, "Keypad +" }, - { Keycode.KP_ENTER, "Keypad Enter" }, - { Keycode.KP_1, "Keypad 1" }, - { Keycode.KP_2, "Keypad 2" }, - { Keycode.KP_3, "Keypad 3" }, - { Keycode.KP_4, "Keypad 4" }, - { Keycode.KP_5, "Keypad 5" }, - { Keycode.KP_6, "Keypad 6" }, - { Keycode.KP_7, "Keypad 7" }, - { Keycode.KP_8, "Keypad 8" }, - { Keycode.KP_9, "Keypad 9" }, - { Keycode.KP_0, "Keypad 0" }, - { Keycode.KP_PERIOD, "Keypad ." }, - { Keycode.APPLICATION, "Application" }, - { Keycode.POWER, "Power" }, - { Keycode.KP_EQUALS, "Keypad =" }, - { Keycode.F13, "F13" }, - { Keycode.F14, "F14" }, - { Keycode.F15, "F15" }, - { Keycode.F16, "F16" }, - { Keycode.F17, "F17" }, - { Keycode.F18, "F18" }, - { Keycode.F19, "F19" }, - { Keycode.F20, "F20" }, - { Keycode.F21, "F21" }, - { Keycode.F22, "F22" }, - { Keycode.F23, "F23" }, - { Keycode.F24, "F24" }, - { Keycode.EXECUTE, "Execute" }, - { Keycode.HELP, "Help" }, - { Keycode.MENU, "Menu" }, - { Keycode.SELECT, "Select" }, - { Keycode.STOP, "Stop" }, - { Keycode.AGAIN, "Again" }, - { Keycode.UNDO, "Undo" }, - { Keycode.CUT, "Cut" }, - { Keycode.COPY, "Copy" }, - { Keycode.PASTE, "Paste" }, - { Keycode.FIND, "Find" }, - { Keycode.MUTE, "Mute" }, - { Keycode.VOLUMEUP, "VolumeUp" }, - { Keycode.VOLUMEDOWN, "VolumeDown" }, - { Keycode.KP_COMMA, "Keypad }," }, - { Keycode.KP_EQUALSAS400, "Keypad, (AS400)" }, - { Keycode.ALTERASE, "AltErase" }, - { Keycode.SYSREQ, "SysReq" }, - { Keycode.CANCEL, "Cancel" }, - { Keycode.CLEAR, "Clear" }, - { Keycode.PRIOR, "Prior" }, - { Keycode.RETURN2, "Return" }, - { Keycode.SEPARATOR, "Separator" }, - { Keycode.OUT, "Out" }, - { Keycode.OPER, "Oper" }, - { Keycode.CLEARAGAIN, "Clear / Again" }, - { Keycode.CRSEL, "CrSel" }, - { Keycode.EXSEL, "ExSel" }, - { Keycode.KP_00, "Keypad 00" }, - { Keycode.KP_000, "Keypad 000" }, - { Keycode.THOUSANDSSEPARATOR, "ThousandsSeparator" }, - { Keycode.DECIMALSEPARATOR, "DecimalSeparator" }, - { Keycode.CURRENCYUNIT, "CurrencyUnit" }, - { Keycode.CURRENCYSUBUNIT, "CurrencySubUnit" }, - { Keycode.KP_LEFTPAREN, "Keypad (" }, - { Keycode.KP_RIGHTPAREN, "Keypad )" }, - { Keycode.KP_LEFTBRACE, "Keypad {" }, - { Keycode.KP_RIGHTBRACE, "Keypad }" }, - { Keycode.KP_TAB, "Keypad Tab" }, - { Keycode.KP_BACKSPACE, "Keypad Backspace" }, - { Keycode.KP_A, "Keypad A" }, - { Keycode.KP_B, "Keypad B" }, - { Keycode.KP_C, "Keypad C" }, - { Keycode.KP_D, "Keypad D" }, - { Keycode.KP_E, "Keypad E" }, - { Keycode.KP_F, "Keypad F" }, - { Keycode.KP_XOR, "Keypad XOR" }, - { Keycode.KP_POWER, "Keypad ^" }, - { Keycode.KP_PERCENT, "Keypad %" }, - { Keycode.KP_LESS, "Keypad <" }, - { Keycode.KP_GREATER, "Keypad >" }, - { Keycode.KP_AMPERSAND, "Keypad &" }, - { Keycode.KP_DBLAMPERSAND, "Keypad &&" }, - { Keycode.KP_VERTICALBAR, "Keypad |" }, - { Keycode.KP_DBLVERTICALBAR, "Keypad ||" }, - { Keycode.KP_COLON, "Keypad :" }, - { Keycode.KP_HASH, "Keypad #" }, - { Keycode.KP_SPACE, "Keypad Space" }, - { Keycode.KP_AT, "Keypad @" }, - { Keycode.KP_EXCLAM, "Keypad !" }, - { Keycode.KP_MEMSTORE, "Keypad MemStore" }, - { Keycode.KP_MEMRECALL, "Keypad MemRecall" }, - { Keycode.KP_MEMCLEAR, "Keypad MemClear" }, - { Keycode.KP_MEMADD, "Keypad MemAdd" }, - { Keycode.KP_MEMSUBTRACT, "Keypad MemSubtract" }, - { Keycode.KP_MEMMULTIPLY, "Keypad MemMultiply" }, - { Keycode.KP_MEMDIVIDE, "Keypad MemDivide" }, - { Keycode.KP_PLUSMINUS, "Keypad +/-" }, - { Keycode.KP_CLEAR, "Keypad Clear" }, - { Keycode.KP_CLEARENTRY, "Keypad ClearEntry" }, - { Keycode.KP_BINARY, "Keypad Binary" }, - { Keycode.KP_OCTAL, "Keypad Octal" }, - { Keycode.KP_DECIMAL, "Keypad Decimal" }, - { Keycode.KP_HEXADECIMAL, "Keypad Hexadecimal" }, - { Keycode.LCTRL, "Left Ctrl" }, - { Keycode.LSHIFT, "Left Shift" }, - { Keycode.LALT, "Left Alt" }, - { Keycode.LGUI, "Left GUI" }, - { Keycode.RCTRL, "Right Ctrl" }, - { Keycode.RSHIFT, "Right Shift" }, - { Keycode.RALT, "Right Alt" }, - { Keycode.RGUI, "Right GUI" }, - { Keycode.MODE, "ModeSwitch" }, - { Keycode.AUDIONEXT, "AudioNext" }, - { Keycode.AUDIOPREV, "AudioPrev" }, - { Keycode.AUDIOSTOP, "AudioStop" }, - { Keycode.AUDIOPLAY, "AudioPlay" }, - { Keycode.AUDIOMUTE, "AudioMute" }, - { Keycode.MEDIASELECT, "MediaSelect" }, - { Keycode.WWW, "WWW" }, - { Keycode.MAIL, "Mail" }, - { Keycode.CALCULATOR, "Calculator" }, - { Keycode.COMPUTER, "Computer" }, - { Keycode.AC_SEARCH, "AC Search" }, - { Keycode.AC_HOME, "AC Home" }, - { Keycode.AC_BACK, "AC Back" }, - { Keycode.AC_FORWARD, "AC Forward" }, - { Keycode.AC_STOP, "AC Stop" }, - { Keycode.AC_REFRESH, "AC Refresh" }, - { Keycode.AC_BOOKMARKS, "AC Bookmarks" }, - { Keycode.BRIGHTNESSDOWN, "BrightnessDown" }, - { Keycode.BRIGHTNESSUP, "BrightnessUp" }, - { Keycode.DISPLAYSWITCH, "DisplaySwitch" }, - { Keycode.KBDILLUMTOGGLE, "KBDIllumToggle" }, - { Keycode.KBDILLUMDOWN, "KBDIllumDown" }, - { Keycode.KBDILLUMUP, "KBDIllumUp" }, - { Keycode.EJECT, "Eject" }, - { Keycode.SLEEP, "Sleep" }, - { Keycode.MOUSE4, "Mouse 4" }, - { Keycode.MOUSE5, "Mouse 5" }, + { Keycode.UNKNOWN, "keycode.unknown" }, + { Keycode.RETURN, "keycode.return" }, + { Keycode.ESCAPE, "keycode.escape" }, + { Keycode.BACKSPACE, "keycode.backspace" }, + { Keycode.TAB, "keycode.tab" }, + { Keycode.SPACE, "keycode.space" }, + { Keycode.EXCLAIM, "keycode.exclaim" }, + { Keycode.QUOTEDBL, "keycode.quotedbl" }, + { Keycode.HASH, "keycode.hash" }, + { Keycode.PERCENT, "keycode.percent" }, + { Keycode.DOLLAR, "keycode.dollar" }, + { Keycode.AMPERSAND, "keycode.ampersand" }, + { Keycode.QUOTE, "keycode.quote" }, + { Keycode.LEFTPAREN, "keycode.leftparen" }, + { Keycode.RIGHTPAREN, "keycode.rightparen" }, + { Keycode.ASTERISK, "keycode.asterisk" }, + { Keycode.PLUS, "keycode.plus" }, + { Keycode.COMMA, "keycode.comma" }, + { Keycode.MINUS, "keycode.minus" }, + { Keycode.PERIOD, "keycode.period" }, + { Keycode.SLASH, "keycode.slash" }, + { Keycode.NUMBER_0, "keycode.number_0" }, + { Keycode.NUMBER_1, "keycode.number_1" }, + { Keycode.NUMBER_2, "keycode.number_2" }, + { Keycode.NUMBER_3, "keycode.number_3" }, + { Keycode.NUMBER_4, "keycode.number_4" }, + { Keycode.NUMBER_5, "keycode.number_5" }, + { Keycode.NUMBER_6, "keycode.number_6" }, + { Keycode.NUMBER_7, "keycode.number_7" }, + { Keycode.NUMBER_8, "keycode.number_8" }, + { Keycode.NUMBER_9, "keycode.number_9" }, + { Keycode.COLON, "keycode.colon" }, + { Keycode.SEMICOLON, "keycode.semicolon" }, + { Keycode.LESS, "keycode.less" }, + { Keycode.EQUALS, "keycode.equals" }, + { Keycode.GREATER, "keycode.greater" }, + { Keycode.QUESTION, "keycode.question" }, + { Keycode.AT, "keycode.at" }, + { Keycode.LEFTBRACKET, "keycode.leftbracket" }, + { Keycode.BACKSLASH, "keycode.backslash" }, + { Keycode.RIGHTBRACKET, "keycode.rightbracket" }, + { Keycode.CARET, "keycode.caret" }, + { Keycode.UNDERSCORE, "keycode.underscore" }, + { Keycode.BACKQUOTE, "keycode.backquote" }, + { Keycode.A, "keycode.a" }, + { Keycode.B, "keycode.b" }, + { Keycode.C, "keycode.c" }, + { Keycode.D, "keycode.d" }, + { Keycode.E, "keycode.e" }, + { Keycode.F, "keycode.f" }, + { Keycode.G, "keycode.g" }, + { Keycode.H, "keycode.h" }, + { Keycode.I, "keycode.i" }, + { Keycode.J, "keycode.j" }, + { Keycode.K, "keycode.k" }, + { Keycode.L, "keycode.l" }, + { Keycode.M, "keycode.m" }, + { Keycode.N, "keycode.n" }, + { Keycode.O, "keycode.o" }, + { Keycode.P, "keycode.p" }, + { Keycode.Q, "keycode.q" }, + { Keycode.R, "keycode.r" }, + { Keycode.S, "keycode.s" }, + { Keycode.T, "keycode.t" }, + { Keycode.U, "keycode.u" }, + { Keycode.V, "keycode.v" }, + { Keycode.W, "keycode.w" }, + { Keycode.X, "keycode.x" }, + { Keycode.Y, "keycode.y" }, + { Keycode.Z, "keycode.z" }, + { Keycode.CAPSLOCK, "keycode.capslock" }, + { Keycode.F1, "keycode.f1" }, + { Keycode.F2, "keycode.f2" }, + { Keycode.F3, "keycode.f3" }, + { Keycode.F4, "keycode.f4" }, + { Keycode.F5, "keycode.f5" }, + { Keycode.F6, "keycode.f6" }, + { Keycode.F7, "keycode.f7" }, + { Keycode.F8, "keycode.f8" }, + { Keycode.F9, "keycode.f9" }, + { Keycode.F10, "keycode.f10" }, + { Keycode.F11, "keycode.f11" }, + { Keycode.F12, "keycode.f12" }, + { Keycode.PRINTSCREEN, "keycode.printscreen" }, + { Keycode.SCROLLLOCK, "keycode.scrolllock" }, + { Keycode.PAUSE, "keycode.pause" }, + { Keycode.INSERT, "keycode.insert" }, + { Keycode.HOME, "keycode.home" }, + { Keycode.PAGEUP, "keycode.pageup" }, + { Keycode.DELETE, "keycode.delete" }, + { Keycode.END, "keycode.end" }, + { Keycode.PAGEDOWN, "keycode.pagedown" }, + { Keycode.RIGHT, "keycode.right" }, + { Keycode.LEFT, "keycode.left" }, + { Keycode.DOWN, "keycode.down" }, + { Keycode.UP, "keycode.up" }, + { Keycode.NUMLOCKCLEAR, "keycode.numlockclear" }, + { Keycode.KP_DIVIDE, "keycode.kp_divide" }, + { Keycode.KP_MULTIPLY, "keycode.kp_multiply" }, + { Keycode.KP_MINUS, "keycode.kp_minus" }, + { Keycode.KP_PLUS, "keycode.kp_plus" }, + { Keycode.KP_ENTER, "keycode.kp_enter" }, + { Keycode.KP_1, "keycode.kp_1" }, + { Keycode.KP_2, "keycode.kp_2" }, + { Keycode.KP_3, "keycode.kp_3" }, + { Keycode.KP_4, "keycode.kp_4" }, + { Keycode.KP_5, "keycode.kp_5" }, + { Keycode.KP_6, "keycode.kp_6" }, + { Keycode.KP_7, "keycode.kp_7" }, + { Keycode.KP_8, "keycode.kp_8" }, + { Keycode.KP_9, "keycode.kp_9" }, + { Keycode.KP_0, "keycode.kp_0" }, + { Keycode.KP_PERIOD, "keycode.kp_period" }, + { Keycode.APPLICATION, "keycode.application" }, + { Keycode.POWER, "keycode.power" }, + { Keycode.KP_EQUALS, "keycode.kp_equals" }, + { Keycode.F13, "keycode.f13" }, + { Keycode.F14, "keycode.f14" }, + { Keycode.F15, "keycode.f15" }, + { Keycode.F16, "keycode.f16" }, + { Keycode.F17, "keycode.f17" }, + { Keycode.F18, "keycode.f18" }, + { Keycode.F19, "keycode.f19" }, + { Keycode.F20, "keycode.f20" }, + { Keycode.F21, "keycode.f21" }, + { Keycode.F22, "keycode.f22" }, + { Keycode.F23, "keycode.f23" }, + { Keycode.F24, "keycode.f24" }, + { Keycode.EXECUTE, "keycode.execute" }, + { Keycode.HELP, "keycode.help" }, + { Keycode.MENU, "keycode.menu" }, + { Keycode.SELECT, "keycode.select" }, + { Keycode.STOP, "keycode.stop" }, + { Keycode.AGAIN, "keycode.again" }, + { Keycode.UNDO, "keycode.undo" }, + { Keycode.CUT, "keycode.cut" }, + { Keycode.COPY, "keycode.copy" }, + { Keycode.PASTE, "keycode.paste" }, + { Keycode.FIND, "keycode.find" }, + { Keycode.MUTE, "keycode.mute" }, + { Keycode.VOLUMEUP, "keycode.volumeup" }, + { Keycode.VOLUMEDOWN, "keycode.volumedown" }, + { Keycode.KP_COMMA, "keycode.kp_comma" }, + { Keycode.KP_EQUALSAS400, "keycode.kp_equalsas400" }, + { Keycode.ALTERASE, "keycode.alterase" }, + { Keycode.SYSREQ, "keycode.sysreq" }, + { Keycode.CANCEL, "keycode.cancel" }, + { Keycode.CLEAR, "keycode.clear" }, + { Keycode.PRIOR, "keycode.prior" }, + { Keycode.RETURN2, "keycode.return2" }, + { Keycode.SEPARATOR, "keycode.separator" }, + { Keycode.OUT, "keycode.out" }, + { Keycode.OPER, "keycode.oper" }, + { Keycode.CLEARAGAIN, "keycode.clearagain" }, + { Keycode.CRSEL, "keycode.crsel" }, + { Keycode.EXSEL, "keycode.exsel" }, + { Keycode.KP_00, "keycode.kp_00" }, + { Keycode.KP_000, "keycode.kp_000" }, + { Keycode.THOUSANDSSEPARATOR, "keycode.thousandsseparator" }, + { Keycode.DECIMALSEPARATOR, "keycode.decimalseparator" }, + { Keycode.CURRENCYUNIT, "keycode.currencyunit" }, + { Keycode.CURRENCYSUBUNIT, "keycode.currencysubunit" }, + { Keycode.KP_LEFTPAREN, "keycode.kp_leftparen" }, + { Keycode.KP_RIGHTPAREN, "keycode.kp_rightparen" }, + { Keycode.KP_LEFTBRACE, "keycode.kp_leftbrace" }, + { Keycode.KP_RIGHTBRACE, "keycode.kp_rightbrace" }, + { Keycode.KP_TAB, "keycode.kp_tab" }, + { Keycode.KP_BACKSPACE, "keycode.kp_backspace" }, + { Keycode.KP_A, "keycode.kp_a" }, + { Keycode.KP_B, "keycode.kp_b" }, + { Keycode.KP_C, "keycode.kp_c" }, + { Keycode.KP_D, "keycode.kp_d" }, + { Keycode.KP_E, "keycode.kp_e" }, + { Keycode.KP_F, "keycode.kp_f" }, + { Keycode.KP_XOR, "keycode.kp_xor" }, + { Keycode.KP_POWER, "keycode.kp_power" }, + { Keycode.KP_PERCENT, "keycode.kp_percent" }, + { Keycode.KP_LESS, "keycode.kp_less" }, + { Keycode.KP_GREATER, "keycode.kp_greater" }, + { Keycode.KP_AMPERSAND, "keycode.kp_ampersand" }, + { Keycode.KP_DBLAMPERSAND, "keycode.kp_dblampersand" }, + { Keycode.KP_VERTICALBAR, "keycode.kp_verticalbar" }, + { Keycode.KP_DBLVERTICALBAR, "keycode.kp_dblverticalbar" }, + { Keycode.KP_COLON, "keycode.kp_colon" }, + { Keycode.KP_HASH, "keycode.kp_hash" }, + { Keycode.KP_SPACE, "keycode.kp_space" }, + { Keycode.KP_AT, "keycode.kp_at" }, + { Keycode.KP_EXCLAM, "keycode.kp_exclam" }, + { Keycode.KP_MEMSTORE, "keycode.kp_memstore" }, + { Keycode.KP_MEMRECALL, "keycode.kp_memrecall" }, + { Keycode.KP_MEMCLEAR, "keycode.kp_memclear" }, + { Keycode.KP_MEMADD, "keycode.kp_memadd" }, + { Keycode.KP_MEMSUBTRACT, "keycode.kp_memsubtract" }, + { Keycode.KP_MEMMULTIPLY, "keycode.kp_memmultiply" }, + { Keycode.KP_MEMDIVIDE, "keycode.kp_memdivide" }, + { Keycode.KP_PLUSMINUS, "keycode.kp_plusminus" }, + { Keycode.KP_CLEAR, "keycode.kp_clear" }, + { Keycode.KP_CLEARENTRY, "keycode.kp_clearentry" }, + { Keycode.KP_BINARY, "keycode.kp_binary" }, + { Keycode.KP_OCTAL, "keycode.kp_octal" }, + { Keycode.KP_DECIMAL, "keycode.kp_decimal" }, + { Keycode.KP_HEXADECIMAL, "keycode.kp_hexadecimal" }, + { Keycode.LCTRL, "keycode.lctrl" }, + { Keycode.LSHIFT, "keycode.lshift" }, + { Keycode.LALT, "keycode.lalt" }, + { Keycode.LGUI, "keycode.lgui" }, + { Keycode.RCTRL, "keycode.rctrl" }, + { Keycode.RSHIFT, "keycode.rshift" }, + { Keycode.RALT, "keycode.ralt" }, + { Keycode.RGUI, "keycode.rgui" }, + { Keycode.MODE, "keycode.mode" }, + { Keycode.AUDIONEXT, "keycode.audionext" }, + { Keycode.AUDIOPREV, "keycode.audioprev" }, + { Keycode.AUDIOSTOP, "keycode.audiostop" }, + { Keycode.AUDIOPLAY, "keycode.audioplay" }, + { Keycode.AUDIOMUTE, "keycode.audiomute" }, + { Keycode.MEDIASELECT, "keycode.mediaselect" }, + { Keycode.WWW, "keycode.www" }, + { Keycode.MAIL, "keycode.mail" }, + { Keycode.CALCULATOR, "keycode.calculator" }, + { Keycode.COMPUTER, "keycode.computer" }, + { Keycode.AC_SEARCH, "keycode.ac_search" }, + { Keycode.AC_HOME, "keycode.ac_home" }, + { Keycode.AC_BACK, "keycode.ac_back" }, + { Keycode.AC_FORWARD, "keycode.ac_forward" }, + { Keycode.AC_STOP, "keycode.ac_stop" }, + { Keycode.AC_REFRESH, "keycode.ac_refresh" }, + { Keycode.AC_BOOKMARKS, "keycode.ac_bookmarks" }, + { Keycode.BRIGHTNESSDOWN, "keycode.brightnessdown" }, + { Keycode.BRIGHTNESSUP, "keycode.brightnessup" }, + { Keycode.DISPLAYSWITCH, "keycode.displayswitch" }, + { Keycode.KBDILLUMTOGGLE, "keycode.kbdillumtoggle" }, + { Keycode.KBDILLUMDOWN, "keycode.kbdillumdown" }, + { Keycode.KBDILLUMUP, "keycode.kbdillumup" }, + { Keycode.EJECT, "keycode.eject" }, + { Keycode.SLEEP, "keycode.sleep" }, + { Keycode.MOUSE4, "keycode.mouse4" }, + { Keycode.MOUSE5, "keycode.mouse5" }, }; public static string DisplayString(Keycode k) { - if (!KeyNames.TryGetValue(k, out var ret)) + if (!KeycodeFluentKeys.TryGetValue(k, out var fluentKey)) return k.ToString(); - return ret; + return FluentProvider.GetString(fluentKey); } } } diff --git a/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs b/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs index 599dce9a70..af27b00a45 100644 --- a/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs +++ b/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs @@ -21,6 +21,7 @@ using OpenRA.Mods.Common.Scripting; using OpenRA.Mods.Common.Scripting.Global; using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Warheads; +using OpenRA.Mods.Common.Widgets.Logic; using OpenRA.Scripting; using OpenRA.Traits; using OpenRA.Widgets; @@ -249,7 +250,7 @@ namespace OpenRA.Mods.Common.Lint testedFields.AddRange( modData.ObjectCreator.GetTypes() .Where(t => t.IsSubclassOf(typeof(TraitInfo)) || t.IsSubclassOf(typeof(Warhead))) - .SelectMany(t => t.GetFields().Where(f => f.HasAttribute()))); + .SelectMany(t => Utility.GetFields(t).Where(Utility.HasAttribute))); // TODO: linter does not work with LoadUsing GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( @@ -278,6 +279,36 @@ namespace OpenRA.Mods.Common.Lint GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( usedKeys, testedFields, Utility.GetFields(typeof(ModContent.ModPackage)), modContent.Packages.Values); + GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( + usedKeys, testedFields, Utility.GetFields(typeof(HotkeyDefinition)), modData.Hotkeys.Definitions); + + // All keycodes and modifiers should be marked as used, as they can all be configured for use at hotkeys at runtime. + GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( + usedKeys, testedFields, Utility.GetFields(typeof(KeycodeExts)).Concat(Utility.GetFields(typeof(ModifiersExts))), new[] { (object)null }); + + foreach (var filename in modData.Manifest.ChromeLayout) + CheckHotkeysSettingsLogic(usedKeys, MiniYaml.FromStream(modData.DefaultFileSystem.Open(filename), filename)); + + static void CheckHotkeysSettingsLogic(Keys usedKeys, IEnumerable nodes) + { + foreach (var node in nodes) + { + if (node.Value.Nodes != null) + CheckHotkeysSettingsLogic(usedKeys, node.Value.Nodes); + + if (node.Key != "Logic" || node?.Value.Value != "HotkeysSettingsLogic") + continue; + + var hotkeyGroupsNode = node.Value.NodeWithKeyOrDefault("HotkeyGroups"); + if (hotkeyGroupsNode == null) + continue; + + var hotkeyGroupsKeys = hotkeyGroupsNode?.Value.Nodes.Select(n => n.Key); + foreach (var key in hotkeyGroupsKeys) + usedKeys.Add(key, new FluentReferenceAttribute(), $"`{nameof(HotkeysSettingsLogic)}.HotkeyGroups`"); + } + } + return (usedKeys, testedFields); } diff --git a/OpenRA.Mods.Common/Lint/LintExts.cs b/OpenRA.Mods.Common/Lint/LintExts.cs index 728713fb35..81c056fe89 100644 --- a/OpenRA.Mods.Common/Lint/LintExts.cs +++ b/OpenRA.Mods.Common/Lint/LintExts.cs @@ -37,7 +37,9 @@ namespace OpenRA.Mods.Common.Lint return expr != null ? expr.Variables : Enumerable.Empty(); } - if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>)) + if (type.IsGenericType && + (type.GetGenericTypeDefinition() == typeof(Dictionary<,>) || + type.GetGenericTypeDefinition() == typeof(IReadOnlyDictionary<,>))) { // Use an intermediate list to cover the unlikely case where both keys and values are lintable. var dictionaryValues = new List(); @@ -60,6 +62,9 @@ namespace OpenRA.Mods.Common.Lint "Dictionary (LintDictionaryReference.Keys)", "Dictionary (LintDictionaryReference.Values)", "Dictionary> (LintDictionaryReference.Values)", + "IReadOnlyDictionary (LintDictionaryReference.Keys)", + "IReadOnlyDictionary (LintDictionaryReference.Values)", + "IReadOnlyDictionary> (LintDictionaryReference.Values)", "BooleanExpression", "IntegerExpression" }; diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractChromeStrings.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractChromeStrings.cs index 620286e73c..3811fcbd38 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractChromeStrings.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractChromeStrings.cs @@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.UtilityCommands .Where(t => t.Name.EndsWith("Widget", StringComparison.InvariantCulture) && t.IsSubclassOf(typeof(Widget))) .ToDictionary( t => t.Name[..^6], - t => t.GetFields().Where(f => f.HasAttribute()).Select(f => f.Name).ToArray()) + t => Utility.GetFields(t).Where(Utility.HasAttribute).Select(f => f.Name).ToArray()) .Where(t => t.Value.Length > 0) .ToDictionary(t => t.Key, t => t.Value); diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractYamlStrings.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractYamlStrings.cs index 2957a9d311..446981187b 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractYamlStrings.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractYamlStrings.cs @@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.UtilityCommands .Where(t => t.Name.EndsWith("Info", StringComparison.InvariantCulture) && t.IsSubclassOf(typeof(TraitInfo))) .ToDictionary( t => t.Name[..^4], - t => t.GetFields().Where(f => f.HasAttribute()).Select(f => f.Name).ToArray()) + t => Utility.GetFields(t).Where(Utility.HasAttribute).Select(f => f.Name).ToArray()) .Where(t => t.Value.Length > 0) .ToDictionary(t => t.Key, t => t.Value); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Settings/HotkeysSettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Settings/HotkeysSettingsLogic.cs index a0838955b0..4b66fb496a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Settings/HotkeysSettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Settings/HotkeysSettingsLogic.cs @@ -25,6 +25,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic [FluentReference("key", "context")] const string DuplicateNotice = "label-duplicate-notice"; + [FluentReference] + const string AnyContext = "hotkey-context-any"; + readonly ModData modData; readonly Dictionary logicArgs; @@ -37,8 +40,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic bool isHotkeyValid; bool isHotkeyDefault; - string currentContext = "Any"; - readonly HashSet contexts = new() { "Any" }; + string currentContext = AnyContext; + readonly HashSet contexts = new() { AnyContext }; readonly Dictionary> hotkeyGroups = new(); TextFieldWidget filterInput; @@ -66,7 +69,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic key.Id = hd.Name; key.IsVisible = () => true; - key.Get("FUNCTION").GetText = () => hd.Description + ":"; + var desc = FluentProvider.GetString(hd.Description) + ":"; + key.Get("FUNCTION").GetText = () => desc; var remapButton = key.Get("HOTKEY"); WidgetUtils.TruncateButtonToTooltip(remapButton, modData.Hotkeys[hd.Name].GetValue().DisplayString()); @@ -192,7 +196,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic continue; var header = headerTemplate.Clone(); - header.Get("LABEL").GetText = () => hg.Key; + var groupName = FluentProvider.GetString(hg.Key); + header.Get("LABEL").GetText = () => groupName; hotkeyList.AddChild(header); var added = new HashSet(); @@ -220,7 +225,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic void InitHotkeyRemapDialog(Widget panel) { var label = panel.Get("HOTKEY_LABEL"); - var labelText = new CachedTransform(hd => hd?.Description + ":"); + var labelText = new CachedTransform( + hd => (hd != null ? FluentProvider.GetString(hd.Description) : "") + ":"); label.IsVisible = () => selectedHotkeyDefinition != null; label.GetText = () => labelText.Update(selectedHotkeyDefinition); @@ -228,10 +234,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic duplicateNotice.TextColor = ChromeMetrics.Get("NoticeErrorColor"); duplicateNotice.IsVisible = () => !isHotkeyValid; var duplicateNoticeText = new CachedTransform(hd => - hd != null ? - FluentProvider.GetString(DuplicateNotice, - "key", hd.Description, - "context", hd.Contexts.First(c => selectedHotkeyDefinition.Contexts.Contains(c))) : ""); + hd != null + ? FluentProvider.GetString( + DuplicateNotice, + "key", FluentProvider.GetString(hd.Description), + "context", FluentProvider.GetString(hd.Contexts.First(c => selectedHotkeyDefinition.Contexts.Contains(c)))) + : ""); duplicateNotice.GetText = () => duplicateNoticeText.Update(duplicateHotkeyDefinition); var originalNotice = panel.Get("ORIGINAL_NOTICE"); @@ -328,8 +336,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var filter = filterInput.Text; var isFilteredByName = string.IsNullOrWhiteSpace(filter) || - hd.Description.Contains(filter, StringComparison.CurrentCultureIgnoreCase); - var isFilteredByContext = currentContext == "Any" || hd.Contexts.Contains(currentContext); + FluentProvider.GetString(hd.Description).Contains(filter, StringComparison.CurrentCultureIgnoreCase); + var isFilteredByContext = currentContext == AnyContext || hd.Contexts.Contains(currentContext); return isFilteredByName && isFilteredByContext; } @@ -357,9 +365,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic static string GetContextDisplayName(string context) { if (string.IsNullOrEmpty(context)) - return "Any"; + context = AnyContext; - return context; + return FluentProvider.GetString(context); } } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Settings/InputSettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Settings/InputSettingsLogic.cs index 54cb3c8e1f..851f0a5d63 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Settings/InputSettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Settings/InputSettingsLogic.cs @@ -36,21 +36,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic [FluentReference] const string Joystick = "options-mouse-scroll-type.joystick"; - [FluentReference] - const string Alt = "options-zoom-modifier.alt"; - - [FluentReference] - const string Ctrl = "options-zoom-modifier.ctrl"; - - [FluentReference] - const string Meta = "options-zoom-modifier.meta"; - - [FluentReference] - const string Shift = "options-zoom-modifier.shift"; - - [FluentReference] - const string None = "options-zoom-modifier.none"; - static InputSettingsLogic() { } readonly string classic; @@ -205,11 +190,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var options = new Dictionary() { - { FluentProvider.GetString(Alt), Modifiers.Alt }, - { FluentProvider.GetString(Ctrl), Modifiers.Ctrl }, - { FluentProvider.GetString(Meta), Modifiers.Meta }, - { FluentProvider.GetString(Shift), Modifiers.Shift }, - { FluentProvider.GetString(None), Modifiers.None } + { ModifiersExts.DisplayString(Modifiers.Alt), Modifiers.Alt }, + { ModifiersExts.DisplayString(Modifiers.Ctrl), Modifiers.Ctrl }, + { ModifiersExts.DisplayString(Modifiers.Meta), Modifiers.Meta }, + { ModifiersExts.DisplayString(Modifiers.Shift), Modifiers.Shift }, + { ModifiersExts.DisplayString(Modifiers.None), Modifiers.None } }; ScrollItemWidget SetupItem(string o, ScrollItemWidget itemTemplate) diff --git a/mods/cnc/chrome/settings-hotkeys.yaml b/mods/cnc/chrome/settings-hotkeys.yaml index 6fd5c77fcf..75a7675b5e 100644 --- a/mods/cnc/chrome/settings-hotkeys.yaml +++ b/mods/cnc/chrome/settings-hotkeys.yaml @@ -1,27 +1,27 @@ Container@HOTKEYS_PANEL: Logic: HotkeysSettingsLogic HotkeyGroups: - Game Commands: + hotkey-group-game-commands: Types: OrderGenerator, World, Menu - Viewport Commands: + hotkey-group-viewport-commands: Types: Viewport - Observer / Replay Commands: + hotkey-group-observer-replay-commands: Types: Observer, Replay - Unit Commands: + hotkey-group-unit-commands: Types: Unit - Unit Stance Commands: + hotkey-group-unit-stance-commands: Types: Stance - Production Commands: + hotkey-group-production-commands: Types: Production, ProductionSlot - Support Power Commands: + hotkey-group-support-power-commands: Types: SupportPower - Music Commands: + hotkey-group-music-commands: Types: Music - Chat Commands: + hotkey-group-chat-commands: Types: Chat - Control Groups: + hotkey-group-control-groups: Types: ControlGroups - Editor Commands: + hotkey-group-editor-commands: Types: Editor Width: PARENT_WIDTH Height: PARENT_HEIGHT diff --git a/mods/cnc/hotkeys.yaml b/mods/cnc/hotkeys.yaml index 57ddd8fc38..137774c0a0 100644 --- a/mods/cnc/hotkeys.yaml +++ b/mods/cnc/hotkeys.yaml @@ -1,24 +1,34 @@ -ProductionTypeBuilding: E - Description: Building Tab +NextProductionTab: PAGEDOWN + Description: hotkey-description-NextProductionTab Types: Production - Contexts: Player + Contexts: hotkey-context-player + +PreviousProductionTab: PAGEUP + Description: hotkey-description-PreviousProductionTab + Types: Production + Contexts: hotkey-context-player + +ProductionTypeBuilding: E + Description: hotkey-description-ProductionTypeBuilding + Types: Production + Contexts: hotkey-context-player ProductionTypeDefense: R - Description: Defense Tab + Description: hotkey-description-ProductionTypeDefense Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeInfantry: T - Description: Infantry Tab + Description: hotkey-description-ProductionTypeInfantry Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeVehicle: Y - Description: Vehicle Tab + Description: hotkey-description-ProductionTypeVehicle Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeAircraft: U - Description: Aircraft Tab + Description: hotkey-description-ProductionTypeAircraft Types: Production - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/cnc/languages/chrome/en.ftl b/mods/cnc/languages/chrome/en.ftl index 972802c71a..d317f6ea08 100644 --- a/mods/cnc/languages/chrome/en.ftl +++ b/mods/cnc/languages/chrome/en.ftl @@ -670,6 +670,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. diff --git a/mods/cnc/languages/hotkeys/en.ftl b/mods/cnc/languages/hotkeys/en.ftl new file mode 100644 index 0000000000..d528e8b5ac --- /dev/null +++ b/mods/cnc/languages/hotkeys/en.ftl @@ -0,0 +1,8 @@ +## hotkeys.yaml +hotkey-description-NextProductionTab = Next tab +hotkey-description-PreviousProductionTab = Previous tab +hotkey-description-ProductionTypeBuilding = Building Tab +hotkey-description-ProductionTypeDefense = Defense Tab +hotkey-description-ProductionTypeInfantry = Infantry Tab +hotkey-description-ProductionTypeVehicle = Vehicle Tab +hotkey-description-ProductionTypeAircraft = Aircraft Tab diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index a86ed70651..87fd069f0c 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -145,9 +145,11 @@ ChromeLayout: Translations: common|languages/en.ftl + common|languages/hotkeys/en.ftl common|languages/rules/en.ftl cnc|languages/en.ftl cnc|languages/chrome/en.ftl + cnc|languages/hotkeys/en.ftl cnc|languages/rules/en.ftl AllowUnusedTranslationsInExternalPackages: false @@ -165,7 +167,6 @@ Hotkeys: common|hotkeys/game.yaml common|hotkeys/observer.yaml common|hotkeys/production-common.yaml - common|hotkeys/production-peractor.yaml common|hotkeys/supportpowers.yaml common|hotkeys/viewport.yaml common|hotkeys/chat.yaml diff --git a/mods/common/chrome/settings-hotkeys.yaml b/mods/common/chrome/settings-hotkeys.yaml index 2b4d318e77..18aa53672f 100644 --- a/mods/common/chrome/settings-hotkeys.yaml +++ b/mods/common/chrome/settings-hotkeys.yaml @@ -1,27 +1,27 @@ Container@HOTKEYS_PANEL: Logic: HotkeysSettingsLogic HotkeyGroups: - Game Commands: + hotkey-group-game-commands: Types: OrderGenerator, World, Menu - Viewport Commands: + hotkey-group-viewport-commands: Types: Viewport - Observer / Replay Commands: + hotkey-group-observer-replay-commands: Types: Observer, Replay - Unit Commands: + hotkey-group-unit-commands: Types: Unit - Unit Stance Commands: + hotkey-group-unit-stance-commands: Types: Stance - Production Commands: + hotkey-group-production-commands: Types: Production, ProductionSlot - Support Power Commands: + hotkey-group-support-power-commands: Types: SupportPower - Music Commands: + hotkey-group-music-commands: Types: Music - Chat Commands: + hotkey-group-chat-commands: Types: Chat - Control Groups: + hotkey-group-control-groups: Types: ControlGroups - Editor Commands: + hotkey-group-editor-commands: Types: Editor Width: PARENT_WIDTH Height: PARENT_HEIGHT diff --git a/mods/common/hotkeys/chat.yaml b/mods/common/hotkeys/chat.yaml index c02d3c34a2..df6c82a0ad 100644 --- a/mods/common/hotkeys/chat.yaml +++ b/mods/common/hotkeys/chat.yaml @@ -1,21 +1,21 @@ OpenTeamChat: Return - Description: Open Team Chat + Description: hotkey-description-OpenTeamChat Types: Chat - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator OpenGeneralChat: Return Shift - Description: Open General Chat + Description: hotkey-description-OpenGeneralChat Types: Chat - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator ToggleChatMode: Tab Shift - Description: Toggle Chat Mode + Description: hotkey-description-ToggleChatMode Types: Chat - Contexts: Chat Input, Menu + Contexts: hotkey-context-chat-input, hotkey-context-menu Readonly: True Autocomplete: Tab - Description: Autocomplete + Description: hotkey-description-Autocomplete Types: Chat - Contexts: Chat Input + Contexts: hotkey-context-chat-input Readonly: True diff --git a/mods/common/hotkeys/control-groups.yaml b/mods/common/hotkeys/control-groups.yaml index b3f8399b45..9a40b23df8 100644 --- a/mods/common/hotkeys/control-groups.yaml +++ b/mods/common/hotkeys/control-groups.yaml @@ -1,294 +1,294 @@ ControlGroupSelect01: NUMBER_1 - Description: Select group 1 + Description: hotkey-description-ControlGroupSelect01 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect02: NUMBER_2 - Description: Select group 2 + Description: hotkey-description-ControlGroupSelect02 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect03: NUMBER_3 - Description: Select group 3 + Description: hotkey-description-ControlGroupSelect03 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect04: NUMBER_4 - Description: Select group 4 + Description: hotkey-description-ControlGroupSelect04 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect05: NUMBER_5 - Description: Select group 5 + Description: hotkey-description-ControlGroupSelect05 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect06: NUMBER_6 - Description: Select group 6 + Description: hotkey-description-ControlGroupSelect06 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect07: NUMBER_7 - Description: Select group 7 + Description: hotkey-description-ControlGroupSelect07 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect08: NUMBER_8 - Description: Select group 8 + Description: hotkey-description-ControlGroupSelect08 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect09: NUMBER_9 - Description: Select group 9 + Description: hotkey-description-ControlGroupSelect09 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupSelect10: NUMBER_0 - Description: Select group 0 + Description: hotkey-description-ControlGroupSelect10 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCreate01: NUMBER_1 Ctrl - Description: Create group 1 + Description: hotkey-description-ControlGroupCreate01 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_1 Meta ControlGroupCreate02: NUMBER_2 Ctrl - Description: Create group 2 + Description: hotkey-description-ControlGroupCreate02 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_2 Meta ControlGroupCreate03: NUMBER_3 Ctrl - Description: Create group 3 + Description: hotkey-description-ControlGroupCreate03 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_3 Meta ControlGroupCreate04: NUMBER_4 Ctrl - Description: Create group 4 + Description: hotkey-description-ControlGroupCreate04 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_4 Meta ControlGroupCreate05: NUMBER_5 Ctrl - Description: Create group 5 + Description: hotkey-description-ControlGroupCreate05 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_5 Meta ControlGroupCreate06: NUMBER_6 Ctrl - Description: Create group 6 + Description: hotkey-description-ControlGroupCreate06 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_6 Meta ControlGroupCreate07: NUMBER_7 Ctrl - Description: Create group 7 + Description: hotkey-description-ControlGroupCreate07 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_7 Meta ControlGroupCreate08: NUMBER_8 Ctrl - Description: Create group 8 + Description: hotkey-description-ControlGroupCreate08 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_8 Meta ControlGroupCreate09: NUMBER_9 Ctrl - Description: Create group 9 + Description: hotkey-description-ControlGroupCreate09 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_9 Meta ControlGroupCreate10: NUMBER_0 Ctrl - Description: Create group 0 + Description: hotkey-description-ControlGroupCreate10 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_0 Meta ControlGroupAddTo01: NUMBER_1 Ctrl, Shift - Description: Add to group 1 + Description: hotkey-description-ControlGroupAddTo01 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_1 Meta, Shift ControlGroupAddTo02: NUMBER_2 Ctrl, Shift - Description: Add to group 2 + Description: hotkey-description-ControlGroupAddTo02 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_2 Meta, Shift ControlGroupAddTo03: NUMBER_3 Ctrl, Shift - Description: Add to group 3 + Description: hotkey-description-ControlGroupAddTo03 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_3 Meta, Shift ControlGroupAddTo04: NUMBER_4 Ctrl, Shift - Description: Add to group 4 + Description: hotkey-description-ControlGroupAddTo04 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_4 Meta, Shift ControlGroupAddTo05: NUMBER_5 Ctrl, Shift - Description: Add to group 5 + Description: hotkey-description-ControlGroupAddTo05 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_5 Meta, Shift ControlGroupAddTo06: NUMBER_6 Ctrl, Shift - Description: Add to group 6 + Description: hotkey-description-ControlGroupAddTo06 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_6 Meta, Shift ControlGroupAddTo07: NUMBER_7 Ctrl, Shift - Description: Add to group 7 + Description: hotkey-description-ControlGroupAddTo07 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_7 Meta, Shift ControlGroupAddTo08: NUMBER_8 Ctrl, Shift - Description: Add to group 8 + Description: hotkey-description-ControlGroupAddTo08 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_8 Meta, Shift ControlGroupAddTo09: NUMBER_9 Ctrl, Shift - Description: Add to group 9 + Description: hotkey-description-ControlGroupAddTo09 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_9 Meta, Shift ControlGroupAddTo10: NUMBER_0 Ctrl, Shift - Description: Add to group 0 + Description: hotkey-description-ControlGroupAddTo10 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player Platform: OSX: NUMBER_0 Meta, Shift ControlGroupCombineWith01: NUMBER_1 Shift - Description: Combine with group 1 + Description: hotkey-description-ControlGroupCombineWith01 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith02: NUMBER_2 Shift - Description: Combine with group 2 + Description: hotkey-description-ControlGroupCombineWith02 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith03: NUMBER_3 Shift - Description: Combine with group 3 + Description: hotkey-description-ControlGroupCombineWith03 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith04: NUMBER_4 Shift - Description: Combine with group 4 + Description: hotkey-description-ControlGroupCombineWith04 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith05: NUMBER_5 Shift - Description: Combine with group 5 + Description: hotkey-description-ControlGroupCombineWith05 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith06: NUMBER_6 Shift - Description: Combine with group 6 + Description: hotkey-description-ControlGroupCombineWith06 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith07: NUMBER_7 Shift - Description: Combine with group 7 + Description: hotkey-description-ControlGroupCombineWith07 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith08: NUMBER_8 Shift - Description: Combine with group 8 + Description: hotkey-description-ControlGroupCombineWith08 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith09: NUMBER_9 Shift - Description: Combine with group 9 + Description: hotkey-description-ControlGroupCombineWith09 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupCombineWith10: NUMBER_0 Shift - Description: Combine with group 0 + Description: hotkey-description-ControlGroupCombineWith10 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo01: NUMBER_1 Alt - Description: Jump to group 1 + Description: hotkey-description-ControlGroupJumpTo01 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo02: NUMBER_2 Alt - Description: Jump to group 2 + Description: hotkey-description-ControlGroupJumpTo02 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo03: NUMBER_3 Alt - Description: Jump to group 3 + Description: hotkey-description-ControlGroupJumpTo03 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo04: NUMBER_4 Alt - Description: Jump to group 4 + Description: hotkey-description-ControlGroupJumpTo04 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo05: NUMBER_5 Alt - Description: Jump to group 5 + Description: hotkey-description-ControlGroupJumpTo05 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo06: NUMBER_6 Alt - Description: Jump to group 6 + Description: hotkey-description-ControlGroupJumpTo06 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo07: NUMBER_7 Alt - Description: Jump to group 7 + Description: hotkey-description-ControlGroupJumpTo07 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo08: NUMBER_8 Alt - Description: Jump to group 8 + Description: hotkey-description-ControlGroupJumpTo08 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo09: NUMBER_9 Alt - Description: Jump to group 9 + Description: hotkey-description-ControlGroupJumpTo09 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player ControlGroupJumpTo10: NUMBER_0 Alt - Description: Jump to group 0 + Description: hotkey-description-ControlGroupJumpTo10 Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player RemoveFromControlGroup: - Description: Remove from control group + Description: hotkey-description-RemoveFromControlGroup Types: ControlGroups - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/common/hotkeys/editor.yaml b/mods/common/hotkeys/editor.yaml index 46d71dc675..4be2e40227 100644 --- a/mods/common/hotkeys/editor.yaml +++ b/mods/common/hotkeys/editor.yaml @@ -1,85 +1,85 @@ EditorUndo: Z Ctrl - Description: Undo + Description: hotkey-description-EditorUndo Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor Platform: OSX: Z Meta EditorRedo: Y Ctrl - Description: Redo + Description: hotkey-description-EditorRedo Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor Platform: OSX: Z Meta, Shift Linux: Z Ctrl, Shift EditorCopy: C Ctrl - Description: Copy + Description: hotkey-description-EditorCopy Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor Platform: OSX: C Meta EditorQuickSave: S Ctrl - Description: Save Map + Description: hotkey-description-EditorQuickSave Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor Platform: OSX: S Meta EditorPaste: V Ctrl - Description: Paste + Description: hotkey-description-EditorPaste Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor Platform: OSX: V Meta EditorSelectTab: E - Description: Select Tab + Description: hotkey-description-EditorSelectTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorTilesTab: R - Description: Tiles Tab + Description: hotkey-description-EditorTilesTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorOverlaysTab: T - Description: Overlays Tab + Description: hotkey-description-EditorOverlaysTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorActorsTab: Y - Description: Actors Tab + Description: hotkey-description-EditorActorsTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorToolsTab: U - Description: Tools Tab + Description: hotkey-description-EditorToolsTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorHistoryTab: I - Description: History Tab + Description: hotkey-description-EditorHistoryTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorSettingsTab: O - Description: Settings Tab + Description: hotkey-description-EditorSettingsTab Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorToggleGridOverlay: F1 - Description: Grid Overlay + Description: hotkey-description-EditorToggleGridOverlay Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorToggleBuildableOverlay: F2 - Description: Buildable Terrain Overlay + Description: hotkey-description-EditorToggleBuildableOverlay Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor EditorToggleMarkerOverlay: F3 - Description: Marker Layer Overlay + Description: hotkey-description-EditorToggleMarkerOverlay Types: Editor - Contexts: Editor + Contexts: hotkey-context-editor diff --git a/mods/common/hotkeys/game.yaml b/mods/common/hotkeys/game.yaml index 0ecc1c05e0..8accb0a8da 100644 --- a/mods/common/hotkeys/game.yaml +++ b/mods/common/hotkeys/game.yaml @@ -1,134 +1,134 @@ CycleBase: H - Description: Jump to base + Description: hotkey-description-CycleBase Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator ToLastEvent: SPACE - Description: Jump to last radar event + Description: hotkey-description-ToLastEvent Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator ToSelection: HOME - Description: Jump to selection + Description: hotkey-description-ToSelection Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator SelectAllUnits: Q - Description: Select all combat units + Description: hotkey-description-SelectAllUnits Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator SelectUnitsByType: W - Description: Select units by type + Description: hotkey-description-SelectUnitsByType Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator CycleHarvesters: N - Description: Cycle Harvesters + Description: hotkey-description-CycleHarvesters Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator Pause: PAUSE - Description: Pause / Unpause + Description: hotkey-description-Pause Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator Sell: Z - Description: Sell mode + Description: hotkey-description-Sell Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player Repair: C - Description: Repair mode + Description: hotkey-description-Repair Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player PlaceBeacon: B - Description: Place beacon + Description: hotkey-description-PlaceBeacon Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player CycleStatusBars: COMMA - Description: Cycle status bars display + Description: hotkey-description-CycleStatusBars Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator ToggleMute: M - Description: Toggle audio mute + Description: hotkey-description-ToggleMute Types: World - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator TogglePlayerStanceColor: COMMA Ctrl - Description: Toggle player stance colors + Description: hotkey-description-TogglePlayerStanceColor Types: World - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator TakeScreenshot: P Ctrl - Description: Take screenshot + Description: hotkey-description-TakeScreenshot Types: World - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator AttackMove: A - Description: Attack Move + Description: hotkey-description-AttackMove Types: Unit - Contexts: Player + Contexts: hotkey-context-player Stop: S - Description: Stop + Description: hotkey-description-Stop Types: Unit - Contexts: Player + Contexts: hotkey-context-player Scatter: X Ctrl - Description: Scatter + Description: hotkey-description-Scatter Types: Unit - Contexts: Player + Contexts: hotkey-context-player Deploy: F - Description: Deploy + Description: hotkey-description-Deploy Types: Unit - Contexts: Player + Contexts: hotkey-context-player Guard: D - Description: Guard + Description: hotkey-description-Guard Types: Unit - Contexts: Player + Contexts: hotkey-context-player StanceAttackAnything: A Alt - Description: Attack anything + Description: hotkey-description-StanceAttackAnything Types: Stance - Contexts: Player + Contexts: hotkey-context-player StanceDefend: S Alt - Description: Defend + Description: hotkey-description-StanceDefend Types: Stance - Contexts: Player + Contexts: hotkey-context-player StanceReturnFire: D Alt - Description: Return fire + Description: hotkey-description-StanceReturnFire Types: Stance - Contexts: Player + Contexts: hotkey-context-player StanceHoldFire: F Alt - Description: Hold fire + Description: hotkey-description-StanceHoldFire Types: Stance - Contexts: Player + Contexts: hotkey-context-player StopMusic: AUDIOSTOP - Description: Stop + Description: hotkey-description-StopMusic Types: Music - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator PauseMusic: AUDIOPLAY - Description: Pause or Resume + Description: hotkey-description-PauseMusic Types: Music - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator PrevMusic: AUDIOPREV - Description: Previous + Description: hotkey-description-PrevMusic Types: Music - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator NextMusic: AUDIONEXT - Description: Next + Description: hotkey-description-NextMusic Types: Music - Contexts: Menu, Player, Spectator + Contexts: hotkey-context-menu, hotkey-context-player, hotkey-context-spectator diff --git a/mods/common/hotkeys/observer.yaml b/mods/common/hotkeys/observer.yaml index 33a0b98e65..cda573a2c4 100644 --- a/mods/common/hotkeys/observer.yaml +++ b/mods/common/hotkeys/observer.yaml @@ -1,74 +1,74 @@ ObserverCombinedView: MINUS - Description: All Players + Description: hotkey-description-ObserverCombinedView Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator ObserverWorldView: EQUALS - Description: Disable Shroud + Description: hotkey-description-ObserverWorldView Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator ReplaySpeedSlow: F9 - Description: Slow speed + Description: hotkey-description-ReplaySpeedSlow Types: Replay - Contexts: Spectator + Contexts: hotkey-context-spectator ReplaySpeedRegular: F10 - Description: Regular speed + Description: hotkey-description-ReplaySpeedRegular Types: Replay - Contexts: Spectator + Contexts: hotkey-context-spectator ReplaySpeedFast: F11 - Description: Fast speed + Description: hotkey-description-ReplaySpeedFast Types: Replay - Contexts: Spectator + Contexts: hotkey-context-spectator ReplaySpeedMax: F12 - Description: Maximum speed + Description: hotkey-description-ReplaySpeedMax Types: Replay - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsNone: F1 - Description: Disable statistics + Description: hotkey-description-StatisticsNone Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsBasic: F2 - Description: Basic statistics + Description: hotkey-description-StatisticsBasic Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsEconomy: F3 - Description: Economy statistics + Description: hotkey-description-StatisticsEconomy Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsProduction: F4 - Description: Production statistics + Description: hotkey-description-StatisticsProduction Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsSupportPowers: F5 - Description: Support Power statistics + Description: hotkey-description-StatisticsSupportPowers Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsCombat: F6 - Description: Combat statistics + Description: hotkey-description-StatisticsCombat Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsArmy: F7 - Description: Army statistics + Description: hotkey-description-StatisticsArmy Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsGraph: - Description: Statistics graph + Description: hotkey-description-StatisticsGraph Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator StatisticsArmyGraph: - Description: Army value graph + Description: hotkey-description-StatisticsArmyGraph Types: Observer - Contexts: Spectator + Contexts: hotkey-context-spectator diff --git a/mods/common/hotkeys/production-common.yaml b/mods/common/hotkeys/production-common.yaml index 24cc99bb2c..e5b7b6f3b9 100644 --- a/mods/common/hotkeys/production-common.yaml +++ b/mods/common/hotkeys/production-common.yaml @@ -1,129 +1,129 @@ CycleProductionBuildings: TAB Ctrl - Description: Next facility + Description: hotkey-description-CycleProductionBuildings Types: Production - Contexts: Player, Spectator + Contexts: hotkey-context-player, hotkey-context-spectator SelectProductionBuilding: TAB - Description: Current facility + Description: hotkey-description-SelectProductionBuilding Types: Production - Contexts: Player + Contexts: hotkey-context-player Production01: F1 - Description: Slot 01 + Description: hotkey-description-Production01 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production02: F2 - Description: Slot 02 + Description: hotkey-description-Production02 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production03: F3 - Description: Slot 03 + Description: hotkey-description-Production03 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production04: F4 - Description: Slot 04 + Description: hotkey-description-Production04 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production05: F5 - Description: Slot 05 + Description: hotkey-description-Production05 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production06: F6 - Description: Slot 06 + Description: hotkey-description-Production06 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production07: F7 - Description: Slot 07 + Description: hotkey-description-Production07 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production08: F8 - Description: Slot 08 + Description: hotkey-description-Production08 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production09: F9 - Description: Slot 09 + Description: hotkey-description-Production09 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production10: F10 - Description: Slot 10 + Description: hotkey-description-Production10 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production11: F11 - Description: Slot 11 + Description: hotkey-description-Production11 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production12: F12 - Description: Slot 12 + Description: hotkey-description-Production12 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production13: F1 CTRL - Description: Slot 13 + Description: hotkey-description-Production13 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production14: F2 CTRL - Description: Slot 14 + Description: hotkey-description-Production14 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production15: F3 CTRL - Description: Slot 15 + Description: hotkey-description-Production15 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production16: F4 CTRL - Description: Slot 16 + Description: hotkey-description-Production16 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production17: F5 CTRL - Description: Slot 17 + Description: hotkey-description-Production17 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production18: F6 CTRL - Description: Slot 18 + Description: hotkey-description-Production18 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production19: F7 CTRL - Description: Slot 19 + Description: hotkey-description-Production19 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production20: F8 CTRL - Description: Slot 20 + Description: hotkey-description-Production20 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production21: F9 CTRL - Description: Slot 21 + Description: hotkey-description-Production21 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production22: F10 CTRL - Description: Slot 22 + Description: hotkey-description-Production22 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production23: F11 CTRL - Description: Slot 23 + Description: hotkey-description-Production23 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player Production24: F12 CTRL - Description: Slot 24 + Description: hotkey-description-Production24 Types: ProductionSlot - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/common/hotkeys/production-peractor.yaml b/mods/common/hotkeys/production-peractor.yaml deleted file mode 100644 index d78e765953..0000000000 --- a/mods/common/hotkeys/production-peractor.yaml +++ /dev/null @@ -1,9 +0,0 @@ -NextProductionTab: PAGEDOWN - Description: Next tab - Types: Production - Contexts: Player - -PreviousProductionTab: PAGEUP - Description: Previous tab - Types: Production - Contexts: Player diff --git a/mods/common/hotkeys/supportpowers.yaml b/mods/common/hotkeys/supportpowers.yaml index dd80d6a6da..6c4223a185 100644 --- a/mods/common/hotkeys/supportpowers.yaml +++ b/mods/common/hotkeys/supportpowers.yaml @@ -1,29 +1,29 @@ SupportPower01: - Description: Slot 01 + Description: hotkey-description-SupportPower01 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player SupportPower02: - Description: Slot 02 + Description: hotkey-description-SupportPower02 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player SupportPower03: - Description: Slot 03 + Description: hotkey-description-SupportPower03 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player SupportPower04: - Description: Slot 04 + Description: hotkey-description-SupportPower04 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player SupportPower05: - Description: Slot 05 + Description: hotkey-description-SupportPower05 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player SupportPower06: - Description: Slot 06 + Description: hotkey-description-SupportPower06 Types: SupportPower - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/common/hotkeys/viewport.yaml b/mods/common/hotkeys/viewport.yaml index ffe667790d..179d4cce32 100644 --- a/mods/common/hotkeys/viewport.yaml +++ b/mods/common/hotkeys/viewport.yaml @@ -1,94 +1,94 @@ MapScrollUp: UP - Description: Scroll up + Description: hotkey-description-MapScrollUp Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapScrollDown: DOWN - Description: Scroll down + Description: hotkey-description-MapScrollDown Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapScrollLeft: LEFT - Description: Scroll left + Description: hotkey-description-MapScrollLeft Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapScrollRight: RIGHT - Description: Scroll right + Description: hotkey-description-MapScrollRight Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapJumpToTopEdge: UP Alt - Description: Jump to top edge + Description: hotkey-description-MapJumpToTopEdge Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapJumpToBottomEdge: DOWN Alt - Description: Jump to bottom edge + Description: hotkey-description-MapJumpToBottomEdge Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapJumpToLeftEdge: LEFT Alt - Description: Jump to left edge + Description: hotkey-description-MapJumpToLeftEdge Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapJumpToRightEdge: RIGHT Alt - Description: Jump to right edge + Description: hotkey-description-MapJumpToRightEdge Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkSave01: Q Ctrl - Description: Record bookmark 1 + Description: hotkey-description-MapBookmarkSave01 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkRestore01: Q Alt - Description: Jump to bookmark 1 + Description: hotkey-description-MapBookmarkRestore01 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkSave02: W Ctrl - Description: Record bookmark 2 + Description: hotkey-description-MapBookmarkSave02 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkRestore02: W Alt - Description: Jump to bookmark 2 + Description: hotkey-description-MapBookmarkRestore02 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkSave03: E Ctrl - Description: Record bookmark 3 + Description: hotkey-description-MapBookmarkSave03 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkRestore03: E Alt - Description: Jump to bookmark 3 + Description: hotkey-description-MapBookmarkRestore03 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkSave04: R Ctrl - Description: Record bookmark 4 + Description: hotkey-description-MapBookmarkSave04 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor MapBookmarkRestore04: R Alt - Description: Jump to bookmark 4 + Description: hotkey-description-MapBookmarkRestore04 Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor ZoomIn: RIGHTBRACKET - Description: Zoom in + Description: hotkey-description-ZoomIn Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor ZoomOut: LEFTBRACKET - Description: Zoom out + Description: hotkey-description-ZoomOut Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor ResetZoom: PERIOD - Description: Reset zoom + Description: hotkey-description-ResetZoom Types: Viewport - Contexts: Player, Spectator, Editor + Contexts: hotkey-context-player, hotkey-context-spectator, hotkey-context-editor diff --git a/mods/common/languages/chrome/en.ftl b/mods/common/languages/chrome/en.ftl index 7cc6100fcd..40fb042dfc 100644 --- a/mods/common/languages/chrome/en.ftl +++ b/mods/common/languages/chrome/en.ftl @@ -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. diff --git a/mods/common/languages/en.ftl b/mods/common/languages/en.ftl index f25872b6b7..749da504c8 100644 --- a/mods/common/languages/en.ftl +++ b/mods/common/languages/en.ftl @@ -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 diff --git a/mods/common/languages/hotkeys/en.ftl b/mods/common/languages/hotkeys/en.ftl new file mode 100644 index 0000000000..9a1c5b8c74 --- /dev/null +++ b/mods/common/languages/hotkeys/en.ftl @@ -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 diff --git a/mods/d2k/hotkeys.yaml b/mods/d2k/hotkeys.yaml index d31ab69b1c..48a429bd7e 100644 --- a/mods/d2k/hotkeys.yaml +++ b/mods/d2k/hotkeys.yaml @@ -1,39 +1,39 @@ ProductionTypeBuilding: E - Description: Building Tab + Description: hotkey-description-ProductionTypeBuilding Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeUpgrade: R - Description: Upgrade Tab + Description: hotkey-description-ProductionTypeUpgrade Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeInfantry: T - Description: Infantry Tab + Description: hotkey-description-ProductionTypeInfantry Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeVehicle: Y - Description: Vehicle Tab + Description: hotkey-description-ProductionTypeVehicle Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeAircraft: U - Description: Aircraft Tab + Description: hotkey-description-ProductionTypeAircraft Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeTank: I - Description: Tank Tab + Description: hotkey-description-ProductionTypeTank Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeMerchant: O - Description: Starport Tab + Description: hotkey-description-ProductionTypeMerchant Types: Production - Contexts: Player + Contexts: hotkey-context-player PowerDown: X - Description: Power-down mode + Description: hotkey-description-PowerDown Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/d2k/languages/hotkeys/en.ftl b/mods/d2k/languages/hotkeys/en.ftl new file mode 100644 index 0000000000..1f7b1ec7e9 --- /dev/null +++ b/mods/d2k/languages/hotkeys/en.ftl @@ -0,0 +1,9 @@ +## hotkeys.yaml +hotkey-description-ProductionTypeBuilding = Building Tab +hotkey-description-ProductionTypeUpgrade = Upgrade Tab +hotkey-description-ProductionTypeInfantry = Infantry Tab +hotkey-description-ProductionTypeVehicle = Vehicle Tab +hotkey-description-ProductionTypeAircraft = Aircraft Tab +hotkey-description-ProductionTypeTank = Tank Tab +hotkey-description-ProductionTypeMerchant = Starport Tab +hotkey-description-PowerDown = Power-down mode diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 8c3a751f86..feb3dc0d49 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -123,9 +123,11 @@ ChromeLayout: Translations: common|languages/en.ftl common|languages/chrome/en.ftl + common|languages/hotkeys/en.ftl common|languages/rules/en.ftl d2k|languages/en.ftl d2k|languages/chrome/en.ftl + d2k|languages/hotkeys/en.ftl d2k|languages/rules/en.ftl AllowUnusedTranslationsInExternalPackages: false diff --git a/mods/ra/hotkeys.yaml b/mods/ra/hotkeys.yaml index e43eccea0d..f29a422eec 100644 --- a/mods/ra/hotkeys.yaml +++ b/mods/ra/hotkeys.yaml @@ -1,34 +1,34 @@ ProductionTypeBuilding: E - Description: Building Tab + Description: hotkey-description-ProductionTypeBuilding Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeDefense: R - Description: Defense Tab + Description: hotkey-description-ProductionTypeDefense Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeInfantry: T - Description: Infantry Tab + Description: hotkey-description-ProductionTypeInfantry Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeVehicle: Y - Description: Vehicle Tab + Description: hotkey-description-ProductionTypeVehicle Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeAircraft: U - Description: Aircraft Tab + Description: hotkey-description-ProductionTypeAircraft Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeNaval: I - Description: Naval Tab + Description: hotkey-description-ProductionTypeNaval Types: Production - Contexts: Player + Contexts: hotkey-context-player PowerDown: X - Description: Power-down mode + Description: hotkey-description-PowerDown Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/ra/languages/hotkeys/en.ftl b/mods/ra/languages/hotkeys/en.ftl new file mode 100644 index 0000000000..7c29589ea8 --- /dev/null +++ b/mods/ra/languages/hotkeys/en.ftl @@ -0,0 +1,8 @@ +## hotkeys.yaml +hotkey-description-ProductionTypeBuilding = Building Tab +hotkey-description-ProductionTypeDefense = Defense Tab +hotkey-description-ProductionTypeInfantry = Infantry Tab +hotkey-description-ProductionTypeVehicle = Vehicle Tab +hotkey-description-ProductionTypeAircraft = Aircraft Tab +hotkey-description-ProductionTypeNaval = Naval Tab +hotkey-description-PowerDown = Power-down mode diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 439edf9df0..04f91af364 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -141,9 +141,11 @@ ChromeLayout: Translations: common|languages/en.ftl common|languages/chrome/en.ftl + common|languages/hotkeys/en.ftl common|languages/rules/en.ftl ra|languages/en.ftl ra|languages/chrome/en.ftl + ra|languages/hotkeys/en.ftl ra|languages/rules/en.ftl AllowUnusedTranslationsInExternalPackages: false diff --git a/mods/ts/chrome/settings-hotkeys.yaml b/mods/ts/chrome/settings-hotkeys.yaml index a79b518b33..69dcf53e9f 100644 --- a/mods/ts/chrome/settings-hotkeys.yaml +++ b/mods/ts/chrome/settings-hotkeys.yaml @@ -1,29 +1,29 @@ Container@HOTKEYS_PANEL: Logic: HotkeysSettingsLogic HotkeyGroups: - Game Commands: + hotkey-group-game-commands: Types: OrderGenerator, World, Menu - Viewport Commands: + hotkey-group-viewport-commands: Types: Viewport - Observer / Replay Commands: + hotkey-group-observer-replay-commands: Types: Observer, Replay - Unit Commands: + hotkey-group-unit-commands: Types: Unit - Unit Stance Commands: + hotkey-group-unit-stance-commands: Types: Stance - Production Commands: + hotkey-group-production-commands: Types: Production, ProductionSlot - Support Power Commands: + hotkey-group-support-power-commands: Types: SupportPower - Music Commands: + hotkey-group-music-commands: Types: Music - Chat Commands: + hotkey-group-chat-commands: Types: Chat - Control Groups: + hotkey-group-control-groups: Types: ControlGroups - Editor Commands: + hotkey-group-editor-commands: Types: Editor - Depth Preview Debug: + hotkey-group-depth-preview-debug: Types: DepthDebug Width: PARENT_WIDTH Height: PARENT_HEIGHT diff --git a/mods/ts/hotkeys.yaml b/mods/ts/hotkeys.yaml index c6694eff01..9733dce747 100644 --- a/mods/ts/hotkeys.yaml +++ b/mods/ts/hotkeys.yaml @@ -1,54 +1,54 @@ ProductionTypeBuilding: E - Description: Building Tab + Description: hotkey-description-ProductionTypeBuilding Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeDefense: R - Description: Defense Tab + Description: hotkey-description-ProductionTypeDefense Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeInfantry: T - Description: Infantry Tab + Description: hotkey-description-ProductionTypeInfantry Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeVehicle: Y - Description: Vehicle Tab + Description: hotkey-description-ProductionTypeVehicle Types: Production - Contexts: Player + Contexts: hotkey-context-player ProductionTypeAircraft: U - Description: Aircraft Tab + Description: hotkey-description-ProductionTypeAircraft Types: Production - Contexts: Player + Contexts: hotkey-context-player PowerDown: X - Description: Power-down mode + Description: hotkey-description-PowerDown Types: OrderGenerator - Contexts: Player + Contexts: hotkey-context-player DecreaseDepthPreviewContrast: LEFTBRACKET SHIFT - Description: Decrease Contrast + Description: hotkey-description-DecreaseDepthPreviewContrast Types: DepthDebug - Contexts: Player + Contexts: hotkey-context-player IncreaseDepthPreviewContrast: RIGHTBRACKET SHIFT - Description: Increase Contrast + Description: hotkey-description-IncreaseDepthPreviewContrast Types: DepthDebug - Contexts: Player + Contexts: hotkey-context-player DecreaseDepthPreviewOffset: SEMICOLON SHIFT - Description: Decrease Offset + Description: hotkey-description-DecreaseDepthPreviewOffset Types: DepthDebug - Contexts: Player + Contexts: hotkey-context-player IncreaseDepthPreviewOffset: QUOTE SHIFT - Description: Increase Offset + Description: hotkey-description-IncreaseDepthPreviewOffset Types: DepthDebug - Contexts: Player + Contexts: hotkey-context-player ToggleDepthPreview: BACKSLASH SHIFT - Description: Toggle Preview + Description: hotkey-description-ToggleDepthPreview Types: DepthDebug - Contexts: Player + Contexts: hotkey-context-player diff --git a/mods/ts/languages/chrome/en.ftl b/mods/ts/languages/chrome/en.ftl index f4572914ba..77ade91bec 100644 --- a/mods/ts/languages/chrome/en.ftl +++ b/mods/ts/languages/chrome/en.ftl @@ -190,3 +190,6 @@ label-mainmenu-prerelease-notification-prompt-text-b = for the community to foll label-mainmenu-prerelease-notification-prompt-text-c = Many features are missing or incomplete, performance has not been label-mainmenu-prerelease-notification-prompt-text-d = optimized, and balance will not be addressed until a future beta. button-mainmenu-prerelease-notification-continue = I Understand + +## settings-hotkeys.yaml +hotkey-group-depth-preview-debug = Depth Preview Debug diff --git a/mods/ts/languages/hotkeys/en.ftl b/mods/ts/languages/hotkeys/en.ftl new file mode 100644 index 0000000000..f85ee66022 --- /dev/null +++ b/mods/ts/languages/hotkeys/en.ftl @@ -0,0 +1,12 @@ +## hotkeys.yaml +hotkey-description-ProductionTypeBuilding = Building Tab +hotkey-description-ProductionTypeDefense = Defense Tab +hotkey-description-ProductionTypeInfantry = Infantry Tab +hotkey-description-ProductionTypeVehicle = Vehicle Tab +hotkey-description-ProductionTypeAircraft = Aircraft Tab +hotkey-description-PowerDown = Power-down mode +hotkey-description-DecreaseDepthPreviewContrast = Decrease Contrast +hotkey-description-IncreaseDepthPreviewContrast = Increase Contrast +hotkey-description-DecreaseDepthPreviewOffset = Decrease Offset +hotkey-description-IncreaseDepthPreviewOffset = Increase Offset +hotkey-description-ToggleDepthPreview = Toggle Preview diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index abff1aa774..57c3576108 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -186,9 +186,11 @@ ChromeLayout: Translations: common|languages/en.ftl common|languages/chrome/en.ftl + common|languages/hotkeys/en.ftl common|languages/rules/en.ftl ts|languages/en.ftl ts|languages/chrome/en.ftl + ts|languages/hotkeys/en.ftl ts|languages/rules/en.ftl AllowUnusedTranslationsInExternalPackages: false