From dccbe7599f2bbd0856c27e75aa076cd69a3f11ba Mon Sep 17 00:00:00 2001 From: xiaomai Date: Tue, 4 Nov 2025 10:47:06 +0800 Subject: [PATCH] feat(i18n): add internationalization support This commit introduces internationalization (i18n) support by integrating the `@nuxtjs/i18n` module. It configures English (en) and Simplified Chinese (zh-CN) locales, adds a language selector to the header, and internationalizes the index page content using translation files. --- .gitignore | 2 ++ .repomixignore | 4 ++++ .vscode/settings.json | 7 ++++++ app/pages/index.vue | 18 ++++++++++++++- i18n/locales/en-US/index.json | 5 +++++ i18n/locales/zh-CN/index.json | 5 +++++ nuxt.config.ts | 19 +++++++++++++++- package.json | 1 + repomix.config.json | 42 +++++++++++++++++++++++++++++++++++ 9 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 .repomixignore create mode 100644 .vscode/settings.json create mode 100644 i18n/locales/en-US/index.json create mode 100644 i18n/locales/zh-CN/index.json create mode 100644 repomix.config.json diff --git a/.gitignore b/.gitignore index 4a7f73a..99b3c47 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ logs .env .env.* !.env.example + +repomix-output.xml \ No newline at end of file diff --git a/.repomixignore b/.repomixignore new file mode 100644 index 0000000..c63e5bc --- /dev/null +++ b/.repomixignore @@ -0,0 +1,4 @@ +# Add patterns to ignore here, one per line +# Example: +# *.log +# tmp/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..44f8c43 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "i18n-ally.localesPaths": ["i18n/locales"], +"i18n-ally.enabledFrameworks": [ + "vue" +], +"i18n-ally.keystyle": "nested" +} diff --git a/app/pages/index.vue b/app/pages/index.vue index 74c3f4d..0f820a5 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,6 +1,19 @@