allow some more RFC compliant names as zh-cn

This commit is contained in:
Thorsten
2016-01-08 20:17:37 +01:00
parent 563f5517dc
commit 623cb2d5f6

View File

@@ -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]