Minor changes

This commit is contained in:
jpirnay
2026-03-19 17:58:45 +01:00
parent f23d01093e
commit 5d8dc56f33
+12 -1
View File
@@ -266,7 +266,7 @@ def report_unused_keys(
used_keys: Set[str],
) -> List[str]:
"""Return a sorted list of keys from *string_keys* absent in *used_keys*."""
return [k for k in string_keys if k not in used_keys]
return [k for k in sorted(string_keys) if k not in used_keys]
# ---------------------------------------------------------------------------
@@ -846,6 +846,17 @@ def main(
used_keys = set(string_keys)
unused_set = set()
# --- Missing-string detection (used in code but absent from English) ---
missing_keys = sorted(used_keys - set(string_keys))
if missing_keys:
print(
f"\n CRITICAL: {len(missing_keys)} string(s) used in source but missing from english.yaml:"
)
for key in missing_keys:
print(f" - {key}")
print()
sys.exit(1)
# Compute per-language data blob sizes:
# sum of UTF-8 byte length + 1 (null terminator) per string
data_sizes = [