Limit automatic translation to manual saves

This commit is contained in:
2026-07-22 18:11:09 +02:00
parent 556d9c1ff4
commit 2dcaf7f7f7
4 changed files with 21 additions and 8 deletions

View File

@@ -6048,7 +6048,6 @@ impl BdsApp {
}
}
self.notify(ToastLevel::Success, &t(self.ui_locale, "editor.published"));
return self.schedule_post_auto_translation(post_id);
}
Err(e) => {
self.notify_operation_failed("editor.publish", e);
@@ -11921,6 +11920,21 @@ mod tests {
);
}
#[test]
fn publish_does_not_enqueue_missing_translations() {
let (mut app, post_id, _tmp) = auto_translation_test_app(&[]);
let _ = app.publish_post_editor(&post_id);
assert_eq!(app.post_editors[&post_id].status, PostStatus::Published);
assert!(
app.task_manager
.snapshots()
.iter()
.all(|task| task.group_name.as_deref() != Some("AI"))
);
}
#[test]
fn later_manual_save_enqueues_no_translation_task_when_languages_exist() {
let (mut app, post_id, _tmp) = auto_translation_test_app(&["de", "fr"]);