summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/kalauerbot/translate.patch
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-09-16 22:28:13 +0200
committermakefu <github@syntax-fehler.de>2020-09-16 22:28:13 +0200
commit3a93c400a3f8e58a4d10ae743fbdbada216d8641 (patch)
tree293aecc1c396d19c96599a8103878425c474b9c4 /makefu/5pkgs/kalauerbot/translate.patch
parentce41b987239abbac0f817a9ae1f7019ad9f4035a (diff)
ma pkgs.kalauerbot: init
Diffstat (limited to 'makefu/5pkgs/kalauerbot/translate.patch')
-rw-r--r--makefu/5pkgs/kalauerbot/translate.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/makefu/5pkgs/kalauerbot/translate.patch b/makefu/5pkgs/kalauerbot/translate.patch
new file mode 100644
index 00000000..6ff82072
--- /dev/null
+++ b/makefu/5pkgs/kalauerbot/translate.patch
@@ -0,0 +1,17 @@
+diff --git a/googletrans/client.py b/googletrans/client.py
+index 89c2237..c203b44 100644
+--- a/googletrans/client.py
++++ b/googletrans/client.py
+@@ -190,6 +190,13 @@ class Translator(object):
+ pass
+ if not PY3 and isinstance(pron, unicode) and isinstance(origin, str): # pragma: nocover
+ origin = origin.decode('utf-8')
++
++ if pron is None:
++ try:
++ pron = data[0][2][2]
++ except: # pragma: nocover
++ pass
++
+ if dest in EXCLUDES and pron == origin:
+ pron = translated