i18n: Mark notification bot message in queue_processors for translation.

This commit is contained in:
Vishnu KS
2020-06-26 18:54:37 +05:30
committed by Tim Abbott
parent cc0b3a08c9
commit 0a36f04c20

View File

@@ -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),