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
83ab3948
Commit
83ab3948
authored
Nov 20, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide stable URLs for unit (as long as they exist)
parent
c5cfaea8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
weblate/trans/models.py
weblate/trans/models.py
+1
-1
weblate/trans/views.py
weblate/trans/views.py
+2
-0
No files found.
weblate/trans/models.py
View file @
83ab3948
...
...
@@ -2065,7 +2065,7 @@ class Unit(models.Model):
)
def
get_absolute_url
(
self
):
return
'%s?
pos=%d&dir=stay'
%
(
self
.
translation
.
get_translate_url
(),
self
.
position
)
return
'%s?
checksum=%s'
%
(
self
.
translation
.
get_translate_url
(),
self
.
checksum
)
def
update_from_unit
(
self
,
unit
,
pos
,
force
,
template
=
None
):
'''
...
...
weblate/trans/views.py
View file @
83ab3948
...
...
@@ -1105,6 +1105,8 @@ def translate(request, project, subproject, lang):
units
=
allunits
.
filter
(
position__lt
=
pos
).
order_by
(
'-position'
)
else
:
units
=
allunits
.
filter
(
position__gt
=
pos
)
elif
'checksum'
in
request
.
GET
:
allunits
=
obj
.
unit_set
.
filter
(
checksum
=
request
.
GET
[
'checksum'
])
else
:
allunits
=
obj
.
unit_set
.
filter_type
(
rqtype
,
obj
)
# What unit set is about to show
...
...
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