Forums / General / Translations & encoding problems (.ts files)

Translations & encoding problems (.ts files)

Author Message

Ludovic André

Thursday 08 February 2007 12:10:06 am

Hi all,

I'm currently having a problem with the translation system. I'm generating the XML translation file on a server A, and I noticed that special characters (like é, è, ...) are converted to the HEX HTML code (é, ...). So far, this is still working on my server A, sentences containing those special characters are still found by the CMS, and the translation is correctly displayed. Now, I moved my translation.ts files to a server B, and there the special characters are not found anymore, the CMS can't find the 'source' sentence in the translation.ts file, and all those messages containing the special characters are not translated anymore... (but the others are!)

Which differences between server A & B could lead to that problem?
(Please note that I opened the template file & translation file on server B to see if there was any problems after uploading the files, and there are no changes with server A, the content is the same - the eZ setup of the site itself is also the same).

Thanks for your help!

Ludovic André

Ludovic André

Thursday 08 February 2007 12:52:26 am

Some more details about my problem:

After some tests inside the eZ code, I found out this difference between server A & B, when ez is looking for the translations:

server A, running fine:

eztranslatormanager Object
(
    [Handlers] => Array
        (
            [0] => eztstranslator Object
                (
                    [IsKeyBased] => 1
                    [Messages] => Array
                        (
                            [3bf24ce0ec94cd82720184848a1d31f6] => Array
                                (
                                    [context] => bcee/dpp
                                    [source] => Demande de prêt personnel
                                    [comment] => 
                                    [translation] => Personal loan request
                                    [key] => 3bf24ce0ec94cd82720184848a1d31f6
                                )

server B, same scripts,

eztranslatormanager Object
(
    [Handlers] => Array
        (
            [0] => eztstranslator Object
                (
                    [IsKeyBased] => 1
                    [Messages] => Array
                        (
                            [f9f26a43b59903480b4f9c7e5e8cc5ed] => Array
                                (
                                    [context] => bcee/dpp
                                    [source] => Demande de prêt personnel
                                    [comment] => 
                                    [translation] => Personal loan request
                                    [key] => f9f26a43b59903480b4f9c7e5e8cc5ed
                                )

So on server B, it's not converting back the ê into " ê ", and then the md5 key is not correct anymore...

If that can help you (to help me ;) )

Thanks!

Ludovic André

Ludovic André

Thursday 08 February 2007 5:01:52 am

Ok, quick update :) I'm answering my own questions ;)

So, what I did right now, is a quick php script to convert those hex html entities to the real character behind, and then use iconv to encode the file into utf8.

As from now, everything is now running fine, my translations are correctly taken into account...

But, it would be really great If I could skip this step of converting the file... why does not ezlupdate generate directly the file into utf8 ? (like the translations.ts which come with the original distribution?)

Ludovic André

eZ debug

Timing: Jan 31 2025 04:32:09
Script start
Timing: Jan 31 2025 04:32:09
Module start 'content'
Timing: Jan 31 2025 04:32:10
Module end 'content'
Timing: Jan 31 2025 04:32:10
Script end

Main resources:

Total runtime1.1519 sec
Peak memory usage4,096.0000 KB
Database Queries192

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0391180.8203
Module start 'content' 0.00620.9923 768.8594873.0625
Module end 'content' 0.99850.1533 1,641.9219337.4922
Script end 1.1518  1,979.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3529210.0002
Check MTime0.00140.1192210.0001
Mysql Total
Database connection0.00070.061810.0007
Mysqli_queries1.068792.77861920.0056
Looping result0.00180.15861900.0000
Template Total1.120897.320.5604
Template load0.00190.164920.0009
Template processing1.118897.128920.5594
Template load and register function0.00130.108810.0013
states
state_id_array0.00140.117610.0014
state_identifier_array0.00120.100220.0006
Override
Cache load0.00160.1380230.0001
Sytem overhead
Fetch class attribute can translate value0.00130.112220.0006
Fetch class attribute name0.00230.201130.0008
XML
Image XML parsing0.00040.030820.0002
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00710.6167210.0003
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs