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
72bcef5c
Commit
72bcef5c
authored
Apr 25, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show last author and change on translation stats
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
46389bde
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
weblate/html/translation.html
weblate/html/translation.html
+11
-0
weblate/trans/models/translation.py
weblate/trans/models/translation.py
+2
-2
weblate/trans/views/api.py
weblate/trans/views/api.py
+1
-1
No files found.
weblate/html/translation.html
View file @
72bcef5c
...
...
@@ -175,6 +175,17 @@
<td
class=
"number"
>
{{ object.failing_checks }}
</td>
<td
class=
"number"
></td>
</tr>
<tr>
<td
colspan=
"4"
>
</td>
</tr>
<tr>
<th>
{% trans "Last change" %}
<th>
<td
class=
"number"
colspan=
"3"
>
{{ object.get_last_change }}
</td>
</tr>
<tr>
<th>
{% trans "Last author" %}
<th>
<td
class=
"number"
colspan=
"3"
>
{{ object.get_last_author }}
</td>
</tr>
</table>
</div>
...
...
weblate/trans/models/translation.py
View file @
72bcef5c
...
...
@@ -700,7 +700,7 @@ class Translation(models.Model, URLMixin, PercentMixin):
self
.
revision
=
blob_hash
self
.
save
()
def
get_last_author
(
self
,
email
=
Tru
e
):
def
get_last_author
(
self
,
email
=
Fals
e
):
'''
Returns last autor of change done in Weblate.
'''
...
...
@@ -727,7 +727,7 @@ class Translation(models.Model, URLMixin, PercentMixin):
Commits any pending changes.
'''
# Get author of last changes
last
=
self
.
get_last_author
()
last
=
self
.
get_last_author
(
True
)
# If it is same as current one, we don't have to commit
if
author
==
last
or
last
is
None
:
...
...
weblate/trans/views/api.py
View file @
72bcef5c
...
...
@@ -245,7 +245,7 @@ def export_stats(request, project, subproject):
'total'
:
trans
.
total
,
'total_words'
:
trans
.
total_words
,
'last_change'
:
trans
.
get_last_change
(),
'last_author'
:
trans
.
get_last_author
(
False
),
'last_author'
:
trans
.
get_last_author
(),
'translated'
:
trans
.
translated
,
'translated_words'
:
trans
.
translated_words
,
'translated_percent'
:
trans
.
get_translated_percent
(),
...
...
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