mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 10:03:56 +00:00
i18n: Mark notification bot message in queue_processors for translation.
This commit is contained in:
@@ -36,6 +36,8 @@ import ujson
|
||||
from django.conf import settings
|
||||
from django.db import connection
|
||||
from django.utils.timezone import now as timezone_now
|
||||
from django.utils.translation import override as override_language
|
||||
from django.utils.translation import ugettext as _
|
||||
from zulip_bots.lib import ExternalBotHandler, extract_query_without_mention
|
||||
|
||||
from zerver.context_processors import common_context
|
||||
@@ -734,7 +736,8 @@ class DeferredWorker(QueueProcessingWorker):
|
||||
|
||||
# Send a private message notification letting the user who
|
||||
# triggered the export know the export finished.
|
||||
content = f"Your data export is complete and has been uploaded here:\n\n{public_url}"
|
||||
with override_language(user_profile.default_language):
|
||||
content = _("Your data export is complete and has been uploaded here:\n\n{public_url}").format(public_url=public_url)
|
||||
internal_send_private_message(
|
||||
realm=user_profile.realm,
|
||||
sender=get_system_bot(settings.NOTIFICATION_BOT),
|
||||
|
||||
Reference in New Issue
Block a user