document-internationalization icon indicating copy to clipboard operation
document-internationalization copied to clipboard

Delete base translation

Open cbrichau opened this issue 2 years ago • 4 comments

I'm not sure this is the right place to post this, so please redirect me elsewhere if appropriate :)

When I create an article in French (base) and English (translation), then later decide that EN isn't useful and I only want FR, I can delete the translation while keeping the base thanks to referenceBehavior: 'weak'.

But I can't do the opposite. If I want to get rid of FR (base), then EN (translation) is also removed. So I have no other choice than to keep an empty FR article that I will never publish.

Is there a way around this?

Thanks!

cbrichau avatar Jan 13 '23 21:01 cbrichau

I'm in a similar situation and I'd like a solution too.

My default language is en and I have some posts with a fr translation. This works great where there is always an english base document, but I now would also like to add an article where the language is fr and there is no en version. Essentially I want the ability to change the base language on an article.

Designer023 avatar Feb 06 '23 08:02 Designer023

I ended up adding an "Exclude base translation" checkbox in our internationalisation schema transformer for documents. Then at build time I just ignore anything that has that checkbox checked when building the base language.

struct78 avatar Mar 15 '23 05:03 struct78

I ended up creating a language selection field (containing only the supported languages) and a translations array field (which is a list of language + reference pairs, where the language must be unique).

Now there's no more master-slave relationship. All articles can, but don't have to, be manually linked to one or more articles in other languages. It's a bit more manual work, but it's so much easier to handle.

cbrichau avatar Mar 22 '23 18:03 cbrichau

At the moment this is not possible due to the fact that every document requires a base language. I believe there is some work being done on removing this limitation.

LiamMartens avatar Apr 04 '23 15:04 LiamMartens