mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 03:58:45 +00:00
Store missing translations in separate logs (#324)
This commit is contained in:
parent
9db01373ec
commit
6927116794
2 changed files with 3 additions and 3 deletions
|
@ -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(",")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue