From 5782f4f53e1c22bf7b7d6eb7a83e37f976ae62a7 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 30 Oct 2021 17:47:43 +0200 Subject: [PATCH] Add minor fixes --- bin/proxy.py | 2 +- lib/globals.py | 1 + lib/translations.py | 8 ++++---- share/we-lang/go.mod | 6 ++++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bin/proxy.py b/bin/proxy.py index e27fafb..d4ac9e5 100755 --- a/bin/proxy.py +++ b/bin/proxy.py @@ -133,7 +133,7 @@ def translate(text, lang): def _log_unknown_translation(lang, text): with open(MISSING_TRANSLATION_LOG % lang, "a") as f_missing_translation: - f_missing_translation.write(text) + f_missing_translation.write(text+"\n") if "," in text: terms = text.split(",") diff --git a/lib/globals.py b/lib/globals.py index 062662b..e79c9f0 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -83,6 +83,7 @@ PLAIN_TEXT_AGENTS = [ "powershell", "fetch", "aiohttp", + "http_get", ] PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation', ':iterm2'] diff --git a/lib/translations.py b/lib/translations.py index 3a43443..b920bfd 100644 --- a/lib/translations.py +++ b/lib/translations.py @@ -6,9 +6,9 @@ Translation of almost everything. FULL_TRANSLATION = [ "am", "ar", "af", "be", "bn", "ca", "da", "de", "el", "et", - "fr", "fa", "hi", "hu", "ia", "id", "it", "lt", + "fr", "fa", "hi", "hu", "ia", "id", "it", "lt", "mg", "nb", "nl", "oc", "pl", "pt-br", "ro", - "ru", "ta", "tr", "th", "uk", "vi", "zh-cn", "zh-tw", "mg", + "ru", "ta", "tr", "th", "uk", "vi", "zh-cn", "zh-tw", ] PARTIAL_TRANSLATION = [ @@ -26,9 +26,9 @@ PROXY_LANGS = [ "cy", "de", "el", "eo", "et", "eu", "fa", "fr", "fy", "ga", "he", "hr", "hu", "hy", "ia", "id", "is", "it", "ja", "kk", - "lt", "lv", "mk", "mr", "nb", "nn", "oc", + "lt", "lv", "mg", "mk", "mr", "nb", "nn", "oc", "ro", "ru", "sl", "th", "pt-br", "uk", - "uz", "vi", "zh-cn", "zh-tw", "mg", + "uz", "vi", "zh-cn", "zh-tw", ] SUPPORTED_LANGS = FULL_TRANSLATION + PARTIAL_TRANSLATION diff --git a/share/we-lang/go.mod b/share/we-lang/go.mod index 8804943..97989af 100644 --- a/share/we-lang/go.mod +++ b/share/we-lang/go.mod @@ -1,3 +1,9 @@ module github.com/chubin/wttr.in/v2 go 1.15 + +require ( + github.com/klauspost/lctime v0.1.0 // indirect + github.com/mattn/go-colorable v0.1.11 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect +)