Commit fd871448 authored by Michal Čihař's avatar Michal Čihař

Move monkey patching to better place

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 43851a79
......@@ -19,7 +19,9 @@
#
import os
import re
import logging
import django.utils.translation.trans_real
from weblate.requirements import (
check_requirements, get_versions, get_optional_versions
)
......@@ -116,3 +118,10 @@ def get_versions_string():
check_requirements()
check_data_writable()
create_ssh_wrapper()
# Monkey patch locales, workaround for
# https://code.djangoproject.com/ticket/24063
django.utils.translation.trans_real.language_code_re = re.compile(
r'^[a-z]{1,8}(?:-[a-z0-9]{1,8})*(?:@[a-z0-9]{1,20})?$',
re.IGNORECASE
)
......@@ -17,12 +17,3 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import django.utils.translation.trans_real
import re
# Monkey patch locales, workaround for
# https://code.djangoproject.com/ticket/24063
django.utils.translation.trans_real.language_code_re = re.compile(
r'^[a-z]{1,8}(?:-[a-z0-9]{1,8})*(?:@[a-z0-9]{1,20})?$', re.IGNORECASE
)
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