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

Merge fallback locales in lizDict #5195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gustry
Copy link
Member

@Gustry Gustry commented Jan 14, 2025

New PR like #5139 or #5131 adding new strings in lizDict are missing translations when using LWC in another language than English, until we do the update with Lizmap locales process.

I'm clearly not sure if it's the purpose in this file to add the fallback, or if it must be done elsewhere, upstream etc.

@Gustry Gustry requested review from laurentj and nworr January 14, 2025 16:24
@github-actions github-actions bot added this to the 3.10.0 milestone Jan 14, 2025
Copy link
Collaborator

@laurentj laurentj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. LocalesLoader is using low level api of JLocale, so, no, we cannot backport it in upstream.

Note that this patch cannot be backported to lizmap 3.8 as 3.8 does not use low level api of jLocale, but use its own parser that is not very reliable (and does not take advantage of cache used by jLocale)

@Gustry
Copy link
Member Author

Gustry commented Jan 16, 2025

I'm not fully sure about the last talks we got in the chat about this PR.
Indeed, the best should be on "build" time, to add all missing strings in each languages, to English.
But then, it means the ZIP would fallback on English by default anyway, despite the setting in INI file. Or this PR should be done only if the fallback is different than en_US to avoid loading two files.

Side note, this dictionary file doesn't seem "too big", like 200 lines lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_9 localization php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants