mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
diagnostics: Lazy format all diagnostic test strings properly
Helps: #1938. Fixed application of available translations in daemon.py and apache, diagnostics, networks, firewall and users modules. diagnostics: - __init__.py: return the app name along its results. - diagnostics.html: display the app name instead of its id. - diagnostics_results.html: - mark for translation, - apply class to results <td> HTML tag. main.css: center-align the results. Locale files excluded. Will be regenerated automatically and translations to be done via Weblate. original testing (rebased later): - Yapf applied. - Flake8 without errors or warnings for changed files. - (Unit) tests run without errors. Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com> [sunil: Translate 'None' app name] [sunil: Don't translate tests strings second time in template] [sunil: Tweak the center rule] [sunil: Don't split a translation string] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
f1f84a2509
commit
633f54b75c
9 files changed
+62
-40
No files matched your search
@@ -6,13 +6,12 @@ FreedomBox app to manage users.
|
||||
import grp
|
||||
import subprocess
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.utils import format_lazy
|
||||
from django.utils.text import format_lazy
|
||||
from django.utils.translation import ugettext_lazy as _, ugettext_lazy
|
||||
|
||||
from .components import UsersAndGroups
|
||||
|
||||
@@ -111,10 +110,10 @@ def _diagnose_ldap_entry(search_item):
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
return [
|
||||
_('Check LDAP entry "{search_item}"').format(search_item=search_item),
|
||||
result
|
||||
]
|
||||
template = ugettext_lazy('Check LDAP entry "{search_item}"')
|
||||
testname = format_lazy(template, search_item=search_item)
|
||||
|
||||
return [testname, result]
|
||||
|
||||
|
||||
def create_group(group):
|
||||
|
||||
Reference in new issue
Block a user