Repository navigation
Localization: how do we keep two languages in sync without lying to the reader? #93
Replies: 1 comment
Settled since this was openedThe copy-across proposal is dropped, and the alternative is better than the problem it solves. The thread's own objection was decisive: a copy is indistinguishable from a translation, so an English page containing German text lies to the reader and to search engines, and nothing downstream can tell the two apart afterwards. The model we are going with instead — arrived at while making comments bilingual — is empty until translated:
Nothing is ever shown in the wrong language, because nothing is ever copied. "Not translated yet" and "translated" stay distinguishable by construction rather than by a flag someone has to maintain. The media constraint holds and needs no further design. A localized relation target must exist in every locale — Strapi enforces it — and for media that is both mandatory and free: the file, the URLs and the dimensions are identical across languages. Only title, summary and tags are language-specific. Confirmed three more times since. "No locale given" means the default locale, never all — it has now also produced a 404 on every German feed-item slug ( Still open, and both are the interesting halfSEO. An empty locale version means a page that does not exist in that language yet. What should the site emit — a 404, a redirect to the language that has content, or a A "human edited" status. Once a machine writes translations, the difference between nobody has touched this and a person wrote this deliberately has to survive. Without it the next pipeline run overwrites an editor's wording with a fresh generation, which is the failure mode that makes people stop trusting the automation. Related: it is also what tells the pipeline what it may re-generate — see #94. Neither is blocked by anything; they are just the parts that need deciding rather than building. |
Uh oh!
There was an error while loading. Please reload this page.
Opening this to think ahead rather than to hand out tasks. No concrete todos yet — the goal is to settle the model before anyone builds on it.
Where we are
Articles, images and videos are localized (
de,en, defaulten). The editor exposes both languages, which is genuinely useful for authors — and is also where every i18n bug so far has come from. Three of them, all the same shape: Strapi treats "no locale given" as "the default locale", never as "all", which bit us on create, on save and on delete.#92 is the latest and the most instructive: block structure is mirrored across languages, so an image block added in German also lands in English. If that image has no English entry, Strapi rejects the English write with
Document with id "…", locale "en" not found, the whole save 422s and the author loses the edit.That gives us a hard boundary to design around:
Not a convention — Strapi enforces it. So for media, "exists in every language" is mandatory, and it is also easy: the file, the URLs, the dimensions are identical across languages. Only title, summary and tags are ever language-specific. The same image in the German and the English article is the correct outcome, not a compromise. With a third language it stays the same one file.
Where the interesting question starts
Media is settled by the constraint above. Text is not, and that is the real subject here.
Proposal on the table: when a language is otherwise empty, copy the content across 1:1, so saving is always stable, and translate later in the background with AI.
That buys stability immediately. What it costs is worth naming before we commit:
translationStatus: original | copied | machine | human— or we lose the ability to ever find them again. This seems like the single most important decision in the whole thread.humanin the status field is for, and it needs to be honoured everywhere.shared.rich-textis markedlocalized: truein the component schema;shared.headlineandshared.quotecarry text that is not marked localized. Worth checking what that actually does in a dynamic zone before assuming block text can be translated per language at all.deandenwith correcthreflangis not a disaster, but publishing machine translation without marking it is a real risk. Possiblynoindexuntil a translation exists.Sketch to argue against
copied. Saving therefore never fails for lack of a translation.copiedentries and translates them via the local Ollama, marking themmachine. Article body, title, summary, tags — and blocks, subject to the question above.humanand the job never touches them again.machine, and possibly offers the original.Step 3 is the one to be sceptical about. Llama 3.1 translating a whole article is not the same task as answering a chat message, and a bad translation published under someone's name is worse than an honest "not available in this language yet". Maybe the job proposes and the author accepts. Maybe short fields translate automatically and article bodies do not.
Open questions
Companion thread on the content pipeline and the assistant's role: the companion thread on the content pipeline and the assistant (draft 02)
All reactions