auto-translation gets an error #120

Closed
opened 2026-08-01 11:30:01 +00:00 by hugo · 1 comment
Owner

auto-translation on first save gets an error "parse error: invalid type: null, expected a string" - also with the retry. the translation via quick action on the other hand works flawlessly. The auto translation must use the exact same one-shot translation code path as the one from the quick actions, just with preselected languages.

Also the error toast is shown too short - probably it would be better if error toasts are sticky and have to be confirmed/closed by the user manually, to make sure they seen them.

auto-translation on first save gets an error "parse error: invalid type: null, expected a string" - also with the retry. the translation via quick action on the other hand works flawlessly. The auto translation must use the exact same one-shot translation code path as the one from the quick actions, just with preselected languages. Also the error toast is shown too short - probably it would be better if error toasts are sticky and have to be confirmed/closed by the user manually, to make sure they seen them.
hugo added the bugcritical labels 2026-08-01 11:30:01 +00:00
Author
Owner

Implemented in 932b73c.

  • Added shared post/media one-shot translation request builders used by both automatic translation and editor Quick Actions.
  • Normalized absent excerpt/title/alt/caption values to empty strings, matching bDS2 and preventing null-shaped AI responses from failing Rust deserialization.
  • Preserved the preselected target language in the shared request path.
  • Made error toasts persist until the user dismisses them; non-error toasts retain automatic expiry.
  • Updated README.md for the user-visible toast behavior.

Verification:

  • Red/green regression tests for missing translation fields, target-language propagation, and sticky error toasts.
  • Automatic-translation behavior tests: 8 passed.
  • cargo fmt --all -- --check
  • cargo check --workspace --quiet
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo build --workspace
  • cargo test --workspace: 1,022 passed, 0 failed, 1 explicitly ignored model-download test.
  • cargo bundle-macos
  • Computer Use against the exact repository bundle verified the post Quick Actions translation picker, configured target/status display, and non-mutating Cancel path.
  • Neutral review against issue #120, bDS2 auto_translation/one_shot behavior, and specs/translation.allium found no remaining gaps.
Implemented in 932b73c. - Added shared post/media one-shot translation request builders used by both automatic translation and editor Quick Actions. - Normalized absent excerpt/title/alt/caption values to empty strings, matching bDS2 and preventing null-shaped AI responses from failing Rust deserialization. - Preserved the preselected target language in the shared request path. - Made error toasts persist until the user dismisses them; non-error toasts retain automatic expiry. - Updated README.md for the user-visible toast behavior. Verification: - Red/green regression tests for missing translation fields, target-language propagation, and sticky error toasts. - Automatic-translation behavior tests: 8 passed. - cargo fmt --all -- --check - cargo check --workspace --quiet - cargo clippy --workspace --all-targets --all-features -- -D warnings - cargo build --workspace - cargo test --workspace: 1,022 passed, 0 failed, 1 explicitly ignored model-download test. - cargo bundle-macos - Computer Use against the exact repository bundle verified the post Quick Actions translation picker, configured target/status display, and non-mutating Cancel path. - Neutral review against issue #120, bDS2 auto_translation/one_shot behavior, and specs/translation.allium found no remaining gaps.
hugo closed this issue 2026-08-01 17:21:51 +00:00
Sign in to join this conversation.