Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
piks3l
Respect My Net
Commits
42d68009
Commit
42d68009
authored
Nov 20, 2011
by
Baptiste Jonglez
Browse files
[fix] i18n of 'media' and 'type' in list
parent
093b4229
Changes
3
Hide whitespace changes
Inline
Side-by-side
bt/templatetags/bt.py
View file @
42d68009
...
...
@@ -24,10 +24,10 @@ status_map=dict(STATUS)
def
status
(
code
):
return
status_map
[
code
]
type
s
_map
=
dict
(
TYPES
)
@
register
.
filter
(
name
=
'type
s
'
)
def
type
s
(
code
):
return
type
s
_map
[
code
]
type_map
=
dict
(
TYPES
)
@
register
.
filter
(
name
=
'type'
)
def
type
(
code
):
return
type_map
[
code
]
media_map
=
dict
(
MEDIA
)
@
register
.
filter
(
name
=
'media'
)
...
...
templates/list.html
View file @
42d68009
...
...
@@ -257,8 +257,8 @@
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.operator }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.contract }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.resource_name }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.type }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.media }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.type
|type
}}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.media
|media
}}
</a></td>
<td>
{{ violation.confirmations }}
</td>
<td>
<div
class=
"confirm"
><a
class=
"button"
>
{% trans "confirm" %}
</a>
...
...
templates/view.html
View file @
42d68009
...
...
@@ -66,7 +66,7 @@ $(document).ready(function() {
</div>
<dl>
{%if v.resource_name%}
<dt>
{% trans "Affected resource" %}
</dt><dd>
{{v.resource_name}}
</dd>
{%endif%}
{%if v.type%}
<dt>
{% trans "Type" %}
</dt><dd>
{{v.type|type
s
}}
</dd>
{%endif%}
{%if v.type%}
<dt>
{% trans "Type" %}
</dt><dd>
{{v.type|type}}
</dd>
{%endif%}
{%if v.media%}
<dt>
{% trans "Media" %}
</dt><dd>
{{v.media|media}}
</dd>
{%endif%}
{%if v.state%}
<dt>
{% trans "Status" %}
</dt><dd>
{{v.state|status}}
</dd>
{%endif%}
{%if v.temporary%}
<dt>
{% trans "Temporary restriction" %}
</dt><dd>
{{v.temporary}}
</dd>
{%endif%}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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