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
09fddc3b
Commit
09fddc3b
authored
Jan 07, 2016
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
31f54091
0dcf0c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
weblate/trans/views/helper.py
weblate/trans/views/helper.py
+6
-1
No files found.
weblate/trans/views/helper.py
View file @
09fddc3b
...
...
@@ -25,6 +25,7 @@ from weblate.trans.models import Project, SubProject, Translation
from
weblate.lang.models
import
Language
from
django.shortcuts
import
get_object_or_404
import
django.utils.translation
from
django.utils.translation
import
trans_real
def
get_translation
(
request
,
project
,
subproject
,
lang
,
skip_acl
=
False
):
...
...
@@ -101,9 +102,13 @@ def try_set_language(lang):
try
:
django
.
utils
.
translation
.
activate
(
lang
)
# workaround for https://code.djangoproject.com/ticket/26050
# pylint: disable=W0212
if
trans_real
.
catalog
().
_catalog
is
None
:
raise
Exception
(
'Invalid language!'
)
except
Exception
:
# Ignore failure on activating language
pass
django
.
utils
.
translation
.
activate
(
'en'
)
try
:
return
Language
.
objects
.
get
(
code
=
lang
)
except
Language
.
DoesNotExist
:
...
...
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