i18n: Mark strings missed for translation

Helps: #1938.

    backups/forms.py:
	- ChoiceField labeled to allow translation.
	- Translation applied to hard coded literals.

    config/forms.py:
	Lazy translation applied to literals that were translated but still
	displayed in english to non-english users.

    diagnostics_results.html:
	Apply translation to results. Use gettext_noop to mark for translation.

    dynamicdns/forms.py:
	Apply translation to choice literals.

    i2p/views.py:
	Lazy translation applied to literals that were translated but still
	displayed in english to non-english users.

    names.html:
	Apply translation to table headers.

    performance/__init__.py:
	Apply translation to description literals.

    radicale/forms.py:
	ChoiceField labeled to allow translation.

    users/forms.py:
	CharField labeled to allow translation.

    QA:
	- Literals visually verified.
	- No errors in py.test-3.
	- Yapf applied (only) to changed files.
	- No remarks by flake8 to changed file.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Separate out the translations]
[sunil: Fix i18n for diagnostics]
[sunil: dynamicdns: Also do i18n for string GnuDIP]
[sunil: searx: Revert an incorrect removal of import]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Fioddor Superconcentrado authored and Sunil Mohan Adapa committed 2020-09-14 15:39:19 -07:00
1 parent 13998ea977
commit 43ab6db456
10 files changed
+36 -24

No files matched your search

+7
View File
@@ -9,6 +9,7 @@ import logging
import threading
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_noop
from plinth import app as app_module
from plinth import daemon, menu
@@ -96,6 +97,12 @@ def run_on_all_enabled_modules():
'progress_percentage': 0
}
# Three result strings returned by tests, mark for translation and
# translate later.
ugettext_noop('passed')
ugettext_noop('failed')
ugettext_noop('error')
apps = []
for app in app_module.App.list():
# XXX: Implement more cleanly.
@@ -17,11 +17,11 @@
<td>{{ test }}</td>
<td>
{% if result == 'passed' %}
<span class="label label-success">{{ result }}</span>
<span class="label label-success">{% trans result %}</span>
{% elif result == 'failed' %}
<span class="label label-danger">{{ result }}</span>
<span class="label label-danger">{% trans result %}</span>
{% elif result == 'error' %}
<span class="label label-warning">{{ result }}</span>
<span class="label label-warning">{% trans result %}</span>
{% else %}
{{ result }}
{% endif %}