Copying missing translatable data when Primary language is changed
Components
Labels
None
Description
Context Information
None
Additional information (do not use)
None
Attachments
1
- 04 Jan 2011, 11:01 AM
Activity
Show:
Dmitry Andrejev March 30, 2011 at 2:53 PM
Closing, since 5.1.2 release has been released.
Alex January 9, 2011 at 2:23 PM
Fix committed to [b]5.1.x branch/b. Commit Message:
Fixes #0000848: Copying missing translatable data when Primary language is changed
Dmitry Andrejev January 5, 2011 at 7:44 PM
Tested good, please commit.
Fixed
Priority
Assignee
Reporter
Alex
AlexDeveloper
Alex
AlexChange Log Message
Fixes multi-language data when Primary language is changed
Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
External issue ID
848
External issue URL
Fix versions
Affects versions
Created August 31, 2010 at 7:06 PM
Updated December 29, 2024 at 9:15 PM
Resolved March 30, 2011 at 2:53 PM
There are 2 types of columns in database tables, that In-Portal uses:
columns, that have different value on each language (e.g. l1_Name, l2_Name, l3_Name, l1_Description, etc.);
columns, that have same value on each language (Status, FieldName, Type).
In case, when language-dependent column doesn't have value on given language, then value from primary language is displayed. All works fine, until primary language is changed.
Best way to solve this is to copy data language-dependent data from old primary language columns into new primary language columns.
I think, that kMultiLanguageHelper is perfectly suited for this task, since it already keeps track of all language-dependent columns through all database. For each language-dependent column will issue database query that will copy only missing data, so any entered data on new primary language will be preserved.
Code described above should on primary language change (Set Primary button on toolbar or primary checkbox on language editing).