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
82a97172
Commit
82a97172
authored
Apr 09, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We always fetch unit from search results now
parent
58a372d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
36 deletions
+33
-36
trans/views/edit.py
trans/views/edit.py
+33
-36
No files found.
trans/views/edit.py
View file @
82a97172
...
...
@@ -326,9 +326,6 @@ def translate(request, project, subproject, lang):
profile
=
None
antispam
=
AntispamForm
()
secondary
=
None
unit
=
None
# Search results
search_result
=
search
(
obj
,
request
)
...
...
@@ -410,8 +407,6 @@ def translate(request, project, subproject, lang):
# Redirect to same entry for possible editing
return
HttpResponseRedirect
(
this_unit_url
)
# If we failed to get unit above or on no POST
if
unit
is
None
:
# Grab actual unit
unit
=
obj
.
unit_set
.
get
(
pk
=
search_result
[
'ids'
][
offset
])
...
...
@@ -437,6 +432,8 @@ def translate(request, project, subproject, lang):
targets
[
lang
.
target
]
=
1
res
.
append
(
lang
)
secondary
=
res
else
:
secondary
=
None
# Prepare form
form
=
TranslationForm
(
initial
=
{
...
...
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