From 66254e02ff6479ba868b4a62f98bd46a5a0ab269 Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Fri, 10 Apr 2026 09:02:36 -0400 Subject: [PATCH] fix(i18n): actually use i18n ctrl_key consistently --- app/composables/usePlatformModifierKey.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/composables/usePlatformModifierKey.ts b/app/composables/usePlatformModifierKey.ts index 7cd7f7bcbb..9d960ecd35 100644 --- a/app/composables/usePlatformModifierKey.ts +++ b/app/composables/usePlatformModifierKey.ts @@ -16,7 +16,9 @@ function detectApplePlatform() { } export function usePlatformModifierKey() { + const { t } = useI18n() const isApplePlatform = useState('platform:is-apple', detectApplePlatform) + const ctrlKeyLabel = computed(() => t('shortcuts.ctrl_key')) if (import.meta.client) { onMounted(() => { @@ -26,7 +28,9 @@ export function usePlatformModifierKey() { return { isApplePlatform: computed(() => isApplePlatform.value), - primaryModifierKeyLabel: computed(() => (isApplePlatform.value ? '⌘' : 'Ctrl')), - commandPaletteShortcutLabel: computed(() => (isApplePlatform.value ? '⌘ K' : 'Ctrl+K')), + primaryModifierKeyLabel: computed(() => (isApplePlatform.value ? '⌘' : ctrlKeyLabel.value)), + commandPaletteShortcutLabel: computed(() => + isApplePlatform.value ? '⌘ K' : `${ctrlKeyLabel.value}+K`, + ), } }