diff --git a/public/locales/en.json b/public/locales/en.json index 7ef9d0421..ae754c514 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -104,7 +104,48 @@ "enable_the_sharehistory_command": "Enable the /sharehistory command", "if_enabled_this_command_will_allow_users_to_share_encrypted_history_with_ot": "If enabled, this command will allow users to share encrypted history with other newly joined users, as per MSC4268.", "disable_sharehistory_command": "Disable /sharehistory command", - "enable_sharehistory_command": "Enable /sharehistory command" + "enable_sharehistory_command": "Enable /sharehistory command", + "General": { + "formatting": "Formatting", + "month": "Month", + "day_of_the_week": "Day of the Week", + "day_of_the_week_sunday_0": "Day of the week (Sunday = 0)", + "two_letter_day_name": "Two-letter day name", + "short_day_name": "Short day name", + "full_day_name": "Full day name", + "day_of_the_month": "Day of the Month", + "full_month_name": "Full month name", + "short_month_name": "Short month name", + "the_month": "The month", + "two_digit_month": "Two-digit month", + "four_digit_year": "Four-digit year", + "two_digit_year": "Two-digit year" + }, + "KeyboardShortcuts": { + "jump_to_the_highest_priority_unread_room": "Jump to the highest-priority unread room", + "go_to_next_unread_room_cycle": "Go to next unread room (cycle)", + "go_to_previous_unread_room_cycle": "Go to previous unread room (cycle)", + "undo_in_message_editor": "Undo in message editor", + "redo_in_message_editor": "Redo in message editor", + "bold": "Bold", + "italic": "Italic", + "underline": "Underline", + "keyboard_shortcuts": "Keyboard Shortcuts", + "close_keyboard_shortcuts": "Close keyboard shortcuts", + "messages": "Messages", + "navigation": "Navigation" + }, + "Persona": { + "limited_compatibility_with_pluralkit_like_functions": "Limited Compatibility with PluralKit-like functions", + "enable_pk_commands": "Enable PK commands", + "if_enabled_it_will_enable_a_few_pk_style_commands_currently_verry_limited": "If enabled, it will enable a few pk style commands, currently verry limited", + "disable_pk_commands": "disable pk; commands", + "enable_pks_commands": "enable pk; commands", + "enable_shorthands": "Enable Shorthands", + "if_enabled_you_can_use_shorthands_to_use_a_persona_for_one_message_only_eg": "If enabled, you can use shorthands to use a Persona for one message only (eg. '✨:test')", + "disable_checking_typed_messages_for_shorthands": "disable checking typed messages for shorthands", + "enable_checking_typed_messages_for_shorthands": "enable checking typed messages for shorthands" + } }, "General": { "continue": "Continue", diff --git a/src/app/features/settings/Persona/PKCompat.tsx b/src/app/features/settings/Persona/PKCompat.tsx index 8d55eaec1..6d84561c7 100644 --- a/src/app/features/settings/Persona/PKCompat.tsx +++ b/src/app/features/settings/Persona/PKCompat.tsx @@ -4,6 +4,7 @@ import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; import { Box, Switch, Text } from 'folds'; import { SequenceCardStyle } from '../styles.css'; +import { t } from 'i18next'; export function PKCompatSettings() { const [usePKCompat, setUsePKCompat] = useSetting(settingsAtom, 'pkCompat'); @@ -11,7 +12,7 @@ export function PKCompatSettings() { return ( - Limited Compatibility with PluralKit-like functions + {t('Settings.Persona.limited_compatibility_with_pluralkit_like_functions')} } /> } diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index 29361bdd6..49066da76 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -47,6 +47,7 @@ import { isKeyHotkey } from 'is-hotkey'; import { settingsSyncLastSyncedAtom, settingsSyncStatusAtom } from '$hooks/useSettingsSync'; import { exportSettingsAsJson, importSettingsFromJson } from '$utils/settingsSync'; import { SettingsSectionPage } from '../SettingsSectionPage'; +import { t } from 'i18next'; type DateHintProps = { hasChanges: boolean; @@ -75,26 +76,26 @@ function DateHint({ hasChanges, handleReset }: Readonly) { >
- Formatting + {t('Settings.General.formatting')}
- Year + {t('Settings.General.year')}
YY {': '} - Two-digit year + {t('Settings.General.two_digit_year')} {' '} YYYY - {': '}Four-digit year + {': '}{t('Settings.General.four_digit_year')} @@ -102,31 +103,31 @@ function DateHint({ hasChanges, handleReset }: Readonly) {
- Month + {t('Settings.General.month')}
M - {': '}The month + {': '}{t('Settings.General.the_month')} MM - {': '}Two-digit month + {': '}{t('Settings.General.two_digit_month')} {' '} MMM - {': '}Short month name + {': '}{t('Settings.General.short_month_name')} MMMM - {': '}Full month name + {': '}{t('Settings.General.full_month_name')} @@ -134,13 +135,13 @@ function DateHint({ hasChanges, handleReset }: Readonly) {
- Day of the Month + {t('Settings.General.day_of_the_month')}
D - {': '}Day of the month + {': '}{t('Settings.General.day_of_the_month')} @@ -153,31 +154,31 @@ function DateHint({ hasChanges, handleReset }: Readonly) {
- Day of the Week + {t('Settings.General.day_of_the_week')}
d - {': '}Day of the week (Sunday = 0) + {': '}{t('Settings.General.day_of_the_week_sunday_0')} dd - {': '}Two-letter day name + {': '}{t('Settings.General.two_letter_day_name')} ddd - {': '}Short day name + {': '}{t('Settings.General.short_day_name')} dddd - {': '}Full day name + {': '}{t('Settings.General.full_day_name')} diff --git a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx index a0b52da48..79105ef97 100644 --- a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx +++ b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx @@ -7,6 +7,7 @@ import { Box, Scroll, Text, config } from 'folds'; import { PageContent } from '$components/page'; import { SettingsSectionPage } from '../SettingsSectionPage'; +import { t } from 'i18next'; type ShortcutEntry = { keys: string; @@ -29,21 +30,21 @@ function formatKey(key: string): string { const SHORTCUT_CATEGORIES: ShortcutCategory[] = [ { - name: 'Navigation', + name: t('Settings.KeyboardShortcuts.navigation'), shortcuts: [ - { keys: 'Alt+N', description: 'Jump to the highest-priority unread room' }, - { keys: 'Alt+Shift+Down', description: 'Go to next unread room (cycle)' }, - { keys: 'Alt+Shift+Up', description: 'Go to previous unread room (cycle)' }, + { keys: 'Alt+N', description: t('Settings.KeyboardShortcuts.jump_to_the_highest_priority_unread_room') }, + { keys: 'Alt+Shift+Down', description: t('Settings.KeyboardShortcuts.go_to_next_unread_room_cycle') }, + { keys: 'Alt+Shift+Up', description: t('Settings.KeyboardShortcuts.go_to_previous_unread_room_cycle') }, ], }, { - name: 'Messages', + name: t('Settings.KeyboardShortcuts.messages'), shortcuts: [ - { keys: 'Ctrl+Z / ⌘+Z', description: 'Undo in message editor' }, - { keys: 'Ctrl+Shift+Z / ⌘+Shift+Z', description: 'Redo in message editor' }, - { keys: 'Ctrl+B / ⌘+B', description: 'Bold' }, - { keys: 'Ctrl+I / ⌘+I', description: 'Italic' }, - { keys: 'Ctrl+U / ⌘+U', description: 'Underline' }, + { keys: 'Ctrl+Z / ⌘+Z', description: t('Settings.KeyboardShortcuts.undo_in_message_editor') }, + { keys: 'Ctrl+Shift+Z / ⌘+Shift+Z', description: t('Settings.KeyboardShortcuts.redo_in_message_editor') }, + { keys: 'Ctrl+B / ⌘+B', description: t('Settings.KeyboardShortcuts.bold') }, + { keys: 'Ctrl+I / ⌘+I', description: t('Settings.KeyboardShortcuts.italic') }, + { keys: 'Ctrl+U / ⌘+U', description: t('Settings.KeyboardShortcuts.underline') }, ], }, ]; @@ -112,9 +113,9 @@ type KeyboardShortcutsProps = { export function KeyboardShortcuts({ requestBack, requestClose }: KeyboardShortcutsProps) { return (