mirror of
https://github.com/hiddify/hiddify-next.git
synced 2026-07-19 21:05:38 +08:00
1.4 KiB
1.4 KiB
Custom Command: update-slang
Requirements: Master Flutter's slang framework. Perform all translations strictly based on project context (Hiddify VPN client).
Execute these phases sequentially when update-slang is triggered:
-
Analyze:
- Scan added files for hardcoded, deleted, or relocated keys.
- Run
dart run slang analyze --split --fulland analyze the generatedmissing_translations_*.jsonandunused_translations_*.jsonfiles insideassets/translations/to identify structural gaps.
-
Propose & Pause (CRITICAL STOP):
- Based on Phase 1 data, propose the updated English translation and JSON hierarchy changes.
- Do NOT exit this phase or modify any other files until the user explicitly approves this English update.
-
MD3 Translation & Sync:
- Once approved, generate translations for all other remaining languages based on the English reference.
- Strictly follow Material Design 3 guidelines (sentence case, concise, no periods) and update the respective translation files (keep technical networking terms in English).
-
Refactor & Build:
- Update the source code, replacing hardcoded strings with
t.path.to.key. - Run
dart run slangto regenerate localization files. - Delete the generated
missing_translations_*.jsonandunused_translations_*.jsonfiles fromassets/translations/to clean up the workspace.
- Update the source code, replacing hardcoded strings with