This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new a2aea284d52 [v3-3-test] Ignore hidden directories when listing UI
translation locales (#70516) (#70518)
a2aea284d52 is described below
commit a2aea284d52d76e3cc72bf0275eee4ab7669ec06
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Jul 27 15:26:39 2026 +0200
[v3-3-test] Ignore hidden directories when listing UI translation locales
(#70516) (#70518)
Agent and editor tooling leaves dot-directories (e.g. a stray .claude/
scratch dir) inside the i18n locales folder. Every subdirectory was
treated as a locale, so all breeze ui translation commands aborted with
a confusing "No plural suffixes defined for language '.claude'" error
that gives no hint the directory is not a locale at all.
(cherry picked from commit a4d56b4dce8bcd660121e76b8000d791061bb16c)
Co-authored-by: Jarek Potiuk <[email protected]>
---
dev/breeze/src/airflow_breeze/commands/ui_commands.py | 2 +-
dev/breeze/tests/test_ui_commands.py | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dev/breeze/src/airflow_breeze/commands/ui_commands.py
b/dev/breeze/src/airflow_breeze/commands/ui_commands.py
index 5ca44c68632..983b31b8160 100644
--- a/dev/breeze/src/airflow_breeze/commands/ui_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/ui_commands.py
@@ -191,7 +191,7 @@ def get_locale_files() -> list[LocaleFiles]:
locale=locale_dir.name, files=[f.name for f in
locale_dir.iterdir() if f.suffix == ".json"]
)
for locale_dir in LOCALES_DIR.iterdir()
- if locale_dir.is_dir()
+ if locale_dir.is_dir() and not locale_dir.name.startswith(".")
]
diff --git a/dev/breeze/tests/test_ui_commands.py
b/dev/breeze/tests/test_ui_commands.py
index 705828ac3a1..4287247e7e7 100644
--- a/dev/breeze/tests/test_ui_commands.py
+++ b/dev/breeze/tests/test_ui_commands.py
@@ -25,6 +25,7 @@ from airflow_breeze.commands.ui_commands import (
compare_keys,
expand_plural_keys,
flatten_keys,
+ get_locale_files,
get_plural_base,
)
@@ -277,6 +278,22 @@ class TestCompareKeys:
ui_commands.LOCALES_DIR = original_locales_dir
+class TestGetLocaleFiles:
+ def test_hidden_directories_are_not_treated_as_locales(self, tmp_path):
+ (tmp_path / "en").mkdir()
+ (tmp_path / "en" / "common.json").write_text(json.dumps({"greeting":
"Hello"}))
+ (tmp_path / ".claude" / ".cc-writes").mkdir(parents=True)
+
+ import airflow_breeze.commands.ui_commands as ui_commands
+
+ original_locales_dir = ui_commands.LOCALES_DIR
+ ui_commands.LOCALES_DIR = tmp_path
+ try:
+ assert get_locale_files() == [LocaleFiles(locale="en",
files=["common.json"])]
+ finally:
+ ui_commands.LOCALES_DIR = original_locales_dir
+
+
class TestLocaleSummary:
def test_locale_summary_creation(self):
summary = LocaleSummary(