wcs: add i18n context to forms search engine (#29441)

This commit is contained in:
Frédéric Péters 2019-01-04 08:26:40 +01:00
parent 1eb0dfed6c
commit 29e9a23129
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ import hashlib
import django.apps
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
class AppConfig(django.apps.AppConfig):
@ -42,9 +42,9 @@ class AppConfig(django.apps.AppConfig):
}
}
for key, service in services.items():
label = _('Forms')
label = pgettext_lazy('user-forms', 'Forms')
if len(services.keys()) > 1:
label = _('Forms (%s)') % service['title']
label = pgettext_lazy('user-forms', 'Forms (%s)') % service['title']
engines['formdata:%s' % hashlib.md5(key).hexdigest()[:8]] = {
'url': service['url'] + 'api/forms/?NameID={{user_nameid}}&status=all&ignore-roles=on&q=%(q)s',
'label': label,