From 4b4e8b7aa8383ae28085fb2eb8685d4fc3a5a159 Mon Sep 17 00:00:00 2001 From: jezzahehn Date: Thu, 12 Jun 2025 18:46:42 -0400 Subject: [PATCH 1/6] fix: Reverting default locale to en_US --- apps/vdn-static/src/i18n/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/vdn-static/src/i18n/index.ts b/apps/vdn-static/src/i18n/index.ts index 29633fc..c474d89 100644 --- a/apps/vdn-static/src/i18n/index.ts +++ b/apps/vdn-static/src/i18n/index.ts @@ -9,7 +9,7 @@ export type Locale = keyof typeof locales; const i18n = createI18n<[MessageSchema], Locale>({ legacy: false, - locale: "vp_VL" satisfies Locale, + locale: "en_US" satisfies Locale, fallbackLocale: "en_US" satisfies Locale, messages: locales, }); From 032cfb2bfdf00d47078fbb04216a84657e2e65a0 Mon Sep 17 00:00:00 2001 From: Benjamin Singleton <19498453+tetrogem@users.noreply.github.com> Date: Sat, 14 Jun 2025 11:57:28 -0500 Subject: [PATCH 2/6] feat: implemented new i18n system --- apps/vdn-static/src/App.vue | 2 + .../src/components/organisms/LocalePicker.vue | 43 ++++++++++ .../src/components/pages/HomePage.vue | 28 ++----- .../src/components/pages/ResourcesPage.vue | 24 +----- apps/vdn-static/src/i18n/index.ts | 61 +++++++++++--- apps/vdn-static/src/i18n/locale.ts | 39 +++++++++ apps/vdn-static/src/i18n/types.ts | 8 -- apps/vdn-static/src/locales/en_US.ts | 74 ++++++++++------- apps/vdn-static/src/locales/vp_VL.ts | 80 ++++++++++++------- apps/vdn-static/src/main.ts | 3 +- apps/vdn-static/src/utils/localizeLayout.ts | 16 ++++ 11 files changed, 254 insertions(+), 124 deletions(-) create mode 100644 apps/vdn-static/src/components/organisms/LocalePicker.vue create mode 100644 apps/vdn-static/src/i18n/locale.ts delete mode 100644 apps/vdn-static/src/i18n/types.ts create mode 100644 apps/vdn-static/src/utils/localizeLayout.ts diff --git a/apps/vdn-static/src/App.vue b/apps/vdn-static/src/App.vue index 371ef2a..6fedc9b 100644 --- a/apps/vdn-static/src/App.vue +++ b/apps/vdn-static/src/App.vue @@ -2,6 +2,7 @@ import "./assets/style.scss"; import { ref, type Ref } from "vue"; import { SAMPLE } from "@repo/common/sample"; +import LocalePicker from "./components/organisms/LocalePicker.vue"; const burgerOpen: Ref = ref(false); @@ -45,6 +46,7 @@ const toggleBurger = (): void => { {{ SAMPLE }} + diff --git a/apps/vdn-static/src/components/organisms/LocalePicker.vue b/apps/vdn-static/src/components/organisms/LocalePicker.vue new file mode 100644 index 0000000..d6d5aa6 --- /dev/null +++ b/apps/vdn-static/src/components/organisms/LocalePicker.vue @@ -0,0 +1,43 @@ + + + diff --git a/apps/vdn-static/src/components/pages/HomePage.vue b/apps/vdn-static/src/components/pages/HomePage.vue index ff642d6..6c4cac9 100644 --- a/apps/vdn-static/src/components/pages/HomePage.vue +++ b/apps/vdn-static/src/components/pages/HomePage.vue @@ -1,25 +1,9 @@