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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:20:48
Script start
Timing: Jan 18 2025 22:20:48
Module start 'layout'
Timing: Jan 18 2025 22:20:48
Module start 'content'
Timing: Jan 18 2025 22:20:48
Module end 'content'
Timing: Jan 18 2025 22:20:48
Script end

Main resources:

Total runtime0.6726 sec
Peak memory usage4,096.0000 KB
Database Queries83

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 588.0469152.6406
Module start 'layout' 0.00870.0052 740.687539.4766
Module start 'content' 0.01400.6571 780.1641777.4375
Module end 'content' 0.67110.0015 1,557.601620.1406
Script end 0.6725  1,577.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00510.7645160.0003
Check MTime0.00230.3429160.0001
Mysql Total
Database connection0.00250.377810.0025
Mysqli_queries0.574585.4246830.0069
Looping result0.00670.9954810.0001
Template Total0.632194.020.3160
Template load0.00290.436220.0015
Template processing0.629193.540720.3146
Template load and register function0.00020.030310.0002
states
state_id_array0.00060.091110.0006
state_identifier_array0.00070.105120.0004
Override
Cache load0.00260.3833710.0000
Sytem overhead
Fetch class attribute can translate value0.00070.108360.0001
Fetch class attribute name0.00090.1352130.0001
XML
Image XML parsing0.00350.524160.0006
class_abstraction
Instantiating content class attribute0.00000.0037140.0000
General
dbfile0.00400.5980350.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 39
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs