[MGNLUI-5044] Language selectors showing incorrect values Created: 25/Feb/19  Updated: 26/Apr/19  Resolved: 25/Apr/19

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1

Type: Bug Priority: Neutral
Reporter: Simon Lutz Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0.95h
Time Spent: 10m
Original Estimate: Not Specified

Attachments: PNG File component dialog i18n without country.png    
Issue Links:
Cloners
is cloned by PAGES-177 Page editor initialized with wrong lo... Closed
Relates
dependency
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Resurface finalisation
Sprint: Foundation 8, Foundation 9
Story Points: 1

 Description   

– initial description split to PAGES-177

Language selector in dialog/detail sub-app footer: Language captions in wrong language and missing country

  • The text is shown in the wrong language, it is derived from the system default local rather than the user profile. To reproduce, change the user profile settings to another language than the system locale.
  • Countries are not displayed together with the languages (e.g. "English" instead of "English (United Stated)"), see screenshot

For the technical bits: java.util.Locale#getDisplayLanguage() when invoked without arguments (as currently done in 6.0) takes the system default locale. We used to pass the one from MgnlContext, which accounts for language preference.



 Comments   
Comment by Mikaël Geljić [ 09/Apr/19 ]

slutz, I did spot a regression compared to M5 re: language selector captions.
In my observation, language captions are always fine in the page bar. They're only wrong in dialog/detail sub-app's respective footers.
—In my case they show... in french (despite superuser having english as preferred locale).

The language selector of the page shows “Englisch” but the texts appears in German.

—which selector/texts did you refer to? and what expectation did you have, especially after “[Editing] language preference from superuser to e.g. Deutsch”?

For the technical bits: java.util.Locale#getDisplayLanguage() when invoked without arguments (as currently done in 6.0) takes the system default locale. We used to pass the one from MgnlContext, which accounts for language preference.

Comment by Simon Lutz [ 10/Apr/19 ]

In my observation, language captions are always fine in the page bar. They're only wrong in dialog/detail sub-app's respective footers.
—In my case they show... in french (despite superuser having english as preferred locale).

Indeed and it that was reported through support as well (together with one more issue, which is that the country itself is missing): SUPPORT-9834

—which selector/texts did you refer to? and what expectation did you have, especially after “[Editing] language preference from superuser to e.g. Deutsch”?

Sorry, my ticket description was not good enough. The language of the text in the selector in the pages editor is correct, however it does not match the content display. So in my scenario, when I change my profile to German and load a page, I do see the German content but the language selector shows English instead. I would expect that the language selector shows German.

I will update the ticket description combining all three points.

Comment by Mikaël Geljić [ 10/Apr/19 ]

Got it, different issue with page-editor content; you should always see english content first (regardless of superuser's language preference), because english is the site's default locale. Also seems to be a regression compared to M5.

Re: country, my current PR restores that too.

Generated at Mon Feb 12 09:22:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.