Localize hardcoded engine strings (auto-translation progress, vimeo macro fallback) #93
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: Audit section 3. Project rule (AGENTS.md): "no untranslated string constants".
Known offenders:
crates/bds-core/src/engine/auto_translation.rs(~line 103/111): progress message "Scanning published posts" hardcoded English.crates/bds-core/src/render/macros.rsrender_vimeo(~line 272):empty_block(..., "Missing Vimeo video id.")hardcoded, whilerender_youtubeusesrender_translation(context, "render.gallery.empty")correctly.Task: Sweep bds-core engine + render for user-visible hardcoded English (progress messages passed to task manager, macro fallbacks, toast texts) — grep for
"literals flowing into on_progress/toast/empty_block. Route render-side strings through the render gettext domain (locales/render/.ftl, content language) and UI-side progress through the UI localization (locales/ui/.ftl) — note the two localization areas can both apply per AGENTS.md. Add the missing keys for all 5 languages (en/de/fr/it/es).Acceptance: No user-visible untranslated constants in the touched paths; keys present in all locale files; existing i18n lint/tests (if any) pass.
Implemented in
9087096. Replaced hardcoded auto-translation and rebuild progress sentences with typed semantic progress events, localized at the UI/CLI boundary. Added all progress keys in English, German, French, Italian, and Spanish; removed the obsolete generic translation-progress key; and expanded missing-ID YouTube/Vimeo render tests across all five content languages. Neutral review confirmed current bDS2 also renders missing-ID video macros through localized templates, and the Allium split between UI locale and content/render locale is preserved. Verified with cargo test --workspace, cargo build --workspace, strict workspace Clippy, cargo fmt --check, and cargo machete.