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
f7350538
Commit
f7350538
authored
Nov 14, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect debugging
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
6e41db00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
weblate/trans/views/edit.py
weblate/trans/views/edit.py
+5
-0
No files found.
weblate/trans/views/edit.py
View file @
f7350538
...
...
@@ -83,6 +83,7 @@ def search(translation, request):
# Check if we know the search
if
search_id
not
in
request
.
session
:
messages
.
error
(
request
,
_
(
'Invalid search string!'
))
print
'Invalid search string!'
return
redirect
(
translation
)
return
request
.
session
[
search_id
]
...
...
@@ -130,6 +131,7 @@ def search(translation, request):
# Check empty search results
if
len
(
unit_ids
)
==
0
:
messages
.
warning
(
request
,
_
(
'No string matched your search!'
))
print
'No string matched your search!'
return
redirect
(
translation
)
# Checksum unit access
...
...
@@ -140,6 +142,7 @@ def search(translation, request):
offset
=
unit_ids
.
index
(
unit
.
id
)
except
(
Unit
.
DoesNotExist
,
IndexError
):
messages
.
warning
(
request
,
_
(
'No string matched your search!'
))
print
'No string matched your search!'
return
redirect
(
translation
)
# Remove old search results
...
...
@@ -488,6 +491,7 @@ def translate(request, project, subproject, lang):
# Delete search
del
request
.
session
[
'search_%s'
%
search_result
[
'search_id'
]]
# Redirect to translation
print
'You have reached end of translating.'
return
redirect
(
translation
)
# Some URLs we will most likely use
...
...
@@ -539,6 +543,7 @@ def translate(request, project, subproject, lang):
except
Unit
.
DoesNotExist
:
# Can happen when using SID for other translation
messages
.
error
(
request
,
_
(
'Invalid search string!'
))
print
'Invalid search string!'
return
redirect
(
translation
)
# Show secondary languages for logged in users
...
...
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