Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete base translation #96

Open
cbrichau opened this issue Jan 13, 2023 · 4 comments
Open

Delete base translation #96

cbrichau opened this issue Jan 13, 2023 · 4 comments

Comments

@cbrichau
Copy link

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!

@Designer023
Copy link

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.

@struct78
Copy link

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.

@cbrichau
Copy link
Author

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.

@LiamMartens
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants