You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/09/03 23:37:16 UTC

(airflow) branch main updated: fix(dev): check missing translation files (#55170)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6f6864e894d fix(dev): check missing translation files (#55170)
6f6864e894d is described below

commit 6f6864e894df14997eb2aea4a50f624c57118642
Author: Wei Lee <we...@gmail.com>
AuthorDate: Thu Sep 4 07:37:09 2025 +0800

    fix(dev): check missing translation files (#55170)
    
    In case whole file was missing, the missing keys were listed but the table did not include row for that file and did not contribute to overall "score".
---
 dev/i18n/check_translations_completeness.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dev/i18n/check_translations_completeness.py b/dev/i18n/check_translations_completeness.py
index 1435a829bc1..f2a0b6a75ae 100755
--- a/dev/i18n/check_translations_completeness.py
+++ b/dev/i18n/check_translations_completeness.py
@@ -26,6 +26,7 @@
 from __future__ import annotations
 
 import json
+import os
 import sys
 from collections import defaultdict
 from pathlib import Path
@@ -386,6 +387,15 @@ def print_translation_progress(console, locale_files, missing_counts, summary):
             total_translated += file_translated
             total_total += file_total
 
+        # check missing translation files
+        en_root = LOCALES_DIR / "en"
+        if diffs := set(os.listdir(en_root)) - {"_freeze_exemptions.json"} - set(all_files):
+            for diff in diffs:
+                with open(en_root / diff) as f:
+                    en_data = json.load(f)
+                file_total = sum(1 for _ in flatten_keys(en_data))
+                table.add_row(diff, str(file_total), "0", str(file_total), "0", "0%", "0%", "0%", style="red")
+
         # Calculate totals for this language
         total_coverage_percent = 100 * total_translated / total_total if total_total else 100
         total_actual_translated = total_translated - total_todos