Skip to content

Commit efbfe40

Browse files
authored
Update update_languages.py
1 parent 2b44e91 commit efbfe40

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/scripts/update_languages.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ def load_file(path):
1919
total = len(english) # numero totale righe di riferimento
2020
for fname in FILES:
2121
other = load_file(os.path.join("lpak", fname))
22-
# Conta solo se la chiave esiste ed è non vuota
23-
translated = sum(1 for k in english if k in other and other[k].strip())
22+
# Conta quante chiavi del file inglese esistono anche nel file tradotto (senza controllare se vuote)
23+
translated = sum(1 for k in english if k in other)
2424
percent = round((translated / total) * 100, 2) if total else 0
2525
results[fname.replace(".lpak", "")] = percent
2626

27+
2728
# Costruisce tabella Markdown
2829
table = ["| Language | Coverage |", "|----------|----------|"]
2930
for lang, perc in sorted(results.items()):

0 commit comments

Comments
 (0)