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

Folder contents does not use admin language #3

Open
mauritsvanrees opened this issue Jan 15, 2025 · 3 comments · May be fixed by #5
Open

Folder contents does not use admin language #3

mauritsvanrees opened this issue Jan 15, 2025 · 3 comments · May be fixed by #5

Comments

@mauritsvanrees
Copy link
Contributor

I have installed cs.adminlanguage on a multilingual Plone 6.0 site. It works fine, except in the folder contents. This remains largely in the original language, here German:

Screenshot 2025-01-15 at 13 55 44

Since this part is done using javascript, the structure pattern from mockup, I started the mockup server and used its javascript in the resource registries. I edited structure.js to always set this.options.language = en as a test, but that did not help.

Any idea?

@erral
Copy link
Member

erral commented Jan 23, 2025

To tell the truth I don't know how to handle this @mauritsvanrees ...

I would say that there is some global variable that defines the language and gets configured when all the JS is loaded, but I don't recall how.

I do remember changing some patterns to obey the language configuration for TinyMCE and select2 patterns, here:

Perhaps they can be used as aa starting point...

@petschki
Copy link
Contributor

I think, thats because the mockup translations have the i18n domain widgets but the cs.adminlanguage only checks for these languages:

https://github.com/codesyntax/cs.adminlanguage/blob/master/src/cs/adminlanguage/negotiator.py#L100-L104

@petschki
Copy link
Contributor

petschki commented Jan 23, 2025

Hm ... ok, rethinking that -> this is not relevant here. The mockup translation factory gets the language from <html lang="<lng>" /> which is the value from portal_state.language() (https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/browser/templates/main_template.pt#L13) ... maybe we can override the portal_state view here and set the language fixed to the settings, then mockup translations should be correct ...

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

Successfully merging a pull request may close this issue.

3 participants