diagnostics: Translate descriptions only in view

Tests:

- Enable all apps, and run diagnostics. Diagnostic descriptions are formatted
  as expected.

- Change the language to Spanish, and view the diagnostic results. Diagnostic
  descriptions are translated as expected.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2024-01-18 22:19:05 -08:00
1 parent a5820bc36d
commit 3fcd6b9e58
18 files changed
+101 -89

No files matched your search

+6 -1
View File
@@ -6,6 +6,7 @@ import logging
import pathlib
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext_noop
from plinth import app as app_module
from plinth import cfg, menu
@@ -13,6 +14,7 @@ from plinth.config import DropinConfigs
from plinth.modules import names
from plinth.modules.apache.components import diagnose_url
from plinth.modules.backups.components import BackupRestore
from plinth.modules.diagnostics.check import DiagnosticCheck, Result
from plinth.modules.names.components import DomainType
from plinth.package import Packages
from plinth.signals import domain_added, domain_removed, post_app_loading
@@ -97,7 +99,10 @@ class LetsEncryptApp(app_module.App):
if not results:
results.append(
(_('Cannot test: No domains are configured.'), 'warning'))
DiagnosticCheck(
'letsencrypt-cannot-test',
gettext_noop('Cannot test: No domains are configured.'),
Result.WARNING))
return results