On Wed, May 02, 2012 at 01:04:34PM +0200, Ulf-D. Ehlert wrote:
> On Tue, May 01, 2012 at 08:52:16PM +0200, Marco Ciampa wrote:
> [...]
> > Doing exactly this I just noted that the already translated strings in
> > one .po file do not magically ;-) move from one file to another...
> > (from introduction to appendix...)
> > 
> > I need a way to avoid to create uneeded work to other translators...how
> > can I move all those strings for _all_ the languages .po files?
> There's no simple (make) command to do this, but you can try this
> (not tested!):
> 1. backup appendix.po and introduction.po ;-)
> 2a. try 'msgmerge' with the '--compendium=FILE' option:
>       $ msgmerge --quiet --width=79 \
>             --compendium=po/xx/introduction.po \
>             --output-file=po/xx/appendix.po \
>             po/xx/appendix.po pot/appendix.pot
>     and compare new and old appendix.po.

I've tried this and it is enough for me.

> 2b. try it with 'make' using the 'COMPENDIUM' variable:
>       # save introduction.po:
>       $ cp po/xx/introduction.po po/xx/tmp-compendium.po
>       $ make po/xx/appendix.po COMPENDIUM=tmp-compendium.po
>     and, once more, compare new and old appendix.po.
> (Remember to always use the original (saved) appendix.po, if you try
> both methods.)

Why should it be different? It launch a different command?

> If this works, you can do it with a simple for-loop for all languages.

It worked very well, thank you Ulf, as usual. 

Done this:


LLIST="da de el es fi fr hr it ja ko lt nl nn pl ru sl sv zh_CN"

for PONAT in `echo $LLIST`
  if [ "$MDEBUG" == "y" ]; then
    echo  msgmerge --width=79 \
                   --compendium=po/${PONAT}/${POSRCS}.po \
                   --output-file=po/${PONAT}/${PODEST}.po \
                   po/${PONAT}/${PODEST}.po pot/${PODEST}.pot
    msgmerge --width=79 \
             --compendium=po/${PONAT}/${POSRCS}.po \
             --output-file=po/${PONAT}/${PODEST}.po \
             po/${PONAT}/${PODEST}.po pot/${PODEST}.pot

I've already pushed it (hope it was all right).
The new whats-new page is a work in progress and it is not complete.
Feel free to add, correct, comment, and forgive my many errors, please.

PS: May I ask you a favour Ulf? Can you tell me why the command syntax is that?
Why you have to specify appendix.po(t) three times? 

Looking at the command manual page I would never say that I would have
to put it like this.

>From the man page...

man msgmrg

MSGMERGE(1)                           GNU                          MSGMERGE(1)

       msgmerge - merge message catalog and template

       msgmerge [OPTION] def.po ref.pot

it seems just a 2 argument command...



Marco Ciampa

| Linux User  #78271 |
| FSFE fellow   #364 |
gimp-docs-list mailing list

Reply via email to