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
d8ac9779
Commit
d8ac9779
authored
Apr 08, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop not needed methods
They were used just once, it's better to replace them with {% url %} tags.
parent
18b1ae85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
18 deletions
+3
-18
trans/models/translation.py
trans/models/translation.py
+0
-15
weblate/html/source.html
weblate/html/source.html
+2
-1
weblate/html/translation.html
weblate/html/translation.html
+1
-2
No files found.
trans/models/translation.py
View file @
d8ac9779
...
...
@@ -346,14 +346,6 @@ class Translation(models.Model, URLMixin):
def
is_git_lockable
(
self
):
return
False
@
models
.
permalink
def
get_download_url
(
self
):
return
(
'download_translation'
,
(),
{
'project'
:
self
.
subproject
.
project
.
slug
,
'subproject'
:
self
.
subproject
.
slug
,
'lang'
:
self
.
language
.
code
})
@
models
.
permalink
def
get_translate_url
(
self
):
return
(
'translate'
,
(),
{
...
...
@@ -362,13 +354,6 @@ class Translation(models.Model, URLMixin):
'lang'
:
self
.
language
.
code
})
@
models
.
permalink
def
get_source_review_url
(
self
):
return
(
'review_source'
,
(),
{
'project'
:
self
.
subproject
.
project
.
slug
,
'subproject'
:
self
.
subproject
.
slug
,
})
def
__unicode__
(
self
):
return
'%s - %s'
%
(
self
.
subproject
.
__unicode__
(),
...
...
weblate/html/source.html
View file @
d8ac9779
...
...
@@ -14,12 +14,13 @@
{% include "subproject_info.html" %}
{% url 'review_source' project=source.subproject.project.slug subproject=source.subproject.slug as review_url %}
{% with source.get_source_checks as checks %}
{% if checks %}
<h2>
{% trans "Strings to check" %}
</h2>
<ul>
{% for c in checks %}
<li><a
href=
"{{
source.get_source_
review_url }}?type={{ c.0 }}"
>
{{ c.1 }}
</a></li>
<li><a
href=
"{{ review_url }}?type={{ c.0 }}"
>
{{ c.1 }}
</a></li>
{% endfor %}
</ul>
{% endif %}
...
...
weblate/html/translation.html
View file @
d8ac9779
...
...
@@ -56,9 +56,8 @@
<div
id=
"files"
>
<h3>
{% trans "Download" %}
</h3>
{%
with object.get_download_url
as download_url %}
{%
url 'download_translation' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code
as download_url %}
<p>
{% blocktrans %}You can
<a
href=
"{{ download_url }}"
>
download
</a>
file for offline translation.{% endblocktrans %}
</p>
{% endwith %}
{% if perms.trans.upload_translation %}
<h3>
{% trans "Upload" %}
</h3>
...
...
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