email: Fix regression error when installing/operation app

- In tags cleanup code, the front page shortcut for email uses different tags
than those provided in the manifest. When the app is instantiated in privileged
code without setting up Django, this causes an error even though gettext_noop is
used. Workaround by using a custom method for this.

Tests:

- Installing, enabling/disabling email apps works.

- 'make update-translations' output shows that django.pot has been updated and
the tags in question are part of the POT file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2025-01-13 19:39:38 -05:00
1 parent 28e4fe0791
commit 17ff564eeb
2 files changed
+6 -2

No files matched your search

+1 -2
View File
@@ -5,7 +5,6 @@ import logging
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext_noop
import plinth.app
from plinth import cfg, frontpage, menu
@@ -19,7 +18,7 @@ from plinth.modules.letsencrypt.components import LetsEncrypt
from plinth.package import Packages
from plinth.privileged import service as service_privileged
from plinth.signals import domain_added, domain_removed
from plinth.utils import format_lazy
from plinth.utils import format_lazy, gettext_noop
from . import aliases, manifest, privileged