Forums / Install & configuration / howto upgrade and merge translations

howto upgrade and merge translations

Author Message

Jacques Siboni

Wednesday 06 February 2008 2:41:34 am

Hi,
I am upgrading ezpublish from 3.7 to 4.0, step by step.
The problem is how to upgrade the translation.ts files.
I explain.
From 3.8 to 3.9 for instance the translation files evolve. If I don't want to type again all the translations I have added I need to merge the ts file 3.9 into the 3.8 ts file to have access to a 3.9 ts file including all the new string and which keep the old ones.

I haven't found any piece of software doing this. lupdate is not convenient in this matter as far as I have understood it.

This software tool is not complex to do but if someone has already solved the problem it is way better.

Let me know what you think

Thanks

Jacques

Steven E. Bailey

Wednesday 06 February 2008 1:46:22 pm

I've upgraded from 3.6, 3.7 etc. to 3.9 and 3.10 and never had a problem with the translation files... Although upgrading to 3.10 I did have to copy translation.ts files from the old site.

What exactly is the problem?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Jacques Siboni

Thursday 07 February 2008 11:19:00 am

Hi,

Thanks for your concern.

Here is the problem. Each new version includes new contexts and messages.
If I use the new translation.ts file, I loose all the translations I have added in the previous version.
for instance in version 3.9.4 there is context:
/design/admin/class/edit_language with a few messages in it
This context does not exist in version 3.8.10

If I use the 3.8.10 version I don't have access to this context and if I use the 3.9.4 I have to reenter every translation!!

What I need here is some sort of "merger" which merges the new contexts and messages
from the 3.9.4 version into the 3.8.10 ts file, and then install this upgrade ts file into the 3.9.4 translation directory.

Then I'll have to add the translations for the new messages only.

Is it more understandable?

I suppose I am not the only one to have this problem.

Thanks for your help

Jacques

Xavier Serna

Friday 08 February 2008 1:50:30 am

Hi Jaques,

if you copy the old .ts file to the new ezinstallation and update it with the ezlupdate, you will get a .ts file with your "old" translations and the new ones added, so you only have to review the new ones added in the ezversion you are installing.

hth!
Xavier

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Jacques Siboni

Sunday 17 February 2008 9:58:11 am

Xavier,
Thanks a lot, your answer has solved the problem

Jacques

Gaetano Giunta

Monday 18 May 2009 7:52:50 am

Running ezlupdate is fine and dandy, but I have more of a problem with the official eZ translations that get updated independently in the different branches.

What I need is a tool that compares translation files A and B:

- translation keys only present in A or in B are shown as such at the top of the list

- translation keys present in both A and B with equal translations are not shown at all

- translation keys present in both A and B with different / missing translations are clearly marked as such, and there are buttons to copy one translation over the other

Is it something that other people would find useful?
I was thinking about coding it as a php script, but maybe adding it as an add-on to the addicted extension would be better...

Principal Consultant International Business
Member of the Community Project Board

Jan Baelemans

Thursday 28 May 2009 8:48:43 am

Hai Gaetano
If you use QT Linguist and other programs from the development-kit (it's Nokia now but used to be from Trolltech, search Nokia or Trolltech.com). You have a extended environment to create Language-issue-based solutions for diverse problems.Available under GNU-license or GPL, so basicaly for free. For example the Phrase book. A kind of dictionairy for sites. With all the possibilities to adjust automated or not translation-files. Best practice is to make your own extension for the translation. Some study is needed to place all the translation-extensions in the right or desired order, but the principal works.
The development-kit has several modules, for the designer, programmer and user of a site according to language and translation issues.
It should work for most situations because it's flexible to use
Kind regards
Jan Baelemans

Gaetano Giunta

Thursday 28 May 2009 11:20:25 am

@Jan: thanks, I will give a look at the dev kit, even though I was thinking rather about building/extending some php script:
- php code is easier to integrate in a web interface if we want later to make an ezpublish extension that allows translators to work within the system itself (such as the 'addicted' one)
- the ezc team has already done some php script to deal with translations, as the qt format is used by the ezc template engine, too

Principal Consultant International Business
Member of the Community Project Board

*- pike

Tuesday 01 September 2009 9:16:22 am

Hi Gaetano

I wrote the addicted extension .. if I understand what you're suggesting, I would write it as a xslt script in the addicted extension (there are already some located in the docs folder of the extension that can serve as examples).

I use XSLT for 'playing with XML'. It's not so easy to integrate in anything, but its flexible and logical coding. But you do need some form of XSLTProc, or any other XSL processor, and know how to work with it ..

$2c,
*-pike

---------------
The class eZContentObjectTreeNode does.

eZ debug

Timing: Jan 31 2025 03:44:44
Script start
Timing: Jan 31 2025 03:44:44
Module start 'content'
Timing: Jan 31 2025 03:44:44
Module end 'content'
Timing: Jan 31 2025 03:44:44
Script end

Main resources:

Total runtime0.2038 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 588.0547370.2813
Module start 'content' 0.00690.0151 958.33591,013.5781
Module end 'content' 0.02200.1818 1,971.91413,902.4922
Script end 0.2038  5,874.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00482.3379200.0002
Check MTime0.00140.6973200.0001
Mysql Total
Database connection0.00060.274310.0006
Mysqli_queries0.099248.67241410.0007
Looping result0.00140.66791390.0000
Template Total0.181389.010.1813
Template load0.00070.350310.0007
Template processing0.180688.619210.1806
Override
Cache load0.00050.248710.0005
Sytem overhead
Fetch class attribute can translate value0.00221.071410.0022
XML
Image XML parsing0.00030.155510.0003
General
dbfile0.00884.3250200.0004
String conversion0.00000.003530.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs