-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2.23
-
None
-
Empty show more show less
-
DevX 34
-
1
-
Yes
Reproduce
- Setup SPA Demo locally
- In the site configuration have two variations of english: en, en_GB
'travel': 'i18n': 'class': 'info.magnolia.cms.i18n.DefaultI18nContentSupport' 'enabled': true 'fallbackLocale': 'en' 'locales': 'en': 'country': '' 'enabled': true 'language': 'en' 'de': 'country': '' 'enabled': true 'language': 'de' 'en_GB': 'country': 'GB' 'enabled': true 'language': 'en'
- In the pages detail subapp try and switch between the two english options.
Expected
When selecting en_GB the values for that language should be displayed in the editor.
Actual
Selecting en_GB displays en. The pages app is not able to correctly display languages which also contain a country code.
Notes
The check for the default locale here in this class info.magnolia.pages.spa.routing.DefaultSpaRouter#getLanguage() only checks if the language is the same between the provided one and the site default, and ignores all other parts of the locale.
We have some code in the class AbstractI18nContentSupport which should help. In this class there is a method which is able to sort out "next best" but it this case it's a bit different because we want to find the most specific match.
Acceptance criteria
1.
|
Implement | Completed | Unassigned | |||||||||
2.
|
Review code | Completed | Chuong Doan Huy | |||||||||
3.
|
Pre-int QA | Completed | Robert Šiška | |||||||||
4.
|
Final QA | Closed | Oanh Thai Hoang |
|