File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments