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
1e516d68
Commit
1e516d68
authored
Apr 05, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments
parent
3a95ef93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
trans/views.py
trans/views.py
+8
-1
No files found.
trans/views.py
View file @
1e516d68
...
...
@@ -319,23 +319,30 @@ def auto_translation(request, project, subproject, lang):
def
show_translation
(
request
,
project
,
subproject
,
lang
):
obj
=
get_object_or_404
(
Translation
,
language__code
=
lang
,
subproject__slug
=
subproject
,
subproject__project__slug
=
project
)
# How much is user allowed to configure upload?
if
request
.
user
.
has_perm
(
'trans.author_translation'
):
form
=
ExtraUploadForm
()
elif
request
.
user
.
has_perm
(
'trans.overwrite_translation'
):
form
=
UploadForm
()
else
:
form
=
SimpleUploadForm
()
# Is user allowed to do automatic translation?
if
request
.
user
.
has_perm
(
'trans.automatic_translation'
):
autoform
=
AutoForm
(
obj
)
else
:
autoform
=
None
# Search form for everybody
search_form
=
SearchForm
()
# Review form for logged in users
if
request
.
user
.
is_anonymous
():
review_form
=
None
else
:
review_form
=
ReviewForm
(
initial
=
{
'date'
:
datetime
.
date
.
today
()
-
datetime
.
timedelta
(
days
=
31
)})
return
render_to_response
(
'translation.html'
,
RequestContext
(
request
,
{
'object'
:
obj
,
'form'
:
form
,
...
...
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