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

ICU message format not supported for fallback locale #332

Open
czhDavid opened this issue Jan 20, 2022 · 2 comments
Open

ICU message format not supported for fallback locale #332

czhDavid opened this issue Jan 20, 2022 · 2 comments

Comments

@czhDavid
Copy link

Bazinga JS looks for ICU message format only with the current locale. For the Fallback locale it does not look into files with ICU suffix.

This problem is in method "get_message"

There is block
if (has_message(_locale, _domain + INTL_DOMAIN_SUFFIX, id)) { _additionalReturn.isICU = true; return _messages[_locale][_domain + INTL_DOMAIN_SUFFIX][id]; } if (has_message(_locale, _domain, id)) { return _messages[_locale][_domain][id]; }
which looks of ICU message format and then in files withou the ICU in the current domain, but for fallback it looks only in files without the suffix

if (has_message(localeFallback, _domain, id)) { return _messages[localeFallback][_domain][id]; }

There is no workaround for this issue.

From the looks of the code the same problem will occur when using locale like 'en_US'

@stof
Copy link
Contributor

stof commented Jan 20, 2022

@czhDavid can you open a PR fixing this ? It definitely looks like a bug.

@lliboure
Copy link

I encontered same issue. When will you plan to fix this issue please?

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

3 participants