Migrate more strings to translation keys (#11601)
This commit is contained in:
@@ -50,7 +50,7 @@ const getUIOnlyShortcuts = (): IKeyboardShortcuts => {
|
||||
key: Key.ENTER,
|
||||
shiftKey: !ctrlEnterToSend,
|
||||
},
|
||||
displayName: _td("New line"),
|
||||
displayName: _td("keyboard|composer_new_line"),
|
||||
},
|
||||
[KeyBindingAction.CompleteAutocomplete]: {
|
||||
default: {
|
||||
@@ -62,14 +62,14 @@ const getUIOnlyShortcuts = (): IKeyboardShortcuts => {
|
||||
default: {
|
||||
key: Key.TAB,
|
||||
},
|
||||
displayName: _td("Force complete"),
|
||||
displayName: _td("keyboard|autocomplete_force"),
|
||||
},
|
||||
[KeyBindingAction.SearchInRoom]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.F,
|
||||
},
|
||||
displayName: _td("Search (must be enabled)"),
|
||||
displayName: _td("keyboard|search"),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@ const getUIOnlyShortcuts = (): IKeyboardShortcuts => {
|
||||
ctrlOrCmdKey: true,
|
||||
key: DIGITS,
|
||||
},
|
||||
displayName: _td("Switch to space by number"),
|
||||
displayName: _td("keyboard|switch_to_space"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
|
||||
],
|
||||
},
|
||||
[CategoryName.CALLS]: {
|
||||
categoryLabel: _td("Calls"),
|
||||
categoryLabel: _td("keyboard|category_calls"),
|
||||
settingNames: [KeyBindingAction.ToggleMicInCall, KeyBindingAction.ToggleWebcamInCall],
|
||||
},
|
||||
[CategoryName.ROOM]: {
|
||||
@@ -246,7 +246,7 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
|
||||
],
|
||||
},
|
||||
[CategoryName.ROOM_LIST]: {
|
||||
categoryLabel: _td("Room List"),
|
||||
categoryLabel: _td("keyboard|category_room_list"),
|
||||
settingNames: [
|
||||
KeyBindingAction.SelectRoomInRoomList,
|
||||
KeyBindingAction.ClearRoomFilter,
|
||||
@@ -274,7 +274,7 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
|
||||
],
|
||||
},
|
||||
[CategoryName.NAVIGATION]: {
|
||||
categoryLabel: _td("Navigation"),
|
||||
categoryLabel: _td("keyboard|category_navigation"),
|
||||
settingNames: [
|
||||
KeyBindingAction.ToggleUserMenu,
|
||||
KeyBindingAction.ToggleRoomSidePanel,
|
||||
@@ -293,7 +293,7 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
|
||||
],
|
||||
},
|
||||
[CategoryName.AUTOCOMPLETE]: {
|
||||
categoryLabel: _td("Autocomplete"),
|
||||
categoryLabel: _td("keyboard|category_autocomplete"),
|
||||
settingNames: [
|
||||
KeyBindingAction.CancelAutocomplete,
|
||||
KeyBindingAction.NextSelectionInAutocomplete,
|
||||
@@ -327,14 +327,14 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.B,
|
||||
},
|
||||
displayName: _td("Toggle Bold"),
|
||||
displayName: _td("keyboard|composer_toggle_bold"),
|
||||
},
|
||||
[KeyBindingAction.FormatItalics]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.I,
|
||||
},
|
||||
displayName: _td("Toggle Italics"),
|
||||
displayName: _td("keyboard|composer_toggle_italics"),
|
||||
},
|
||||
[KeyBindingAction.FormatQuote]: {
|
||||
default: {
|
||||
@@ -342,14 +342,14 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: true,
|
||||
key: Key.GREATER_THAN,
|
||||
},
|
||||
displayName: _td("Toggle Quote"),
|
||||
displayName: _td("keyboard|composer_toggle_quote"),
|
||||
},
|
||||
[KeyBindingAction.FormatCode]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.E,
|
||||
},
|
||||
displayName: _td("Toggle Code Block"),
|
||||
displayName: _td("keyboard|composer_toggle_code_block"),
|
||||
},
|
||||
[KeyBindingAction.FormatLink]: {
|
||||
default: {
|
||||
@@ -357,39 +357,39 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: true,
|
||||
key: Key.L,
|
||||
},
|
||||
displayName: _td("Toggle Link"),
|
||||
displayName: _td("keyboard|composer_toggle_link"),
|
||||
},
|
||||
[KeyBindingAction.CancelReplyOrEdit]: {
|
||||
default: {
|
||||
key: Key.ESCAPE,
|
||||
},
|
||||
displayName: _td("Cancel replying to a message"),
|
||||
displayName: _td("keyboard|cancel_reply"),
|
||||
},
|
||||
[KeyBindingAction.EditNextMessage]: {
|
||||
default: {
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Navigate to next message to edit"),
|
||||
displayName: _td("keyboard|navigate_next_message_edit"),
|
||||
},
|
||||
[KeyBindingAction.EditPrevMessage]: {
|
||||
default: {
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Navigate to previous message to edit"),
|
||||
displayName: _td("keyboard|navigate_prev_message_edit"),
|
||||
},
|
||||
[KeyBindingAction.MoveCursorToStart]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.HOME,
|
||||
},
|
||||
displayName: _td("Jump to start of the composer"),
|
||||
displayName: _td("keyboard|composer_jump_start"),
|
||||
},
|
||||
[KeyBindingAction.MoveCursorToEnd]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.END,
|
||||
},
|
||||
displayName: _td("Jump to end of the composer"),
|
||||
displayName: _td("keyboard|composer_jump_end"),
|
||||
},
|
||||
[KeyBindingAction.SelectNextSendHistory]: {
|
||||
default: {
|
||||
@@ -397,7 +397,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
ctrlKey: true,
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Navigate to next message in composer history"),
|
||||
displayName: _td("keyboard|composer_navigate_next_history"),
|
||||
},
|
||||
[KeyBindingAction.SelectPrevSendHistory]: {
|
||||
default: {
|
||||
@@ -405,41 +405,41 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
ctrlKey: true,
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Navigate to previous message in composer history"),
|
||||
displayName: _td("keyboard|composer_navigate_prev_history"),
|
||||
},
|
||||
[KeyBindingAction.ShowStickerPicker]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.SEMICOLON,
|
||||
},
|
||||
displayName: _td("Send a sticker"),
|
||||
displayName: _td("keyboard|send_sticker"),
|
||||
},
|
||||
[KeyBindingAction.ToggleMicInCall]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.D,
|
||||
},
|
||||
displayName: _td("Toggle microphone mute"),
|
||||
displayName: _td("keyboard|toggle_microphone_mute"),
|
||||
},
|
||||
[KeyBindingAction.ToggleWebcamInCall]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.E,
|
||||
},
|
||||
displayName: _td("Toggle webcam on/off"),
|
||||
displayName: _td("keyboard|toggle_webcam_mute"),
|
||||
},
|
||||
[KeyBindingAction.DismissReadMarker]: {
|
||||
default: {
|
||||
key: Key.ESCAPE,
|
||||
},
|
||||
displayName: _td("Dismiss read marker and jump to bottom"),
|
||||
displayName: _td("keyboard|dismiss_read_marker_and_jump_bottom"),
|
||||
},
|
||||
[KeyBindingAction.JumpToOldestUnread]: {
|
||||
default: {
|
||||
shiftKey: true,
|
||||
key: Key.PAGE_UP,
|
||||
},
|
||||
displayName: _td("Jump to oldest unread message"),
|
||||
displayName: _td("keyboard|jump_to_read_marker"),
|
||||
},
|
||||
[KeyBindingAction.UploadFile]: {
|
||||
default: {
|
||||
@@ -447,77 +447,77 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: true,
|
||||
key: Key.U,
|
||||
},
|
||||
displayName: _td("Upload a file"),
|
||||
displayName: _td("keyboard|upload_file"),
|
||||
},
|
||||
[KeyBindingAction.ScrollUp]: {
|
||||
default: {
|
||||
key: Key.PAGE_UP,
|
||||
},
|
||||
displayName: _td("Scroll up in the timeline"),
|
||||
displayName: _td("keyboard|scroll_up_timeline"),
|
||||
},
|
||||
[KeyBindingAction.ScrollDown]: {
|
||||
default: {
|
||||
key: Key.PAGE_DOWN,
|
||||
},
|
||||
displayName: _td("Scroll down in the timeline"),
|
||||
displayName: _td("keyboard|scroll_down_timeline"),
|
||||
},
|
||||
[KeyBindingAction.FilterRooms]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.K,
|
||||
},
|
||||
displayName: _td("Jump to room search"),
|
||||
displayName: _td("keyboard|jump_room_search"),
|
||||
},
|
||||
[KeyBindingAction.SelectRoomInRoomList]: {
|
||||
default: {
|
||||
key: Key.ENTER,
|
||||
},
|
||||
displayName: _td("Select room from the room list"),
|
||||
displayName: _td("keyboard|room_list_select_room"),
|
||||
},
|
||||
[KeyBindingAction.CollapseRoomListSection]: {
|
||||
default: {
|
||||
key: Key.ARROW_LEFT,
|
||||
},
|
||||
displayName: _td("Collapse room list section"),
|
||||
displayName: _td("keyboard|room_list_collapse_section"),
|
||||
},
|
||||
[KeyBindingAction.ExpandRoomListSection]: {
|
||||
default: {
|
||||
key: Key.ARROW_RIGHT,
|
||||
},
|
||||
displayName: _td("Expand room list section"),
|
||||
displayName: _td("keyboard|room_list_expand_section"),
|
||||
},
|
||||
[KeyBindingAction.NextRoom]: {
|
||||
default: {
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Navigate down in the room list"),
|
||||
displayName: _td("keyboard|room_list_navigate_down"),
|
||||
},
|
||||
[KeyBindingAction.PrevRoom]: {
|
||||
default: {
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Navigate up in the room list"),
|
||||
displayName: _td("keyboard|room_list_navigate_up"),
|
||||
},
|
||||
[KeyBindingAction.ToggleUserMenu]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.BACKTICK,
|
||||
},
|
||||
displayName: _td("Toggle the top left menu"),
|
||||
displayName: _td("keyboard|toggle_top_left_menu"),
|
||||
},
|
||||
[KeyBindingAction.ToggleRoomSidePanel]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.PERIOD,
|
||||
},
|
||||
displayName: _td("Toggle right panel"),
|
||||
displayName: _td("keyboard|toggle_right_panel"),
|
||||
},
|
||||
[KeyBindingAction.ShowKeyboardSettings]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: Key.SLASH,
|
||||
},
|
||||
displayName: _td("Open this settings tab"),
|
||||
displayName: _td("keyboard|keyboard_shortcuts_tab"),
|
||||
},
|
||||
[KeyBindingAction.GoToHome]: {
|
||||
default: {
|
||||
@@ -526,7 +526,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: IS_MAC,
|
||||
key: Key.H,
|
||||
},
|
||||
displayName: _td("Go to Home View"),
|
||||
displayName: _td("keyboard|go_home_view"),
|
||||
},
|
||||
[KeyBindingAction.SelectNextUnreadRoom]: {
|
||||
default: {
|
||||
@@ -534,7 +534,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
altKey: true,
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Next unread room or DM"),
|
||||
displayName: _td("keyboard|next_unread_room"),
|
||||
},
|
||||
[KeyBindingAction.SelectPrevUnreadRoom]: {
|
||||
default: {
|
||||
@@ -542,39 +542,39 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
altKey: true,
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Previous unread room or DM"),
|
||||
displayName: _td("keyboard|prev_unread_room"),
|
||||
},
|
||||
[KeyBindingAction.SelectNextRoom]: {
|
||||
default: {
|
||||
altKey: true,
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Next room or DM"),
|
||||
displayName: _td("keyboard|next_room"),
|
||||
},
|
||||
[KeyBindingAction.SelectPrevRoom]: {
|
||||
default: {
|
||||
altKey: true,
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Previous room or DM"),
|
||||
displayName: _td("keyboard|prev_room"),
|
||||
},
|
||||
[KeyBindingAction.CancelAutocomplete]: {
|
||||
default: {
|
||||
key: Key.ESCAPE,
|
||||
},
|
||||
displayName: _td("Cancel autocomplete"),
|
||||
displayName: _td("keyboard|autocomplete_cancel"),
|
||||
},
|
||||
[KeyBindingAction.NextSelectionInAutocomplete]: {
|
||||
default: {
|
||||
key: Key.ARROW_DOWN,
|
||||
},
|
||||
displayName: _td("Next autocomplete suggestion"),
|
||||
displayName: _td("keyboard|autocomplete_navigate_next"),
|
||||
},
|
||||
[KeyBindingAction.PrevSelectionInAutocomplete]: {
|
||||
default: {
|
||||
key: Key.ARROW_UP,
|
||||
},
|
||||
displayName: _td("Previous autocomplete suggestion"),
|
||||
displayName: _td("keyboard|autocomplete_navigate_prev"),
|
||||
},
|
||||
[KeyBindingAction.ToggleSpacePanel]: {
|
||||
default: {
|
||||
@@ -582,7 +582,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: true,
|
||||
key: Key.D,
|
||||
},
|
||||
displayName: _td("Toggle space panel"),
|
||||
displayName: _td("keyboard|toggle_space_panel"),
|
||||
},
|
||||
[KeyBindingAction.ToggleHiddenEventVisibility]: {
|
||||
default: {
|
||||
@@ -590,28 +590,28 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
shiftKey: true,
|
||||
key: Key.H,
|
||||
},
|
||||
displayName: _td("Toggle hidden event visibility"),
|
||||
displayName: _td("keyboard|toggle_hidden_events"),
|
||||
},
|
||||
[KeyBindingAction.JumpToFirstMessage]: {
|
||||
default: {
|
||||
key: Key.HOME,
|
||||
ctrlKey: true,
|
||||
},
|
||||
displayName: _td("Jump to first message"),
|
||||
displayName: _td("keyboard|jump_first_message"),
|
||||
},
|
||||
[KeyBindingAction.JumpToLatestMessage]: {
|
||||
default: {
|
||||
key: Key.END,
|
||||
ctrlKey: true,
|
||||
},
|
||||
displayName: _td("Jump to last message"),
|
||||
displayName: _td("keyboard|jump_last_message"),
|
||||
},
|
||||
[KeyBindingAction.EditUndo]: {
|
||||
default: {
|
||||
key: Key.Z,
|
||||
ctrlOrCmdKey: true,
|
||||
},
|
||||
displayName: _td("Undo edit"),
|
||||
displayName: _td("keyboard|composer_undo"),
|
||||
},
|
||||
[KeyBindingAction.EditRedo]: {
|
||||
default: {
|
||||
@@ -619,7 +619,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
ctrlOrCmdKey: true,
|
||||
shiftKey: IS_MAC,
|
||||
},
|
||||
displayName: _td("Redo edit"),
|
||||
displayName: _td("keyboard|composer_redo"),
|
||||
},
|
||||
[KeyBindingAction.PreviousVisitedRoomOrSpace]: {
|
||||
default: {
|
||||
@@ -627,7 +627,7 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
altKey: !IS_MAC,
|
||||
key: IS_MAC ? Key.SQUARE_BRACKET_LEFT : Key.ARROW_LEFT,
|
||||
},
|
||||
displayName: _td("Previous recently visited room or space"),
|
||||
displayName: _td("keyboard|navigate_prev_history"),
|
||||
},
|
||||
[KeyBindingAction.NextVisitedRoomOrSpace]: {
|
||||
default: {
|
||||
@@ -635,33 +635,33 @@ export const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
|
||||
altKey: !IS_MAC,
|
||||
key: IS_MAC ? Key.SQUARE_BRACKET_RIGHT : Key.ARROW_RIGHT,
|
||||
},
|
||||
displayName: _td("Next recently visited room or space"),
|
||||
displayName: _td("keyboard|navigate_next_history"),
|
||||
},
|
||||
[KeyBindingAction.SwitchToSpaceByNumber]: {
|
||||
default: {
|
||||
ctrlOrCmdKey: true,
|
||||
key: DIGITS,
|
||||
},
|
||||
displayName: _td("Switch to space by number"),
|
||||
displayName: _td("keyboard|switch_to_space"),
|
||||
},
|
||||
[KeyBindingAction.OpenUserSettings]: {
|
||||
default: {
|
||||
metaKey: true,
|
||||
key: Key.COMMA,
|
||||
},
|
||||
displayName: _td("Open user settings"),
|
||||
displayName: _td("keyboard|open_user_settings"),
|
||||
},
|
||||
[KeyBindingAction.Escape]: {
|
||||
default: {
|
||||
key: Key.ESCAPE,
|
||||
},
|
||||
displayName: _td("Close dialog or context menu"),
|
||||
displayName: _td("keyboard|close_dialog_menu"),
|
||||
},
|
||||
[KeyBindingAction.Enter]: {
|
||||
default: {
|
||||
key: Key.ENTER,
|
||||
},
|
||||
displayName: _td("Activate selected button"),
|
||||
displayName: _td("keyboard|activate_button"),
|
||||
},
|
||||
[KeyBindingAction.Space]: {
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user