OpenParable
Skip to content
← Back to skills

Managing Translations

Business
managing-translations

Managing Translations is an Agent Skill for business published in the Comfy-Org/workflow_templates repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Manages internationalization and translations for ComfyUI workflow templates. Syncs translations, adds new languages, checks translation coverage, and manages locale files. Use when asked to: translate, add translations, sync translations, check translations, missing translations, add a language, localize, internationalize, i18n, update translations, translation status, which templates need translation, language support, sync locales, translate description, translate title, add Chinese, add Japanese, add Spanish, multi-language, multilingual. Triggers on: translate, translation, i18n, locale, language, localize, internationalize, sync translations, missing translations.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Comfy-Org/workflow_templates/blob/HEAD/.claude/skills/managing-translations/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/managing-translations, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Managing Translations

Overview

The repo supports 11 languages. The English master file is templates/index.json. Locale files follow the pattern templates/index.{locale}.json:

CodeLanguageFile
enEnglishtemplates/index.json (master)
zhChinese (Simplified)templates/index.zh.json
zh-TWChinese (Traditional)templates/index.zh-TW.json
jaJapanesetemplates/index.ja.json
koKoreantemplates/index.ko.json
esSpanishtemplates/index.es.json
frFrenchtemplates/index.fr.json
ruRussiantemplates/index.ru.json
trTurkishtemplates/index.tr.json
arArabictemplates/index.ar.json
pt-BRPortuguese (Brazil)templates/index.pt-BR.json

How Sync Works

Run the sync script to propagate changes from English master to all locale files:

python3 scripts/sync/sync_data.py --templates-dir templates

What sync does

  • Technical fields (models, date, size, vram, tags, etc.) are auto-copied from English master to all locales.
  • Translatable fields (title, description) are preserved if already translated — they are NOT overwritten.
  • New templates get English fallback text until translated.
  • Tags are auto-translated using mappings defined in scripts/data/i18n.json.

Useful flags

  • --dry-run — Preview changes without writing files.
  • --force-sync-language-fields — Overwrite existing translations with English text (destructive — use with caution).

Translation Tracking

scripts/data/i18n.json stores:

  • Translation status for each template (per language).
  • Tag translation mappings (English → each language).
  • Category title translations.

Adding Translations for a Template

  1. Edit scripts/data/i18n.json to add translations under the template's name.

  2. Run the sync script:

    python3 scripts/sync/sync_data.py --templates-dir templates
    
  3. Verify the locale files were updated correctly.

Checking Translation Coverage

  • Look at scripts/.output/missing_translations_report.json for untranslated entries.
  • Or manually compare a locale file against index.json to find templates with English-only text.

Site-Level i18n (Separate System)

The template site (site/) has its own i18n system for UI strings — this is separate from the template translation system above:

  • site/src/i18n/config.ts — Language definitions.
  • site/src/i18n/ui.ts — UI string translations.
  • site/src/i18n/utils.ts — URL localization helpers.
  • Site sync: pnpm run sync (from site/ directory) reads all locale index files.

After Changes, Always Run

python3 scripts/sync/sync_data.py --templates-dir templates
python scripts/validate/validate_templates.py

Rules

  • English index.json is the master — always edit it first for structural changes.
  • Never manually edit locale files for technical fields — use the sync script.
  • Translatable fields (title, description) CAN be manually edited in locale files.
  • After adding a new template to index.json, always run sync to propagate to all locales.
  • Tag translations go in scripts/data/i18n.json, not in the locale files directly.