airflow-translations

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

Add or update translations for the Apache Airflow UI. Guides through setting up locales, scaffolding translation files, translating with locale-specific guidelines, and validating results. Use when working with i18n tasks in airflow-core/src/airflow/ui/public/i18n/locales/.

.agents/skills/airflow-translations/SKILL.md

Download bundle ↓
main · 2aca1aa20 bundle filesScanned 2026-09-14

SKILL.md

2,205 tokens · o200k_base · 9,465 bytes

Source excerpt starting at line 1.
---name: airflow-translationsdescription: >  Add or update translations for the Apache Airflow UI.  Guides through setting up locales, scaffolding translation files, translating  with locale-specific guidelines, and validating results. Use when working with  i18n tasks in airflow-core/src/airflow/ui/public/i18n/locales/.license: Apache-2.0---<!-- SPDX-License-Identifier: Apache-2.0     https://www.apache.org/licenses/LICENSE-2.0 --> # Airflow Translations ## Determining the Task Translation work falls into one of two categories depending on whether thetarget locale already exists. Check if a directory for the locale exists under`airflow-core/src/airflow/ui/public/i18n/locales/<locale>/`. If it does, skipahead to **Updating an Existing Translation**. If not, start with **Adding a Translation** below. --- ## Adding a Translation When adding a translation, some configuration files need to be updated before translation work can begin. ### Setting up the locale First, create the locale directory: ```mkdir -p airflow-core/src/airflow/ui/public/i18n/locales/<locale>/``` Then update the following configuration files, keeping the existing alphabeticalordering in each file: **`airflow-core/src/airflow/ui/src/i18n/config.ts`**: add the locale to the`supportedLanguages` array: ```ts{ code: "<locale>", name: "<native name>" },``` **`dev/breeze/src/airflow_breeze/commands/ui_commands.py`**: add the pluralsuffixes for the language to the `PLURAL_SUFFIXES` dict. Check the i18nextplural rules for the language at <https://jsfiddle.net/6bpxsgd4> to determinewhich suffixes are needed: ```"<locale>": ["<suffixes>"],``` **`.github/boring-cyborg.yml`**: under `labelPRBasedOnFilePath`, add: ```yamltranslation:<locale>:  - airflow-core/src/airflow/ui/public/i18n/locales/<locale>/*``` ### Scaffolding the translation files Once the configuration is in place, run the breeze command to copy everyEnglish namespace file into the new locale directory. This populates each keywith a `TODO: translate:` stub: ```bashbreeze ui check-translation-completeness --language <locale> --add-missing``` The generated files will look like this: ```json{  "allRuns": "TODO: translate: All Runs",  "blockingDeps": {    "dependency": "TODO: translate: Dependency",    "reason": "TODO: translate: Reason"  }}``` ### Translating With the scaffolded files in place, read the locale-specific guideline for thetarget language (see the table under **Locale-Specific Guidelines** below). Ifone exists, it contains the glossary, tone rules, and formatting conventionsthat must be followed. If no locale-specific guideline exists yet, follow thetranslation rules described later in this document. Replace every `TODO: translate: <English terminology>` entry, including the prefix,with the translated string. After all entries are translated, continue to **Validation** below. --- ## Updating an Existing Translation When a locale already exists and you need to fill translation gaps, reviseexisting translations, or remove stale keys, start by reading thelocale-specific guideline for the language (see the table under**Locale-Specific Guidelines** below). This establishes the glossary andformatting rules to follow. Next, read the locale's existing JSON files under`airflow-core/src/airflow/ui/public/i18n/locales/<locale>/` to learn theterminology already in use. Consistency with established translations iscritical. If a term has been translated a certain way, reuse that exacttranslation. Then check the current state of completeness: ```bashbreeze ui check-translation-completeness --language <locale>``` If there are **missing** keys, scaffold them with `TODO: translate:` stubs: ```bashbreeze ui check-translation-completeness --language <locale> --add-missing``` If there are **unused** keys — keys that are not required, meaning they areabsent from the English locale or are plural suffixes this language does notneed — remove them: ```bashbreeze ui check-translation-completeness --language <locale> --remove-unused``` Now translate the `TODO: translate:` entries following the locale-specificguideline, then continue to **Validation** below. --- ## Validation After completing translations, run these checks: Check completeness. The output table should show 0 missing, 0 TODOs, 0 unused,and 100% coverage: ```bashbreeze ui check-translation-completeness --language <locale>``` Run pre-commit hooks to fix formatting, licenses, and linting issues: ```bashprek run --from-ref main --hook-stage pre-commit``` --- ## General Translation Rules The following rules apply globally. If the locale-specific guideline for alanguage states differently, follow the locale-specific guideline. ### Terms Kept in English The terms below should remain in English by default. Locale-specific guidelinesmay override individual entries where an established local convention exists: | Term                     | Reason                                       || ------------------------ | -------------------------------------------- || `Airflow`                | Product name                                 || `Dag` / `Dags`           | Airflow convention; always `Dag`, never `DAG`|| `XCom` / `XComs`         | Airflow cross-communication mechanism name   || `Provider` / `Providers` | Airflow extension package name               || `REST API`               | Standard technical term                      || `JSON`                   | Standard technical format name               || `ID`                     | Universal abbreviation                       || `PID`                    | Unix process identifier                      || `UTC`                    | Time standard                                || `Schema`                 | Database term                                | ### Variables and Placeholders Translation strings use `{{variable}}` interpolation (i18next format).Never translate or remove variable names inside `{{…}}`. Placeholders may bereordered as needed for natural word order, but the exact variable casing mustbe preserved (e.g., `{{dagDisplayName}}`). ### Plural Forms Airflow uses i18next plural suffixes (`_one`, `_other`, and optionally `_zero`,`_two`, `_few`, `_many`). Provide translations for all plural suffixes that thelanguage requires — the locale-specific guideline specifies which ones. If nolocale guideline exists, check the i18next plural rules at<https://jsfiddle.net/6bpxsgd4> and provide at minimum `_one` and `_other`. ### Hotkeys Hotkey values (e.g., `"hotkey": "e"`) are literal key bindings and should**not** be translated unless the locale-specific guideline says otherwise. --- ## Translation File Structure All translation files are JSON files located at: ```airflow-core/src/airflow/ui/public/i18n/locales/<locale-name>/``` Each locale directory contains namespace JSON files that mirror the Englishlocale (`en/`). The English locale is the **default locale** and the primarysource for all translations. The current namespace files are: <!-- START namespace-files, please keep comment here to allow auto update -->`admin.json`, `assets.json`, `browse.json`, `common.json`, `components.json`, `dag.json`, `dags.json`, `dashboard.json`, `hitl.json`, `tasks.json`<!-- END namespace-files, please keep comment here to allow auto update --> --- ## Locale-Specific Guidelines Before translating, read the locale-specific guideline file for the targetlanguage. These contain glossaries, tone rules, and formatting conventionstailored to each language. If a locale-specific guideline states differentlyfrom a global rule in this document, follow the locale-specific guideline. | Locale Code | Language                | Guideline File                  || ----------- | ----------------------- | ------------------------------- || `ar`        | Arabic                  | [locales/ar.md](locales/ar.md)  || `ca`        | Catalan                 | [locales/ca.md](locales/ca.md)  || `de`        | German                  | [locales/de.md](locales/de.md)  || `el`        | Greek                   | [locales/el.md](locales/el.md)  || `es`        | Spanish                 | [locales/es.md](locales/es.md)  || `fr`        | French                  | [locales/fr.md](locales/fr.md)  || `he`        | Hebrew                  | [locales/he.md](locales/he.md)  || `hi`        | Hindi                   | [locales/hi.md](locales/hi.md)  || `hu`        | Hungarian               | [locales/hu.md](locales/hu.md)  || `it`        | Italian                 | [locales/it.md](locales/it.md)  || `ja`        | Japanese                | [locales/ja.md](locales/ja.md)  || `ko`        | Korean                  | [locales/ko.md](locales/ko.md)  || `nl`        | Dutch                   | [locales/nl.md](locales/nl.md)  || `pl`        | Polish                  | [locales/pl.md](locales/pl.md)  || `pt`        | Portuguese              | [locales/pt.md](locales/pt.md)  || `th`        | Thai                    | [locales/th.md](locales/th.md)  || `tr`        | Turkish                 | [locales/tr.md](locales/tr.md)  || `zh-CN`     | Simplified Chinese      | [locales/zh-CN.md](locales/zh-CN.md) || `zh-TW`     | Traditional Chinese     | [locales/zh-TW.md](locales/zh-TW.md) | If the target locale file does not yet exist, follow only the global rules inthis document. 
Discovery context

Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.