plinth: Fix translating app operations

Fixes #2420.

Tests performed using Debian stable:
- Set user language to espanol. Install, repair and remove gitweb app.
  Check that all app operation messages are in spanish.
- All unit tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2024-08-26 12:56:39 +03:00 committed by Sunil Mohan Adapa
parent 13a1f59103
commit 5b9265adf5
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -137,7 +137,7 @@ class Operation:
"""
from django.utils.translation import gettext
message = gettext(self.message)
message = message.format(name=self.name,
message = message.format(name=gettext(self.name),
exception_message=str(self.exception))
if self.app_id:
message = message.format(