ANDROID: Don't use fuzzy strings for Android translations

ScummVM translations also do that.
Also terminate XML files with a newline.
This commit is contained in:
Le Philousophe
2025-05-28 21:48:09 +02:00
parent 80c635b921
commit 08843c5554
+4 -2
View File
@@ -61,7 +61,7 @@ def extract_translations(file):
po_file = polib.pofile(os.path.join(BASE_PATH, 'po', file + '.po'))
translations = {}
for entry in po_file:
if entry.msgid and entry.msgstr:
if entry.msgid and entry.msgstr and not entry.fuzzy:
translations[entry.msgid] = entry.msgstr
return translations
@@ -124,7 +124,9 @@ def generate_translated_xml(file):
if not os.path.exists(dir):
os.makedirs(dir)
tree.write(os.path.join(dir, 'strings.xml'), encoding='utf-8', xml_declaration=True)
with open(os.path.join(dir, 'strings.xml'), 'wb') as f:
tree.write(f, encoding='utf-8', xml_declaration=True)
f.write(b'\n')
def get_po_files():