Projet

Général

Profil

0001-misc-mark-template-in-code-string-for-translation-32.patch

Frédéric Péters, 16 août 2019 16:22

Télécharger (1,9 ko)

Voir les différences:

Subject: [PATCH] misc: mark template-in-code string for translation (#32794)

 src/authentic2/manager/tables.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
src/authentic2/manager/tables.py
16 16

  
17 17
from django.contrib.auth import get_user_model
18 18
from django.utils.translation import ugettext_lazy as _
19
from django.utils.translation import ugettext_noop
19 20

  
20 21
import django_tables2 as tables
21 22
from django_tables2.utils import A
......
117 118
        '''{% for rel in record.via %}{{ rel.child }} {% if not forloop.last %}, {% endif %}{% endfor %}''',
118 119
        verbose_name=_('Inherited from'), orderable=False)
119 120
    member = tables.TemplateColumn(
120
        '{% load i18n %}<input class="role-member{% if not record.member and record.via %} '
121
        'indeterminate{% endif %}"'
122
        ' name="role-{{ record.pk }}" type="checkbox" {% if record.member %}checked{% endif %} '
123
        '{% if not record.has_perm %}disabled '
124
        'title="{% trans "You are not authorized to manage this role" %}"{% endif %}/>',
121
        '{%% load i18n %%}<input class="role-member{%% if not record.member and record.via %%} '
122
        'indeterminate{%% endif %%}"'
123
        ' name="role-{{ record.pk }}" type="checkbox" {%% if record.member %%}checked{%% endif %%} '
124
        '{%% if not record.has_perm %%}disabled '
125
        'title="{%% trans "%s" %%}"{%% endif %%}/>' % ugettext_noop('You are not authorized to manage this role'),
125 126
        verbose_name=_('Member'),
126 127
        order_by=('member', 'via', 'name'))
127 128

  
128
-