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.