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

pam does not respect previously existing root language folder #456

Open
yurj opened this issue May 29, 2024 · 1 comment
Open

pam does not respect previously existing root language folder #456

yurj opened this issue May 29, 2024 · 1 comment

Comments

@yurj
Copy link
Contributor

yurj commented May 29, 2024

Hi!

I've a site with / set as italian (TG is ok) and /en as english. It works (had to set it by code because related widget does not support picking the root) but when I save the language control panel, setup.py will set /it as italian translation for /en. This is due to this lines:

available = language_tool.getAvailableLanguages()
for language in languages:
info = available[language]
name = info.get("native", info.get("name"))
doneSomething += self.setUpLanguage(language, name)

this lines does not check if there's an already existing translation.

Will you accept a patch that just check if an already existing root language folder exists and then skip the setUpLanguage call?

@yurj
Copy link
Contributor Author

yurj commented May 29, 2024

The real fix shoudl be to change this:

folder = getattr(self.context, folderId, None)

to get the existing root translation folder.

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

No branches or pull requests

1 participant