From 7d9f3dc6e4b328552c5bbe358018bea41b9a1928 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 14 Jul 2018 09:06:52 +0100 Subject: [PATCH] Allow translate source/target languages to be more than 2 chars --- modules/translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/translate.py b/modules/translate.py index 1144d516..c1345500 100644 --- a/modules/translate.py +++ b/modules/translate.py @@ -3,7 +3,7 @@ import Utils URL_TRANSLATE = "http://translate.googleapis.com/translate_a/single" URL_LANGUAGES = "https://cloud.google.com/translate/docs/languages" -REGEX_LANGUAGES = re.compile("(\w{2})?:(\w{2})? ") +REGEX_LANGUAGES = re.compile("(\w+)?:(\w+)? ") class Module(object): def __init__(self, bot):