In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1270 [In-Portal CMS] Localization bug report always 2012-05-05 10:02 2012-07-25 05:30
alex  
alex  
normal  
closed 5.1.3  
fixed  
 
none 5.2.0-RC1  
https://groups.google.com/d/topic/in-portal-bugs/CrJMZCnQ6Go/discussion
Fixes inability to import multiple languages from 1 language pack
1
0001270: Multiple language import fails
Problem #1:

If you have 1 language and you import language pack, that has 5 new languages, then it will fail with SQL error, that no l6_Translation column exists.

This happens, because there are only columns for first 5 languages after clean In-Portal installation.

I think, that after new record is created in Languages database table we should also create corresponding new columns in all database tables, that have translatable fields in them. Not sure if this happens already (maybe after language import was finished) or after each new language is created (as I would like it to work).


It seems, that problem was there right after we changed how phrases/e-mail events are stored in 5.1.0.


Problem #2:
If you have language pack that has 1 language with not translated phrase and 2 languages where this phrase is translated then you'll get "Column count doesn't match value count" sql error during import.

Problem #3:
<?xml version="1.0" encoding="utf-8"?> is not being added to language pack.
? language_pack_import_breaker.lang (2,705) 2012-05-05 10:02
http://tracker.in-portal.org/file_download.php?file_id=1640&type=bug
patch missing_phrase_breaks_multiple_language_import_513.patch (8,136) 2012-05-05 10:03
http://tracker.in-portal.org/file_download.php?file_id=1641&type=bug
patch missing_phrase_breaks_multiple_language_import_520.patch (10,950) 2012-05-05 10:04
http://tracker.in-portal.org/file_download.php?file_id=1642&type=bug
patch language_data_not_imported_520.patch (1,186) 2012-05-16 09:34
http://tracker.in-portal.org/file_download.php?file_id=1652&type=bug
patch htmlspecialchars_breaks_down_language_pack.patch (1,082) 2012-05-27 14:59
http://tracker.in-portal.org/file_download.php?file_id=1673&type=bug
Issue History
2012-07-25 05:30 alex Note Added: 0004891
2012-07-25 05:30 alex Status resolved => closed
2012-05-27 15:04 alex Changeset attached 5.2.x r15359
2012-05-27 15:01 alex Note Added: 0004663
2012-05-27 14:59 alex File Added: htmlspecialchars_breaks_down_language_pack.patch
2012-05-16 09:37 alex Changeset attached 5.2.x r15334
2012-05-16 09:36 alex Note Added: 0004632
2012-05-16 09:34 alex File Added: language_data_not_imported_520.patch
2012-05-05 10:07 alex Changeset attached 5.2.x r15327
2012-05-05 10:07 alex Note Added: 0004616
2012-05-05 10:07 alex Status reviewed and tested => resolved
2012-05-05 10:07 alex Fixed in Version => 5.2.0-RC1
2012-05-05 10:07 alex Resolution open => fixed
2012-05-05 10:07 alex Assigned To !COMMUNITY => alex
2012-05-05 10:06 alex Note Added: 0004615
2012-05-05 10:06 alex Status needs testing => reviewed and tested
2012-05-05 10:04 alex Assigned To => !COMMUNITY
2012-05-05 10:04 alex Developer => alex
2012-05-05 10:04 alex Status active => needs testing
2012-05-05 10:04 alex File Added: missing_phrase_breaks_multiple_language_import_520.patch
2012-05-05 10:04 alex Note Added: 0004614
2012-05-05 10:03 alex File Added: missing_phrase_breaks_multiple_language_import_513.patch
2012-05-05 10:02 alex New Issue
2012-05-05 10:02 alex File Added: language_pack_import_breaker.lang
2012-05-05 10:02 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/CrJMZCnQ6Go/discussion
2012-05-05 10:02 alex Change Log Message => Fixes inability to import multiple languages from 1 language pack
2012-05-05 10:02 alex Estimate Points => 1

Notes
(0004614)
alex   
2012-05-05 10:04   
Patch "missing_phrase_breaks_multiple_language_import_513.patch" fixes only problem #1.

Patch "missing_phrase_breaks_multiple_language_import_520.patch" fixes all described problems.
(0004615)
alex   
2012-05-05 10:06   
Will test all together later.
(0004616)
alex   
2012-05-05 10:07   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001270: Multiple language import fails
(0004632)
alex   
2012-05-16 09:36   
Patch "missing_phrase_breaks_multiple_language_import_520.patch" had a bug in it and because of it language data (phrases, e-mail events, countries) were not imported at all.

Patch "language_data_not_imported_520.patch" fixes it.
(0004663)
alex   
2012-05-27 15:01   
Patch "htmlspecialchars_breaks_down_language_pack.patch" fixes problem, that "htmlspecialchars" function (prior to PHP 5.4) by default encoded it's output to "ISO-8859-1" encoding instead of "UTF-8". This resulted in broken XML during language pack import in plain encoding.
(0004891)
alex   
2012-07-25 05:30   
Since 5.2.0/1.2.0 versions was released.