mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
i18n: Skip fuzzy strings
The German translation currently has at least one fuzzy string with a missing %s; and several translations are completely wrong.
This commit is contained in:
parent
109f938b0c
commit
32198d42c2
10
src/i18n.py
10
src/i18n.py
@ -43,9 +43,11 @@ WAITING_FOR_MSGID = 1
|
|||||||
IN_MSGID = 2
|
IN_MSGID = 2
|
||||||
WAITING_FOR_MSGSTR = 3
|
WAITING_FOR_MSGSTR = 3
|
||||||
IN_MSGSTR = 4
|
IN_MSGSTR = 4
|
||||||
|
NEXT_IS_FUZZY = 5
|
||||||
|
|
||||||
MSGID = 'msgid "'
|
MSGID = 'msgid "'
|
||||||
MSGSTR = 'msgstr "'
|
MSGSTR = 'msgstr "'
|
||||||
|
FUZZY = '#, fuzzy'
|
||||||
|
|
||||||
currentLocale = 'en'
|
currentLocale = 'en'
|
||||||
|
|
||||||
@ -148,7 +150,13 @@ def parse(translationFile):
|
|||||||
line = line[0:-1] # Remove the ending \n
|
line = line[0:-1] # Remove the ending \n
|
||||||
line = line
|
line = line
|
||||||
|
|
||||||
if line.startswith(MSGID):
|
if step == WAITING_FOR_MSGID and line.startswith(FUZZY):
|
||||||
|
step = NEXT_IS_FUZZY
|
||||||
|
elif step == NEXT_IS_FUZZY and line.startswith(MSGID):
|
||||||
|
# Don't use fuzzy strings; they may have a mismatched number of %s or be
|
||||||
|
# outright wrong; use English instead.
|
||||||
|
step = WAITING_FOR_MSGID
|
||||||
|
elif line.startswith(MSGID):
|
||||||
# Don't check if step is WAITING_FOR_MSGID
|
# Don't check if step is WAITING_FOR_MSGID
|
||||||
untranslated = ''
|
untranslated = ''
|
||||||
translated = ''
|
translated = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user