feat(i18n): integrate internationalization support into dashboard

- Added i18next and react-i18next for localization support.
- Created i18n configuration in `src/i18n.ts` and set up language detection.
- Introduced `I18nProvider` to manage i18n context and resource updates.
- Added localization files for English and Chinese (Simplified) with necessary translations.
- Updated `ErrorElement` component to utilize translations for error messages.
- Enhanced dashboard documentation with i18n usage guidelines.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-18 01:31:06 +08:00
parent c8b7fcc882
commit d7084a3201
16 changed files with 236 additions and 24 deletions

13
locales/dashboard/en.json Normal file
View File

@@ -0,0 +1,13 @@
{
"app.name": "Afilmory Dashboard",
"error.boundary.description": "We encountered an unexpected error",
"error.boundary.go-back": "Go Back",
"error.boundary.help": "If this problem persists, please report it to our team.",
"error.boundary.reload": "Reload Application",
"error.boundary.report": "Report on GitHub",
"error.boundary.title": "Something went wrong",
"nav.library": "Library",
"nav.overview": "Overview",
"nav.settings": "Settings",
"nav.users": "Users"
}

View File

@@ -0,0 +1,13 @@
{
"app.name": "Afilmory 管理后台",
"error.boundary.description": "我们遇到了一个意料之外的错误",
"error.boundary.go-back": "返回上一页",
"error.boundary.help": "如果问题持续出现,请反馈给我们的团队。",
"error.boundary.reload": "重新加载",
"error.boundary.report": "在 GitHub 上反馈",
"error.boundary.title": "系统出现问题",
"nav.library": "图库",
"nav.overview": "概览",
"nav.settings": "设置",
"nav.users": "成员"
}