plone / plone.i18n

Text normalization logic and language, country, cctld data.
8 stars 11 forks source link

Fix listAvailableLanguageInformation #43

Closed reinhardt closed 1 year ago

reinhardt commented 1 year ago

Refs https://github.com/plone/plone.i18n/issues/40

mister-roboto commented 1 year ago

@reinhardt thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

reinhardt commented 1 year ago

@jenkins-plone-org please run jobs

reinhardt commented 1 year ago

@jenkins-plone-org please run jobs

mauritsvanrees commented 1 year ago

There are errors in plone.app.i18n and plone.app.multilingual.

reinhardt commented 1 year ago

There are errors in plone.app.i18n and plone.app.multilingual.

FWIW, on my local machine I can reproduce the failures in plone.app.i18n regardless of what branch of plone.i18n is checked out, and I cannot reproduce the failures in plone.app.multilingual at all (using python 3.7).

mauritsvanrees commented 1 year ago

I see the problem. You are missing some changes from master. The flags were changed in PR #42. If you merge or rebase on master, the test failures should be gone.

But I see that this method is not actually called anywhere. This was already true in Plone 4.3, when this method was in Products/PloneLanguageTool/LanguageTool.py. It seems like a logical method to call though. That makes me wonder how other parts of Plone get a list of available languages. Maybe those places could call this method instead of what they are doing now.

The same is true for listAvailableCountries in the same file. Also not used. And it has the same problem with sort not working on Python 3.

I would suggest to remove these methods, except that Plone 6 is in beta, so we should not do that.

Maybe fix both methods and add some tests so the code gets called and we know if something breaks?

jensens commented 1 year ago

@jenkins-plone-org please run jobs

jensens commented 1 year ago

I would suggest to remove these methods, except that Plone 6 is in beta, so we should not do that.

I would @deprecate those.

gforcada commented 1 year ago

@jenkins-plone-org please run jobs

gforcada commented 1 year ago

I was about to cut a final release but better get this in before it 🍀