--- name: airflow-translations description: > 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 the target locale already exists. Check if a directory for the locale exists under `airflow-core/src/airflow/ui/public/i18n/locales/<locale>/`. If it does, skip ahead 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 alphabetical ordering 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 plural suffixes for the language to the `PLURAL_SUFFIXES` dict. Check the i18next plural rules for the language at <https://jsfiddle.net/6bpxsgd4> to determine which suffixes are needed: ``` "<locale>": ["<suffixes>"], ``` **`.github/boring-cyborg.yml`**: under `labelPRBasedOnFilePath`, add: ```yaml translation:<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 every English namespace file into the new locale directory. This populates each key with a `TODO: translate:` stub: ```bash breeze 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 the target language (see the table under **Locale-Specific Guidelines** below). If one exists, it contains the glossary, tone rules, and formatting conventions that must be followed. If no locale-specific guideline exists yet, follow the translation 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 Tra
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/. Оригинален текст · няма потвърден превод на български
Освен тази библиотека Level 8 прави сайтове и онлайн магазини за фирми от цяла България, а цените са публични. Ако вече имате сайт, безплатната проверка показва за под минута колко е бърз на телефон и дали е защитен.