Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
13ab182
Feat(i18n): Move translation files to public, use i18next-http-backend
choo121600 Jun 14, 2025
0a90623
Adopted i18next-http-backend
choo121600 Jun 14, 2025
2b8be2a
Fix(i18n): Update locales directory path to public for translation files
choo121600 Jun 14, 2025
40ed727
Fix(i18n): Update static file path for translation locales
choo121600 Jun 14, 2025
a28bb14
Fix(i18n): Update translation config file path
choo121600 Jun 14, 2025
6ad821d
Fix(i18n): Update ESLint configuration to include jsonc-parser
choo121600 Jun 14, 2025
a70a358
Fix(i18n): Update ESLint file patterns and add 'components' to namesp…
choo121600 Jun 14, 2025
48fcb91
Fix(i18n): Initialize i18n(en) in DagCard tests
choo121600 Jun 14, 2025
50267c3
chore: enforce consistent array type syntax per @typescript-eslint rule
choo121600 Jun 14, 2025
2010dcf
Revert "chore: enforce consistent array type syntax per @typescript-e…
choo121600 Jun 15, 2025
71cfb8d
Fix(i18n): Ignore i18n locale files in ESLint TypeScript rules
choo121600 Jun 15, 2025
fda512b
Fix(tests): Remove unused imports and clean up test setup
choo121600 Jun 15, 2025
0a0818e
Apply pre-commit formatting to openapi-gen/ files as per #51755
choo121600 Jun 16, 2025
efb2a73
Fix(eslint): Update i18n and TypeScript rules configuration
choo121600 Jun 17, 2025
6376d32
Apply ESLint and i18nRule
choo121600 Jun 19, 2025
636cfcb
Mov Arabic and French translations to public
choo121600 Jun 19, 2025
ee05571
Fix: Update translation file paths to public directory
choo121600 Jun 19, 2025
fea261a
Moved i18n doc and completeness checker script from public to dev/i18n
choo121600 Jun 19, 2025
f36856d
fix(i18n): i18n policy document translation completeness check command
choo121600 Jun 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

# Translation Owners (i18n)
# Note: Non committer engaged translators are listed in comments prevent making file syntax invalid
# See: https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/ui/src/i18n/README.md#43-engaged-translator
airflow-core/src/airflow/ui/src/i18n/locales/ar/ @shahar1 @hussein-awala # + @ahmadtfarhan
airflow-core/src/airflow/ui/src/i18n/locales/de/ @jscheffl # + @TJaniF @m1racoli
airflow-core/src/airflow/ui/src/i18n/locales/he/ @eladkal @shahar1 @romsharon98 # +@Dev-iL
airflow-core/src/airflow/ui/src/i18n/locales/nl/ @BasPH # + @DjVinnii
airflow-core/src/airflow/ui/src/i18n/locales/pl/ @potiuk @mobuchowski # + @kacpermuda
airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/ @Lee-W @jason810496 # + @RoyLee1224 @guan404ming
airflow-core/src/airflow/ui/src/i18n/locales/fr/ @pierrejeambrun @vincbeck
# See: https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/ui/public/i18n/README.md#43-engaged-translator
airflow-core/src/airflow/ui/public/i18n/locales/ar/ @shahar1 @hussein-awala # + @ahmadtfarhan
airflow-core/src/airflow/ui/public/i18n/locales/de/ @jscheffl # + @TJaniF @m1racoli
airflow-core/src/airflow/ui/public/i18n/locales/he/ @eladkal @shahar1 @romsharon98 # +@Dev-iL
airflow-core/src/airflow/ui/public/i18n/locales/nl/ @BasPH # + @DjVinnii
airflow-core/src/airflow/ui/public/i18n/locales/pl/ @potiuk @mobuchowski # + @kacpermuda
airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/ @Lee-W @jason810496 # + @RoyLee1224 @guan404ming
airflow-core/src/airflow/ui/public/i18n/locales/fr/ @pierrejeambrun @vincbeck

# Security/Permissions
/airflow-core/src/airflow/security/permissions.py @vincbeck
Expand Down
20 changes: 10 additions & 10 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,34 +348,34 @@ labelPRBasedOnFilePath:
- airflow-core/src/airflow/ui/**/*

area:translations:
- airflow-core/src/airflow/ui/src/i18n/**/*
- airflow-core/src/airflow/ui/public/i18n/**/*

translation:default:
- airflow-core/src/airflow/ui/src/i18n/locales/en/*
- airflow-core/src/airflow/ui/public/i18n/locales/en/*

translation:ar:
- airflow-core/src/airflow/ui/src/i18n/locales/ar/*
- airflow-core/src/airflow/ui/public/i18n/locales/ar/*

translation:de:
- airflow-core/src/airflow/ui/src/i18n/locales/de/*
- airflow-core/src/airflow/ui/public/i18n/locales/de/*

translation:fr:
- airflow-core/src/airflow/ui/src/i18n/locales/fr/*
- airflow-core/src/airflow/ui/public/i18n/locales/fr/*

translation:he:
- airflow-core/src/airflow/ui/src/i18n/locales/he/*
- airflow-core/src/airflow/ui/public/i18n/locales/he/*

translation:ko:
- airflow-core/src/airflow/ui/src/i18n/locales/ko/*
- airflow-core/src/airflow/ui/public/i18n/locales/ko/*

translation:nl:
- airflow-core/src/airflow/ui/src/i18n/locales/nl/*
- airflow-core/src/airflow/ui/public/i18n/locales/nl/*

translation:pl:
- airflow-core/src/airflow/ui/src/i18n/locales/pl/*
- airflow-core/src/airflow/ui/public/i18n/locales/pl/*

translation:zh-TW:
- airflow-core/src/airflow/ui/src/i18n/locales/zh-TW/*
- airflow-core/src/airflow/ui/public/i18n/locales/zh-TW/*

area:CLI:
- airflow-core/src/airflow/cli/**/*.py
Expand Down
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,7 @@ repos:
^.*/kinglear\.txt$|
^.*pnpm-lock\.yaml$|
.*/dist/.*|
^airflow-core/src/airflow/ui/src/i18n/locales/de/|
^airflow-core/src/airflow/ui/src/i18n/locales/fr/|
^airflow-core/src/airflow/ui/src/i18n/locales/pl/
^airflow-core/src/airflow/ui/public/i18n/locales/(?!en/).+/
args:
- --ignore-words=docs/spelling_wordlist.txt
- --skip=providers/.*/src/airflow/providers/*/*.rst,providers/*/docs/changelog.rst,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md,*.svg
Expand Down Expand Up @@ -637,7 +635,7 @@ repos:
(?x)
^airflow-core/src/airflow/ui/src/i18n/config\.ts$|
^airflow-core/src/airflow/ui/openapi-gen/|
^airflow-core/src/airflow/ui/src/i18n/locales/de/README\.md$|
^airflow-core/src/airflow/ui/public/i18n/locales/de/README\.md$|
^airflow-core/src/airflow/cli/commands/local_commands/fastapi_api_command\.py$|
^airflow-core/src/airflow/config_templates/|
^airflow-core/src/airflow/models/baseoperator\.py$|
Expand Down Expand Up @@ -1447,7 +1445,7 @@ repos:
name: Check i18n files validity
description: Check i18n files are valid json and have no TODOs
language: python
files: ^airflow-core/src/airflow/ui/src/i18n/locales/.*\.json
files: ^airflow-core/src/airflow/ui/public/i18n/locales/.*\.json
entry: ./scripts/ci/pre_commit/check_i18n_json.py
additional_dependencies: ['rich>=12.4.4']
pass_filenames: false
Expand Down
7 changes: 7 additions & 0 deletions airflow-core/src/airflow/api_fastapi/core_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def init_views(app: FastAPI) -> None:

templates = Jinja2Templates(directory=directory)

if dev_mode:
app.mount(
"/static/i18n/locales",
StaticFiles(directory=Path(AIRFLOW_PATH) / "airflow/ui/public/i18n/locales"),
name="dev_i18n_static",
)

app.mount(
"/static",
StaticFiles(
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/src/airflow/ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ dist/
*.yaml
coverage/*
.pnpm-store
src/i18n/locales/*
public/i18n/locales/*
openapi-gen/
2 changes: 2 additions & 0 deletions airflow-core/src/airflow/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"html-to-image": "^1.11.13",
"i18next": "^25.1.2",
"i18next-browser-languagedetector": "^8.1.0",
"i18next-http-backend": "^3.0.2",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-chartjs-2": "^5.3.0",
Expand Down Expand Up @@ -85,6 +86,7 @@
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.15.0",
"happy-dom": "^17.4.6",
"jsonc-eslint-parser": "^2.4.0",
"msw": "^2.7.5",
"openapi-merge-cli": "^1.3.2",
"prettier": "^3.5.3",
Expand Down
45 changes: 45 additions & 0 deletions airflow-core/src/airflow/ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This policy aims to avoid inconsistencies, maintenance issues, unclear ownership

This policy applies to:

- Each supported locale included in `airflow-core/src/airflow/ui/src/i18n/locales`.
- Each supported locale included in `airflow-core/src/airflow/ui/public/i18n/locales`.
- Contributors making changes in the default locale (English).
- Contributors suggesting new locales to be added to the codebase.
- Maintainers of supported locales in any role defined below.
Expand All @@ -42,7 +42,7 @@ This policy applies to:

**Internationalization (i18n)** - The process of designing a software application so that it can be adapted to various languages and regions without engineering changes (see also the [Wikipedia article](https://en.wikipedia.org/wiki/Internationalization_and_localization)).

**Supported locale** - An officially accepted locale in `airflow-core/src/airflow/ui/src/i18n/locales`.
**Supported locale** - An officially accepted locale in `airflow-core/src/airflow/ui/public/i18n/locales`.

**Default locale** - English (`en`), the primary locale and fallback for all other locales.

Expand Down Expand Up @@ -175,7 +175,7 @@ Translation conflicts MUST be resolved according to the procedures outlined in s
The following steps outline the process for approving a new locale to be added to the supported locales:

- Creating a PR for adding the suggested locale to the codebase ([see example](https://github.com/apache/airflow/pull/51258/files)), which includes:
- The locale files (translated according to the guidelines) in the `airflow-core/src/airflow/ui/src/i18n/locales/<LOCALE_CODE>` directory, where `<LOCALE_CODE>` is the code of the language according to ISO 639-1 standard (e.g., `fr` for French). Languages with regional variants should be handled in separate directories, where the name is suffixed with `-<VARIANT>`, and `<VARIANT>` is the variant that follows ISO 3166-1 or UN M.49 codes in lowercase (e.g., `zh-tw` for Taiwanese Mandarin).
- The locale files (translated according to the guidelines) in the `airflow-core/src/airflow/ui/public/i18n/locales/<LOCALE_CODE>` directory, where `<LOCALE_CODE>` is the code of the language according to ISO 639-1 standard (e.g., `fr` for French). Languages with regional variants should be handled in separate directories, where the name is suffixed with `-<VARIANT>`, and `<VARIANT>` is the variant that follows ISO 3166-1 or UN M.49 codes in lowercase (e.g., `zh-tw` for Taiwanese Mandarin).
- Making the required modifications in `airflow-core/src/airflow/ui/src/i18n/config.ts` ([see example](https://github.com/apache/airflow/pull/51258/files#diff-bfb4d5fafd26d206fb4a545a41ba303f33d15a479d21e0a726fd743bdf9717ff)).
- Changes to the `.github/CODEOWNERS` file to include the designated code owner(s) and translation owner(s) for the new locale, considering the following:
- A code owner who is also a translation sponsor should be indicated in a comment as well.
Expand Down Expand Up @@ -234,21 +234,21 @@ Language proficiency for translation owners can be demonstrated through any of t
All files:

```bash
uv run ./check_translations_completeness.py
uv run dev/i18n/check_translations_completeness.py
```

Files for specific languages:

```bash
uv run ./check_translations_completeness.py --language <language_code>
uv run dev/i18n/check_translations_completeness.py --language <language_code>
```

Where `<language_code>` is the code of the language you want to check, e.g., `en`, `fr`, `de`, etc.

Adding missing translations (with `TODO: translate` prefix):

```bash
uv run ./check_translations_completeness.py --language <language_code> --add-missing
uv run dev/i18n/check_translations_completeness.py --language <language_code> --add-missing
```

## 9. Compliance & enforcement
Expand Down
Loading