mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
- Added i18next and react-i18next for multi-language support in the application. - Created localization files for English, Japanese, Korean, Traditional Chinese, and Simplified Chinese. - Implemented translation hooks in various components to replace hardcoded strings with translatable keys. - Updated ESLint configuration to include new i18n JSON validation rules. - Introduced a new event bus for handling i18n updates during development. Signed-off-by: Innei <tukon479@gmail.com>
11 lines
616 B
Plaintext
11 lines
616 B
Plaintext
---
|
|
description:
|
|
globs: locales/**/*.json
|
|
alwaysApply: false
|
|
---
|
|
i18n 编写规范。
|
|
|
|
1. 阅读并遵循 https://www.i18next.com/translation-function/formatting
|
|
2. 使用扁平键。使用 `.` 方式分割。不能使用 object 形式嵌套。
|
|
3. 对单复数敏感的语言应该区分,使用 `_one` 和 `_other` 的形式。
|
|
4. 在 build 阶段,扁平化的点分隔键(如 'exif.custom.rendered.custom')会自动转换为嵌套的 object 对象,因此可能引发冲突。例如,'exif.custom.rendered.custom' 会与 'exif.custom.rendered' 发生冲突。请避免使用此类点分隔的扁平键。 |