[MGNLUI-3634] Multiple locales that sit under the same language overwrite each other Created: 13/Oct/15  Updated: 29/Oct/15  Resolved: 22/Oct/15

Status: Closed
Project: Magnolia UI
Component/s: framework
Affects Version/s: 5.4.2
Fix Version/s: 5.4.3

Type: Bug Priority: Critical
Reporter: Gediminas Zalys Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2015-10-15 at 17.29.22.png     PNG File Screen Shot 2015-10-15 at 17.30.01.png    
Issue Links:
causality
caused by MGNLUI-3489 Support field default value for local... Closed
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:
Sprint: Kromeriz 16
Story Points: 2

 Description   

I have enabled both Traditional Chinese (zh_TW) and Simplified Chinese (zh_CN), and there is a bug that both of these locales actually use same language which is zh (Chinese). Which means that when updating data in the content app for either simplified or traditional Chinese it overwrites each other as the language used to store the data in jcr is zh, but not zh_TW or zh_CN.

For example if i have lets say productName form field, and add value to it in English, Simplified and Traditional Chinese, JCR does below:

  • productName=productA
  • productName_zh=產品A

Expected:

  • productName=product1
  • productName_zh_CN=产品1
  • productName_zh_TW=產品1

This problem was not there with 5.3.8 seems to be introduced after. I am running now on 5.4.2, note i am not using site module, my locales are enabled under:
/server/i18n/content/locales/zh_TW
/server/i18n/content/locales/zh_CN

Originally posted here

Also please let me know in what version this was introduced, i will attempt downgrading



 Comments   
Comment by Jan Haderka [ 15/Oct/15 ]

is that in the app or in the templates? What is the language file you are using? How are the keys overridden (or how are you retrieving the values)?

Comment by Gediminas Zalys [ 15/Oct/15 ]

It is in my own content app, but you can replicate this on your publicly available author instance.
Navigate to /modules/multisite/config/sites/travel/i18n/locales/ and the zh_TW and zh_CN locales, see image below:

now when you go to your Tour Categories app, you will be able to see the additional languages, add something for Traditional Chinese and save, it will take you out of the app, return to the app and view the content, however this time view it in Simplified Chinese, you will see that whatever you added for Traditional Chinese is also visible for Simplified Chinese and vise versa, as it uses one sufix _zh for field values, instead of using _zh_TW *or *_zh_CN, see image below:

Comment by Gediminas Zalys [ 22/Oct/15 ]

any updates on this issue ? i can not release my code with this bug as the entire data structure will be messed up. I would be happy to downgrade, if version is advised. Thanks

Comment by Robert Šiška [ 22/Oct/15 ]

Hello. The bug was introduced in 5.4.2 and will be probably fixed in 5.4.3.

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