Commit 42d68009 authored by Baptiste Jonglez's avatar Baptiste Jonglez
Browse files

[fix] i18n of 'media' and 'type' in list

parent 093b4229
...@@ -24,10 +24,10 @@ status_map=dict(STATUS) ...@@ -24,10 +24,10 @@ status_map=dict(STATUS)
def status(code): def status(code):
return status_map[code] return status_map[code]
types_map=dict(TYPES) type_map=dict(TYPES)
@register.filter(name='types') @register.filter(name='type')
def types(code): def type(code):
return types_map[code] return type_map[code]
media_map=dict(MEDIA) media_map=dict(MEDIA)
@register.filter(name='media') @register.filter(name='media')
......
...@@ -257,8 +257,8 @@ ...@@ -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.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.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.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.type|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.media|media }}</a></td>
<td>{{ violation.confirmations }}</td> <td>{{ violation.confirmations }}</td>
<td> <td>
<div class="confirm"><a class="button">{% trans "confirm" %}</a> <div class="confirm"><a class="button">{% trans "confirm" %}</a>
......
...@@ -66,7 +66,7 @@ $(document).ready(function() { ...@@ -66,7 +66,7 @@ $(document).ready(function() {
</div> </div>
<dl>{%if v.resource_name%}<dt>{% trans "Affected resource" %}</dt><dd>{{v.resource_name}}</dd>{%endif%} <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|types}}</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.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.state%}<dt>{% trans "Status" %}</dt><dd>{{v.state|status}}</dd>{%endif%}
{%if v.temporary%}<dt>{% trans "Temporary restriction" %}</dt><dd>{{v.temporary}}</dd>{%endif%} {%if v.temporary%}<dt>{% trans "Temporary restriction" %}</dt><dd>{{v.temporary}}</dd>{%endif%}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment