From 623cb2d5f69a47e1b53b585374652e7a26b55201 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Fri, 8 Jan 2016 20:17:37 +0100 Subject: [PATCH] allow some more RFC compliant names as zh-cn --- plugins/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands.py b/plugins/commands.py index 95da621..ea7f27b 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -764,7 +764,7 @@ def raise_an_error(argv, **args): @pluginfunction('translate', 'translate text fragments', ptypes_COMMAND) def translate(argv, **args): - if len(argv) < 2 or not re.match('[a-z]{2}\|[a-z]{2}', argv[0]): + if len(argv) < 2 or not re.match('[a-z-]{2,}\|[a-z-]{2,}', argv[0]): return {'msg': 'Usage: translate en|de my favorite bot'} else: pair = argv[0]