You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: rename i18n commands for better consistency (CherryHQ#11938)
* refactor: rename i18n commands for better consistency
- Rename `check:i18n` to `i18n:check`
- Rename `sync:i18n` to `i18n:sync`
- Rename `update:i18n` to `i18n:translate` (clearer purpose)
- Rename `auto:i18n` to `i18n:all` (runs check, sync, and translate)
- Update lint script to use new `i18n:check` command name
This follows the common naming convention of grouping related commands
under a namespace prefix (e.g., `test:main`, `test:renderer`).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* refactor: update i18n command names and improve documentation
- Renamed i18n commands for consistency: `sync:i18n` to `i18n:sync`, `check:i18n` to `i18n:check`, and `auto:i18n` to `i18n:translate`.
- Updated relevant documentation and scripts to reflect new command names.
- Improved formatting and clarity in i18n-related guides and scripts.
This change enhances the clarity and usability of i18n commands across the project.
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>
Updates translations in language files under `src/renderer/src/i18n/translate` at the object level, preserving existing translations and only updating new content.
157
-
158
-
**Not recommended** — prefer `auto:i18n` for translation tasks.
159
-
160
-
```bash
161
-
yarn update:i18n
151
+
yarn i18n:translate
162
152
```
163
153
164
154
### Workflow
165
155
166
156
1. During development, first add the required text in `zh-cn.json`
167
157
2. Confirm it displays correctly in the Chinese environment
168
-
3. Run `yarn sync:i18n` to propagate the keys to other language files
169
-
4. Run `yarn auto:i18n` to perform machine translation
158
+
3. Run `yarn i18n:sync` to propagate the keys to other language files
159
+
4. Run `yarn i18n:translate` to perform machine translation
170
160
5. Grab a coffee and let the magic happen!
171
161
172
162
## Best Practices
173
163
174
164
1.**Use Chinese as Source Language**: All development starts in Chinese, then translates to other languages.
175
-
2.**Run Check Script Before Commit**: Use `yarn check:i18n` to catch i18n issues early.
165
+
2.**Run Check Script Before Commit**: Use `yarn i18n:check` to catch i18n issues early.
176
166
3.**Translate in Small Increments**: Avoid accumulating a large backlog of untranslated content.
177
167
4.**Keep Keys Semantically Clear**: Keys should clearly express their purpose, e.g., `user.profile.avatar.upload.error`
0 commit comments