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

Removing a Multilang language should delete translations #2426

Open
JensRoland opened this issue Aug 25, 2024 · 1 comment
Open

Removing a Multilang language should delete translations #2426

JensRoland opened this issue Aug 25, 2024 · 1 comment

Comments

@JensRoland
Copy link

This is perhaps a niche case, since you would rarely want to drop an entire language from your site, BUT it is a stumbling block for anyone using the Multilang skeleton.

The skeleton comes with nine languages supported, and this is most likely not the list of languages the user wants. So they go into Configurations and changes the list of languages to, say, en and da, then hits Save.

Now they open the About page and try to switch to the da version. The dropdown will now list Danish as an option, but also all the now-defunct language options (since the files like 02.about/page.es.md are still there). Clicking on the others will redirect to a 404 page, and there is not way to remove them from the Admin panel.

There are a few ways this could be made more intuitive:

  1. When changing languages in the Configuration page, show a warning "You have removed the languages (Espanol, Deutsch). This will delete all the associated content translations. Continue?". If they continue, delete the files. This seems like the most intuitive solution to me.
  2. When listing languages in the Pages dropdown, if a language is defunct, show the language option as disabled or just omit it entirely.
  3. If a user chooses a defunct language in the dropdown under Pages, populate the content/options etc. fields, but display a message saying the language is disabled, and include a "Delete translation" button.
  4. Include a "Purge unreacable translations" button somewhere
@rhukster
Copy link
Member

lanaguage options should only reflect the current supported languages, so should not show up in the dropdown. I thnk that is where th issue lies. I hesitate to delete language translations of pages themselves at all as that might be a lot of work, that you didn't intened to lose, even if you are not ready to have them 'live' yet. As such sounds like an Admin plugin issue. Moving there.

@rhukster rhukster transferred this issue from getgrav/grav Oct 23, 2024
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

2 participants