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 1/5] 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 @@