|
| 1 | +--- |
| 2 | +name: airflow-translations |
| 3 | +description: > |
| 4 | + Translate, review, and maintain Apache Airflow i18n locale strings in JSON |
| 5 | + translation files. Use when working with internationalization, localization, |
| 6 | + or translation tasks in airflow-core/src/airflow/ui/public/i18n/locales/. |
| 7 | + Covers Airflow terminology conventions and translation guidelines. |
| 8 | +license: Apache-2.0 |
| 9 | +--- |
| 10 | +<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 --> |
| 11 | + |
| 12 | +# Airflow Translations |
| 13 | + |
| 14 | +## Locale-Specific Guidelines |
| 15 | + |
| 16 | +Before translating, you **must** read the locale-specific guideline file for |
| 17 | +the target language. Locale files are located at `locales/<locale-name>.md` |
| 18 | +relative to this skill directory. |
| 19 | + |
| 20 | +Match the translation task to the correct locale file using the table below: |
| 21 | + |
| 22 | +| Locale Code | Language | Guideline File | |
| 23 | +| ----------- | ----------------------- | ------------------------------- | |
| 24 | +| `ar` | Arabic | [locales/ar.md](locales/ar.md) | |
| 25 | +| `ca` | Catalan | [locales/ca.md](locales/ca.md) | |
| 26 | +| `de` | German | [locales/de.md](locales/de.md) | |
| 27 | +| `el` | Greek | [locales/el.md](locales/el.md) | |
| 28 | +| `es` | Spanish | [locales/es.md](locales/es.md) | |
| 29 | +| `fr` | French | [locales/fr.md](locales/fr.md) | |
| 30 | +| `he` | Hebrew | [locales/he.md](locales/he.md) | |
| 31 | +| `hi` | Hindi | [locales/hi.md](locales/hi.md) | |
| 32 | +| `hu` | Hungarian | [locales/hu.md](locales/hu.md) | |
| 33 | +| `it` | Italian | [locales/it.md](locales/it.md) | |
| 34 | +| `ja` | Japanese | [locales/ja.md](locales/ja.md) | |
| 35 | +| `ko` | Korean | [locales/ko.md](locales/ko.md) | |
| 36 | +| `nl` | Dutch | [locales/nl.md](locales/nl.md) | |
| 37 | +| `pl` | Polish | [locales/pl.md](locales/pl.md) | |
| 38 | +| `pt` | Portuguese | [locales/pt.md](locales/pt.md) | |
| 39 | +| `th` | Thai | [locales/th.md](locales/th.md) | |
| 40 | +| `tr` | Turkish | [locales/tr.md](locales/tr.md) | |
| 41 | +| `zh-CN` | Simplified Chinese | [locales/zh-CN.md](locales/zh-CN.md) | |
| 42 | +| `zh-TW` | Traditional Chinese | [locales/zh-TW.md](locales/zh-TW.md) | |
| 43 | + |
| 44 | +If the target locale file does not yet exist, follow only the global rules in this document. |
| 45 | +When a locale-specific guideline conflicts with a global rule, the **locale-specific |
| 46 | +guideline takes precedence**. |
| 47 | + |
| 48 | +## Translation File Structure |
| 49 | + |
| 50 | +All translation files are JSON files located at: |
| 51 | + |
| 52 | +``` |
| 53 | +airflow-core/src/airflow/ui/public/i18n/locales/<locale-name>/ |
| 54 | +``` |
| 55 | + |
| 56 | +Each locale directory contains namespace JSON files that mirror the English |
| 57 | +locale (`en/`). The English locale is the **default locale** and the primary |
| 58 | +source for all translations. The current namespace files are: |
| 59 | + |
| 60 | +<!-- START namespace-files, please keep comment here to allow auto update --> |
| 61 | +`admin.json`, `assets.json`, `browse.json`, `common.json`, `components.json`, `dag.json`, `dags.json`, `dashboard.json`, `hitl.json`, `tasks.json` |
| 62 | +<!-- END namespace-files, please keep comment here to allow auto update --> |
| 63 | + |
| 64 | +## Translation Principles |
| 65 | + |
| 66 | +1. **Concise and clear** — Translations are used in UI elements (buttons, |
| 67 | + labels, tooltips). Keep them short and suitable for constrained UI space. |
| 68 | +2. **Consistent** — Always use the same translated term for the same English |
| 69 | + term. Refer to the glossary in your locale file. |
| 70 | +3. **Accurate** — Maintain the original meaning and intent. |
| 71 | +4. **Neutral tone** — Language should be polite and neutral. |
| 72 | +5. **Local conventions** — Respect date formats, number formatting, and |
| 73 | + formal/informal tone as appropriate for the locale. |
| 74 | + |
| 75 | +## Do-Not-Translate Terms |
| 76 | + |
| 77 | +The following terms should remain in English by default. Locale-specific |
| 78 | +guidelines may override individual entries where established conventions exist: |
| 79 | + |
| 80 | +| Term | Reason | |
| 81 | +| ------------------------ | ------------------------------------------------------------- | |
| 82 | +| `Airflow` | Product name | |
| 83 | +| `Dag` / `Dags` | Airflow convention; always use `Dag`, never `DAG` | |
| 84 | +| `XCom` / `XComs` | Airflow cross-communication mechanism name | |
| 85 | +| `Provider` / `Providers` | Airflow extension package name | |
| 86 | +| `REST API` | Standard technical term | |
| 87 | +| `JSON` | Standard technical format name | |
| 88 | +| `ID` | Universal abbreviation | |
| 89 | +| `PID` | Unix process identifier | |
| 90 | +| `UTC` | Time standard | |
| 91 | +| `Schema` | Database term (keep unless locale has established convention) | |
| 92 | + |
| 93 | +## Variable and Placeholder Handling |
| 94 | + |
| 95 | +Translation strings use the `{{variable}}` interpolation syntax (i18next |
| 96 | +format): |
| 97 | + |
| 98 | +- **Never translate** variable names inside `{{...}}`. |
| 99 | +- **Never remove** any `{{variable}}` placeholders. |
| 100 | +- **Reorder** placeholders as needed to match natural word order. |
| 101 | +- **Preserve** exact variable casing (e.g., `{{dagDisplayName}}`). |
| 102 | + |
| 103 | +## Plural Forms |
| 104 | + |
| 105 | +Airflow uses i18next plural suffixes (`_one`, `_other`, and optionally `_zero`, |
| 106 | +`_two`, `_few`, `_many`). Provide translations for **all** plural suffixes |
| 107 | +relevant to the language you provide translation for. |
| 108 | + |
| 109 | +## Hotkeys |
| 110 | + |
| 111 | +Hotkey values (e.g., `"hotkey": "e"`) are literal key bindings and should |
| 112 | +**not** be translated unless the locale-specific guideline specifies otherwise. |
| 113 | + |
| 114 | +## Translation Workflow |
| 115 | + |
| 116 | +1. **Read** the locale-specific guideline (`locales/<locale-name>.md`). |
| 117 | +2. **Identify** missing translations — use `--add-missing` to generate stubs |
| 118 | + prefixed with `TODO: translate`: |
| 119 | + |
| 120 | + ```bash |
| 121 | + breeze ui check-translation-completeness --language <locale-name> --add-missing |
| 122 | + ``` |
| 123 | + |
| 124 | +3. **Translate** the `TODO: translate` entries using this guide and the locale |
| 125 | + glossary. |
| 126 | +4. **Remove** extra keys not present in the English source: |
| 127 | + |
| 128 | + ```bash |
| 129 | + breeze ui check-translation-completeness --language <locale-name> --remove-extra |
| 130 | + ``` |
| 131 | + |
| 132 | +5. **Validate** completeness: |
| 133 | + |
| 134 | + ```bash |
| 135 | + breeze ui check-translation-completeness --language <locale-name> |
| 136 | + ``` |
| 137 | + |
| 138 | +## Common Airflow Terms |
| 139 | + |
| 140 | +The following terms appear frequently in the English source files. Each locale |
| 141 | +glossary should define consistent translations for them. The **Context** column |
| 142 | +disambiguates terms that may have different meanings outside of Airflow: |
| 143 | + |
| 144 | +| English Term | Context | |
| 145 | +| -------------------- | ---------------------------------------- | |
| 146 | +| Task | Unit of work in a Dag | |
| 147 | +| Task Instance | Single run of a Task | |
| 148 | +| Task Group | Logical grouping of Tasks | |
| 149 | +| Dag Run | Single execution of a Dag | |
| 150 | +| Operator | Type/class that defines a Task | |
| 151 | +| Trigger | Event or mechanism that starts a run | |
| 152 | +| Trigger Rule | Condition that determines Task execution | |
| 153 | +| Triggerer | Airflow component that handles triggers | |
| 154 | +| Schedule / Scheduler | Timing configuration / Airflow component | |
| 155 | +| Backfill | Retroactive execution of Dag Runs | |
| 156 | +| Asset | Data dependency tracked by Airflow | |
| 157 | +| Asset Event | Notification that an Asset was updated | |
| 158 | +| Connection | External system credentials | |
| 159 | +| Variable | Key-value configuration store | |
| 160 | +| Pool | Resource constraint mechanism | |
| 161 | +| Plugin | Extensibility mechanism | |
| 162 | +| Executor | Component that runs Tasks | |
| 163 | +| Queue | Execution queue for Tasks | |
| 164 | +| Audit Log | Record of system events | |
0 commit comments