Store missing translations in separate logs (#324)

This commit is contained in:
Igor Chubin 2021-04-26 20:56:16 +02:00
parent 9db01373ec
commit 6927116794
2 changed files with 3 additions and 3 deletions

View file

@ -132,8 +132,8 @@ def translate(text, lang):
"""
def _log_unknown_translation(lang, text):
with open(MISSING_TRANSLATION_LOG, "a") as f_missing_translation:
f_missing_translation.write("%s %s\n" % (lang, text))
with open(MISSING_TRANSLATION_LOG % lang, "a") as f_missing_translation:
f_missing_translation.write(text)
if "," in text:
terms = text.split(",")

View file

@ -35,7 +35,7 @@ PNG_CACHE = os.path.join(_DATADIR, "cache/png")
LRU_CACHE = os.path.join(_DATADIR, "cache/lru")
LOG_FILE = os.path.join(_LOGDIR, 'main.log')
MISSING_TRANSLATION_LOG = os.path.join(_LOGDIR, 'missing-translation.log')
MISSING_TRANSLATION_LOG = os.path.join(_LOGDIR, 'missing-translation/%s.log')
ALIASES = os.path.join(MYDIR, "share/aliases")
ANSI2HTML = os.path.join(MYDIR, "share/ansi2html.sh")