From 042451bad6ea0e501d1d4f9cedecbe10604f2c85 Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Mon, 29 Dec 2025 19:41:39 +0000 Subject: [PATCH] feat: i18n switcher in app-frontend (#4990) * feat: app i18n stuff * feat: locale switching on load * feat: db migration * feat: polish + fade indicator impl onto TabbedModal * fix: prepr checks * fix: remove staging lock for language switching * fix: lint --- .../instructions/i18n-convert.instructions.md | 46 ++- apps/app-frontend/src/App.vue | 7 + .../components/ui/modal/AppSettingsModal.vue | 20 +- .../ui/settings/LanguageSettings.vue | 71 ++++ apps/app-frontend/src/helpers/settings.ts | 1 + .../app-frontend/src/locales/en-US/index.json | 3 + apps/frontend/src/locales/en-US/index.json | 24 -- apps/frontend/src/pages/settings.vue | 15 +- apps/frontend/src/pages/settings/language.vue | 362 ++---------------- ...c422c3ab7203409083fd3c9c968b00b46918f.json | 12 + ...cb40567541c547181a4ef847318845cf3110.json} | 82 ++-- ...d2394e7ad21de1cb44cf8b93c4b1459cdc716.json | 12 - .../20251229145719_add_locale_setting.sql | 2 + packages/app-lib/src/state/settings.rs | 64 ++-- .../ui/src/components/modal/TabbedModal.vue | 55 ++- .../components/settings/LanguageSelector.vue | 243 ++++++++++++ packages/ui/src/components/settings/index.ts | 1 + packages/ui/src/locales/en-US/index.json | 27 ++ packages/ui/src/utils/common-messages.ts | 42 ++ packages/ui/src/utils/events.ts | 8 + packages/ui/src/utils/index.ts | 1 + 21 files changed, 624 insertions(+), 474 deletions(-) create mode 100644 apps/app-frontend/src/components/ui/settings/LanguageSettings.vue create mode 100644 packages/app-lib/.sqlx/query-175067f04e775f5469146f3cb77c422c3ab7203409083fd3c9c968b00b46918f.json rename packages/app-lib/.sqlx/{query-07ea3a644644de61c4ed7c30ee711d29fd49f10534230b1b03097275a30cb50f.json => query-8e62fba05f331f91822ec204695ecb40567541c547181a4ef847318845cf3110.json} (79%) delete mode 100644 packages/app-lib/.sqlx/query-a40e60da6dd1312d4a1ed52fa8fd2394e7ad21de1cb44cf8b93c4b1459cdc716.json create mode 100644 packages/app-lib/migrations/20251229145719_add_locale_setting.sql create mode 100644 packages/ui/src/components/settings/LanguageSelector.vue create mode 100644 packages/ui/src/utils/events.ts diff --git a/.github/instructions/i18n-convert.instructions.md b/.github/instructions/i18n-convert.instructions.md index 732e391e..b8ce2218 100644 --- a/.github/instructions/i18n-convert.instructions.md +++ b/.github/instructions/i18n-convert.instructions.md @@ -2,7 +2,7 @@ applyTo: '**/*.vue' --- -You are given a Nuxt/Vue single-file component (.vue). Your task is to convert every hard-coded natural-language string in the