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
57f513db
Commit
57f513db
authored
Apr 02, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better formatting of dictionary
parent
6325901c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
html/dictionaries.html
html/dictionaries.html
+14
-3
trans/templatetags/weblate.py
trans/templatetags/weblate.py
+5
-1
No files found.
html/dictionaries.html
View file @
57f513db
{% extends "base.html" %}
{% load i18n %}
{% load weblate %}
{% load url from future %}
{% block breadcums %}
...
...
@@ -8,10 +9,20 @@
{% endblock %}
{% block content %}
<ul>
<table
class=
"sort simple"
>
<thead>
<tr>
<th>
{% trans "Language" %}
</th>
<th>
{% trans "Words" %}
</th>
</tr>
<tbody>
{% for dict in dicts %}
<li><a
href=
"{% url 'trans.views.show_dictionary' project=project.slug lang=dict.code %}"
>
{{ dict }}
</a></li>
<tr>
<th><a
href=
"{% url 'trans.views.show_dictionary' project=project.slug lang=dict.code %}"
>
{{ dict }}
</a></th>
<td
class=
"number"
>
{% dictionary_count dict project %}
</td>
</tr>
{% endfor %}
</ul>
</tbody>
</table>
{% endblock %}
trans/templatetags/weblate.py
View file @
57f513db
...
...
@@ -9,7 +9,7 @@ import re
from
trans.util
import
split_plural
from
lang.models
import
Language
from
trans.models
import
Project
,
SubProject
from
trans.models
import
Project
,
SubProject
,
Dictionary
import
trans.checks
register
=
template
.
Library
()
...
...
@@ -74,3 +74,7 @@ def subproject_name(prj, subprj):
@
register
.
simple_tag
def
language_name
(
code
):
return
Language
.
objects
.
get
(
code
=
code
).
__unicode__
()
@
register
.
simple_tag
def
dictionary_count
(
lang
,
project
):
return
Dictionary
.
objects
.
filter
(
project
=
project
,
language
=
lang
).
count
()
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