Commit 8dbb5b36 authored by Michal Čihař's avatar Michal Čihař

Do not allow space in language code

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 991d5e42
......@@ -115,6 +115,8 @@ class LanguageManager(models.Manager):
It also handles Android special naming of regional locales like pt-rBR
'''
code = code.replace(' ', '_')
# First try getting langauge as is
ret = self.try_get(code=code)
if ret is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment