YAML-based translation keys, delta-mode import, DeepSeek API automation, and adding new languages
The Workbench uses a YAML-based translation system. Every user-visible string is identified by a hierarchical key (e.g. recipe.stages.filter.title). Translation files (en.yaml, th.yaml, zh.yaml, etc.) map these keys to translations. The frontend and backend share the same key namespace — a single translation file covers both.
Keys follow a dot-separated hierarchy: module.component.element. The root namespace is the source file or feature area. Example: recipe.stages.filter.description maps to the description text in the recipe editor's Filter stage. Keys are strictly alphabetical — no numeric indices or generated identifiers.
To add a language: 1. Create a new YAML file in frontend/locales/ (e.g. ko.yaml for Korean). 2. Populate it with the English keys as a baseline. 3. Run the DeepSeek translation script: python3 translate_yaml.py --source en --target ko. This translates every key using the DeepSeek API. 4. Review the output — the script produces a diff of changes. 5. Add the language code to the globe icon dropdown in shared UI components. 6. The new language appears automatically — no restart, no rebuild.
After the initial translation, subsequent updates use delta mode. The translation script: compares the new English YAML with the last known baseline, identifies added and changed keys, translates only the changed keys, and merges them into the existing translation file — preserving existing translations for unchanged keys. This makes incremental translation updates efficient and preserves manually reviewed translations.
v0.12.0 introduces translation compliance auditing. The audit tool: scans all UI components for hard-coded English strings, compares against the translation key registry, reports missing keys and untranslated strings, and generates a compliance score per language. The goal is 100% translation coverage for all supported languages. See the Multilingual UI page for details on supported languages.