From 46f12b27f1c297ef6d75f110a12088d686a434d3 Mon Sep 17 00:00:00 2001 From: Pascal Martineau Date: Thu, 16 Nov 2023 15:05:50 -0500 Subject: [PATCH] Merge branch 'i18n' --- .vscode/launch.json | 33 +++ .vscode/settings.json | 6 + app/components/LocaleSwitcher.vue | 13 + app/components/TheAppFooter.vue | 5 +- app/pages/index.vue | 7 +- auth/components/AuthButton.vue | 7 +- auth/components/TheAuthLoginForm.vue | 11 +- auth/components/TheAuthLogoutForm.vue | 9 +- auth/components/TheAuthPage.vue | 5 +- auth/components/TheAuthSignupForm.vue | 21 +- auth/composables/auth.ts | 8 +- auth/middleware/has-auth-role.ts | 3 +- auth/pages/auth/login.vue | 4 +- auth/pages/auth/logout.vue | 4 +- auth/pages/auth/signup.vue | 4 +- i18n.config.ts | 4 + locales/en.yaml | 24 ++ locales/fr.yaml | 24 ++ nuxt.config.ts | 10 + package.json | 1 + pnpm-lock.yaml | 379 ++++++++++++++++++++------ 21 files changed, 455 insertions(+), 127 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 app/components/LocaleSwitcher.vue create mode 100644 i18n.config.ts create mode 100644 locales/en.yaml create mode 100644 locales/fr.yaml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..bc88153 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + "version": "0.2.0", + "configurations": [ + { + "type": "firefox", + "request": "launch", + "name": "Nuxt client", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + }, + { + "type": "node", + "request": "launch", + "name": "Nuxt server", + "outputCapture": "std", + "program": "${workspaceFolder}/node_modules/nuxi/bin/nuxi.mjs", + "args": [ + "dev" + ] + } + ], + "compounds": [ + { + "name": "Nuxt fullstack", + "configurations": [ + "Nuxt server", + "Nuxt client" + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..474244d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "i18n-ally.localesPaths": [ + "locales" + ], + "i18n-ally.keystyle": "nested" +} \ No newline at end of file diff --git a/app/components/LocaleSwitcher.vue b/app/components/LocaleSwitcher.vue new file mode 100644 index 0000000..a0f0e63 --- /dev/null +++ b/app/components/LocaleSwitcher.vue @@ -0,0 +1,13 @@ + + + diff --git a/app/components/TheAppFooter.vue b/app/components/TheAppFooter.vue index 0bcfa44..d9c6273 100644 --- a/app/components/TheAppFooter.vue +++ b/app/components/TheAppFooter.vue @@ -1,7 +1,8 @@