Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
9b9e2318
Commit
9b9e2318
authored
Feb 16, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove no longer needed code for Django 1.8
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
9532955c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
34 deletions
+1
-34
weblate/__init__.py
weblate/__init__.py
+1
-34
No files found.
weblate/__init__.py
View file @
9b9e2318
...
...
@@ -19,9 +19,7 @@
#
import
os
import
re
from
copy
import
_EmptyClass
import
django.utils.translation.trans_real
as
django_trans
from
weblate.requirements
import
(
check_requirements
,
get_versions
,
get_optional_versions
)
...
...
@@ -111,34 +109,3 @@ def get_versions_string():
check_requirements
()
check_data_writable
()
create_ssh_wrapper
()
# Monkey patch locales, workaround for
# https://code.djangoproject.com/ticket/24063
django_trans
.
language_code_re
=
re
.
compile
(
r'^[a-z]{1,8}(?:-[a-z0-9]{1,8})*(?:@[a-z0-9]{1,20})?$'
,
re
.
IGNORECASE
)
class
DjangoTranslation
(
django_trans
.
DjangoTranslation
):
"""
Unshared _info and _catalog to avoid Django messing up
locale variants.
This will not be needed in Django 1.8.
"""
def
__copy__
(
self
):
"""
Simplified version of copy._copy_inst extended for copying
_info and _catalog.
"""
result
=
_EmptyClass
()
result
.
__class__
=
self
.
__class__
state
=
self
.
__dict__
state
[
'_info'
]
=
self
.
_info
.
copy
()
state
[
'_catalog'
]
=
self
.
_catalog
.
copy
()
result
.
__dict__
.
update
(
state
)
return
result
django_trans
.
DjangoTranslation
=
DjangoTranslation
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment