mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
Change default language to en-US and add US language (#6621)
This commit is contained in:
@@ -19,10 +19,10 @@ class CompactTranslationExtractor:
|
||||
ignore_file: str = "scripts/ignore_translation.toml",
|
||||
):
|
||||
self.locales_dir = Path(locales_dir)
|
||||
self.golden_truth_file = self.locales_dir / "en-GB" / "translation.toml"
|
||||
self.golden_truth_file = self.locales_dir / "en-US" / "translation.toml"
|
||||
if not self.golden_truth_file.exists():
|
||||
print(
|
||||
f"Error: en-GB translation file not found at {self.golden_truth_file}",
|
||||
f"Error: en-US translation file not found at {self.golden_truth_file}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
@@ -95,7 +95,7 @@ class CompactTranslationExtractor:
|
||||
# Find missing translations
|
||||
missing_keys = set(golden_flat.keys()) - set(target_flat.keys()) - ignore_set
|
||||
|
||||
# Find untranslated entries (identical to en-GB or marked [UNTRANSLATED])
|
||||
# Find untranslated entries (identical to en-US or marked [UNTRANSLATED])
|
||||
untranslated_keys = set()
|
||||
for key in target_flat:
|
||||
if key in golden_flat and key not in ignore_set:
|
||||
|
||||
Reference in New Issue
Block a user