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

NDEV-70 Action buttons are not translated #226

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

xispa
Copy link
Member

@xispa xispa commented Aug 26, 2017

jarn.jsi18n uses the first matched catalog instead of merging the translation resources available for the same domain and language. More info: jarn.jsi18n uses the first matched catalog

This causes that action buttons, as well as other translations retrieved javascript do not render properly in some cases. With this Pull Request, the function from jarn.jsi18n has been overriden, so it takes into account now all translation resources from a given domain and language.

A Pull Request to the official repos has been created too: collective/jarn.jsi18n#2

Note jarn.jsi18n stores the catalog for 24 hours by default. To x-check this PR, you can set the time-to-live by calling jarn.i18n.setTTL(millis) passing in milliseconds for how long the local storage cache should remain valid. Note that if local storage is supported, and the cache has not expired, the browser will NOT reload a catalog.

@xispa xispa requested a review from Espurna August 26, 2017 11:33
@Espurna Espurna merged commit d929a61 into wip Aug 28, 2017
@xispa xispa deleted the NDEV-70-action-buttons-are-not-translated branch August 28, 2017 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants