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
d0287b31
Commit
d0287b31
authored
Apr 12, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make unit based links work
parent
89378a86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
trans/views/edit.py
trans/views/edit.py
+13
-6
No files found.
trans/views/edit.py
View file @
d0287b31
...
...
@@ -409,12 +409,19 @@ def translate(request, project, subproject, lang):
return
response
# Grab actual unit
try
:
unit
=
obj
.
unit_set
.
get
(
pk
=
search_result
[
'ids'
][
offset
])
except
Unit
.
DoesNotExist
:
# Can happen when using SID for other translation
messages
.
error
(
request
,
_
(
'Invalid search string!'
))
return
HttpResponseRedirect
(
obj
.
get_absolute_url
())
if
'checksum'
in
request
.
GET
:
try
:
unit
=
obj
.
unit_set
.
get
(
checksum
=
request
.
GET
[
'checksum'
])
except
Unit
.
DoesNotExist
:
unit
=
None
if
unit
is
None
:
try
:
unit
=
obj
.
unit_set
.
get
(
pk
=
search_result
[
'ids'
][
offset
])
except
Unit
.
DoesNotExist
:
# Can happen when using SID for other translation
messages
.
error
(
request
,
_
(
'Invalid search string!'
))
return
HttpResponseRedirect
(
obj
.
get_absolute_url
())
# Show secondary languages for logged in users
if
request
.
user
.
is_authenticated
():
...
...
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