Update i18n.js #2701

Merged
merged 1 commit into from Dec 2, 2013

Conversation

Projects
None yet
2 participants
Contributor

DirtyHarri commented Dec 1, 2013

When looking for a translation, the fallback solution (CurrentLocale -> defaultLocale -> fallbackString) does not work for cms/javascript/CMSMain.Tree.js as localization for this part was changed to short locale names (e.g. de_DE -> de). (Don't know why...)

The original fallback solution will not find a translation for e.g. "Tree.ShowAsList" in the de-language file. For this entry there is also no fallbackString defined, so the menu in the CMS (right click on a page) is broken for each language that does not have the translation included.

I added another fallback level where the short version of the default language (en_US -> us) is searched before falling back to the fallbackstring and then finally giving up...

@DirtyHarri DirtyHarri Update i18n.js
When looking for a translation, the fallback solution (CurrentLocale -> defaultLocale -> fallbackString) does not work for cms/javascript/CMSMain.Tree.js as localization for this part was changed to short locale names (e.g. de_DE -> de). (Don't know why...)

The original fallback solution will not find a translation for e.g. "Tree.ShowAsList" in the de-language file. For this entry there is also no fallbackString defined, so the menu in the CMS (right click on a page) is broken for each language that does not have the translation included.

I added another fallback level where the short version of the default language (en_US -> us) is searched before falling back to the fallbackstring and then finally giving up...
64539a0

@chillu chillu added a commit that referenced this pull request Dec 2, 2013

@chillu chillu Merge pull request #2701 from DirtyHarri/patch-1
Update i18n.js
7136daa

@chillu chillu merged commit 7136daa into silverstripe:3.1 Dec 2, 2013

1 check passed

default Scrutinizer: No new issues — Travis: Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment