mirror of
https://github.com/hanzoui/workflow-templates-broken-zap-2026-06-08.git
synced 2026-10-30 20:44:35 +00:00
1.7 KiB
1.7 KiB
Translation Management Guide
Quick Start
Sync translations and templates
# Normal sync
python3 scripts/sync_data.py --templates-dir ./templates
# Preview changes without modifying files
python3 scripts/sync_data.py --templates-dir ./templates --dry-run
Workflow
Adding a New Template
- Add template to
templates/index.json - Run
python3 scripts/sync_data.py --templates-dir ./templates - Check
scripts/i18n.json- new template will be added to_status.pending_templates - Add translations in
scripts/i18n.jsonundertemplatessection - Run sync again to apply translations
Adding Translations
Edit scripts/i18n.json:
{
"templates": {
"template_name": {
"title": {
"en": "English Title",
"zh": "中文标题",
"zh-TW": "繁體中文標題"
},
"description": {
"en": "English Description",
"zh": "中文描述"
}
}
}
}
Adding New Tags
- Use new tag in a template
- Run sync script - new tag will be auto-added to
scripts/i18n.json - Add tag translations in
scripts/i18n.jsonundertagssection - Run sync again
Data Structure
scripts/i18n.json Format
_status.pending_templates- Templates with missing translationstemplates- Template title and description translationstags- Tag translationscategories- Category translations
Supported Languages
zh, zh-TW, ja, ko, es, fr, ru, tr, ar, pt-BR
Notes
- Script automatically syncs technical fields (models, date, size, vram, usage, searchRank, requiresCustomNodes, includeOnDistributions, logos, openSource, status)
- Only title and description require translation
- Tags are auto-translated from
scripts/i18n.json