Skip to content

feat(frontend): add Vue I18n 9, locale files for home page#215

Open
isabelccc wants to merge 1 commit into666ghj:mainfrom
isabelccc:feat/i18n-setup-home
Open

feat(frontend): add Vue I18n 9, locale files for home page#215
isabelccc wants to merge 1 commit into666ghj:mainfrom
isabelccc:feat/i18n-setup-home

Conversation

@isabelccc
Copy link

@isabelccc isabelccc commented Mar 17, 2026

feat(frontend): 添加 Vue I18n 9 并对 Home 页面进行国际化

此pr为 页面进行国际化系列1)

  • 引入 vue-i18n@9;在 src/locales 下新增 zh-CN.json 和 en.json(包含 home.、common. 等命名空间)
  • 新建 src/i18n.js:使用 createI18n,locale 从 localStorage 读取,fallback 为 en,并实现 applyLocaleToDocument()
  • 在 main.js 中:app.use(i18n),初始化时应用当前语言到 document
  • Home.vue:将界面文案替换为 $t('home.xxx');在导航栏添加语言切换(中文 / English);切换时更新 localStorage、document.documentElement.lang 以及 <title>
  • 新增 docs/I18N-BRANCHES.md,说明后续 Process、History、Steps、Report、Interaction 等模块的分支规划
    更多详情请参考 /MiroFish/docs/I18N-BRANCHES.md
    参考图如下
    以及右上角多了一个语言选项

translation below:
feat(frontend): add Vue I18n 9 and i18n support for Home page

Part 1 of the internationalization series.

  • Add vue-i18n@9
  • Add zh-CN / en locale files
  • Setup i18n initialization
  • Replace Home page text with i18n keys
  • Add language switcher in navbar
  • Add i18n branch plan doc

Language selector added to top-right corner.

Screenshot 2026-03-16 at 8 53 32 PM Screenshot 2026-03-16 at 8 53 26 PM

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Mar 17, 2026
@isabelccc isabelccc changed the title feat(frontend): add Vue I18n 9, locale files, and Home + language swi… feat(frontend): add Vue I18n 9, locale files for home page Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant