Help!

Script for backporting translations

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> i18n RSS
Next:  FW: Amazing Job for Sumemr  
Author Message
Håvard_Korsvoll
External


Since: May 09, 2004
Posts: 6



PostPosted: Sun Jun 03, 2007 12:40 pm    Post subject: Script for backporting translations
Archived from groups: linux>debian>maint>i18n (more info?)

Hi list

I am looking for a script that can backport translations from the latest
version to a production version. This is needed for the skolelinux
project. We are now releasing the etch version, and KDE will be at 3.5.5
for a long time.

The translator are working on the HEAD of KDE, now 3.5.8 I think. So we
want to be able to update fixes in the translation back to 3.5.5. This
is very important since most of the translation errors are discovered by
the users, and we need a system to update translations in the production
version of skolelinux.

To avoid double work, we will only update the latest translations when
we find errors, and then backport it back to production version.

When there are strings with errors that are no longer available in the
HEAD, we of course need to fix it in the 3.5.5 version only.

The backport script need to do this:

- Merge HEAD.po with STABLE.po with these rules:
1 If msgid's are equal and msgstr's are different => use msgstr
from HEAD.po
2 Any msgid in STABLE.po that are not in HEAD.po should be left
with its current msgstr.
3 Any msgid in HEAD.po that are not in STABLE.po should be
discarded.

Point 1 could be done with msgmerge -U HEAD.po STABLE.po. But it
clutters point 2 since it don't look at the msgstr in STABLE.po.

Are there anyone who can help?

Håvard


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Daniel Nylander
External


Since: Nov 08, 2006
Posts: 14



PostPosted: Sun Jun 03, 2007 1:20 pm    Post subject: Re: Script for backporting translations [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Håvard Korsvoll skrev:

> - Merge HEAD.po with STABLE.po with these rules:
> 1 If msgid's are equal and msgstr's are different => use msgstr
> from HEAD.po
> 2 Any msgid in STABLE.po that are not in HEAD.po should be left
> with its current msgstr.
> 3 Any msgid in HEAD.po that are not in STABLE.po should be
> discarded.
>
> Point 1 could be done with msgmerge -U HEAD.po STABLE.po. But it
> clutters point 2 since it don't look at the msgstr in STABLE.po.
>
> Are there anyone who can help?

I might be a bit slow here but what benefits would 2 and 3 give you?

- --
Daniel Nylander (CISSP, GCUX, GCFA)
http://www.DanielNylander.se
Stockholm, Sweden
info DeleteThis @danielnylander.se yeager DeleteThis @ubuntu.com dnylande DeleteThis @gnome.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGYqH41RcydD1RNIwRA93iAKCj8Pgrg6mjJt0ujZaeeiHSeS0CVgCgsXiB
EjZLJNmXLSucrjfcpYxvCl8=
=R/sm
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Håvard_Korsvoll
External


Since: May 09, 2004
Posts: 6



PostPosted: Sun Jun 03, 2007 2:00 pm    Post subject: Re: Script for backporting translations [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Daniel Nylander skreiv:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> Håvard Korsvoll skrev:
>
>> - Merge HEAD.po with STABLE.po with these rules:
>> 1 If msgid's are equal and msgstr's are different => use msgstr
>> from HEAD.po
>> 2 Any msgid in STABLE.po that are not in HEAD.po should be left
>> with its current msgstr.
>> 3 Any msgid in HEAD.po that are not in STABLE.po should be
>> discarded.
>>
>> Point 1 could be done with msgmerge -U HEAD.po STABLE.po. But it
>> clutters point 2 since it don't look at the msgstr in STABLE.po.
>>
>> Are there anyone who can help?
>
> I might be a bit slow here but what benefits would 2 and 3 give you?

Well, if I use msgmerge as I suggest, and there has been a change in the
msgid between STABLE and HEAD. STABLE will end up with an empty or fuzzy
translation of that string since it doesn't find that msgid in HEAD.
This is wrong since the translation may be perfectly valid for the
STABLE version.

Håvard


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Håvard_Korsvoll
External


Since: May 09, 2004
Posts: 6



PostPosted: Sun Jun 03, 2007 3:30 pm    Post subject: Re: Script for backporting translations [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Christian Perrier skreiv:
>> - Merge HEAD.po with STABLE.po with these rules:
>> 1 If msgid's are equal and msgstr's are different => use msgstr
>> from HEAD.po
>> 2 Any msgid in STABLE.po that are not in HEAD.po should be left
>> with its current msgstr.
>> 3 Any msgid in HEAD.po that are not in STABLE.po should be
>> discarded.
>
>
> I would do this this way:
>
> msgcat --use-first HEAD.po STABLE.po >merged.po
> msgmerge -U merged.po STABLE.pot
> msgattrib --no-obsolete merged.po >RESULT.po
>

Thank you. This will do I think Smile

Håvard


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> i18n All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum