Skip to content

Commit 980cc82

Browse files
authored
Merge pull request #7228 from escattone/email-translations-archived-2711
disable notifications for translations of archived docs
2 parents 5c002a0 + ebb3696 commit 980cc82

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

kitsune/wiki/strategies.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def translate(
240240
) -> TranslationResult:
241241
"""Perform AI translation."""
242242
doc = l10n_request.revision.document
243+
send_notifications = not doc.is_archived
243244

244245
translated_content = llm_translate(doc=doc, target_locale=l10n_request.target_locale)
245246

@@ -251,9 +252,9 @@ def translate(
251252
"translated_content": translated_content,
252253
}
253254

254-
rev = self.content_manager.create_revision(data, doc, send_notifications=True)
255+
rev = self.content_manager.create_revision(data, doc, send_notifications=send_notifications)
255256
if publish:
256-
rev = self.content_manager.publish_revision(rev)
257+
rev = self.content_manager.publish_revision(rev, send_notifications=send_notifications)
257258

258259
result = TranslationResult(
259260
success=True,

0 commit comments

Comments
 (0)