[Po4a-devel] Introduction, and a polite request for help

Denis Barbier bouzim at gmail.com
Wed Sep 22 16:34:29 UTC 2010


On 2010/9/22 daniel cabrera wrote:
> On Wed, 2010-09-22 at 07:29 +0200, Denis Barbier wrote:
>>
>> I usually prefer discussions on a public mailing list, but as you
>> know, I will reply if for some reason you prefer private discussions
>> ;)
>> If your issues are related in any way to po4a, here is the right
>> place.  Otherwise you can ask on
>>   http://lists.alioth.debian.org/mailman/listinfo/perkamon-devel
>>
>> Denis
>
> Ok, here is my question:
> Our plan is to update our 1.55 *.es.po files, with the 3.26
> *.pot files. In order to do that, I need those 3.26 *.pot files.

Right.

> Accidentally, I 've found that my first (wrong) command to create a
> *.es.po file:
>
> $ po4a-gettextize -f man -m accept.2 -M UTF-8 -p accept.2-es-ES.po
>
> works like a charm if a want to create the .pot file:
>
> $ po4a-gettextize -f man -m accept.2 -M UTF-8 -p accept.2.pot
>
> Is this OK? I mean, if I can't find the *.pot files, may I use this
> command without worrying about braeking anything in the future? I looked
> at it, and looked at the updated *.es.po file that I've create with it,
> and they seems fine.

You can do that, and then run msgmerge.  We provide a dedicated tool,
po4a-updatepo, to scan a new master document and update existing PO
file:
  $ po4a-updatepo -f man -m man-pages-3.26/man2/accept.2 -p
accept.2-es-ES.po --previous
Unfortunately the --previous argument has been broken since po4a 0.38,
I guess that this is what Russian folks have written in
  https://man-pages-ru.svn.sourceforge.net/svnroot/man-pages-ru/Jamfile
Anyway one can safely replace the --previous flag by
--msgmerge-opt=--previous, it will work with any version of po4a.
We did not notice this bug earlier because we now use exclusively the
po4a command-line tool, it is much more convenient than po4a-updatepo
+ po4a-translate.  I will give more details when replying to your
other post on perkamon-devel.

IIRC many manual pages have been moved between 1.55 and 3.26, so it
may be convenient to create a compendium file and run msgmerge -C:
  $ msgcat *.po > compendium.es
  $ po4a-updatepo -f man -m man-pages-3.26/man2/accept.2 \
      -p accept.2-es-ES.po --msgmerge-opt='--previous -C compendium.es'
But you will first have to edit compendium.es and check msgstr which
have different translations:
  msgstr ""
  "#-#-#-#-#  file1.po #-#-#-#-#\n"
  "A translation\n"
  "#-#-#-#-#  file2.po #-#-#-#-#\n"
  "Another translation"
You choose the one you want to keep and remove trailing \n.
Please note that you will have to do that only once; if you join
perkamon, I will take care of those updates myself.

Denis



More information about the Po4a-devel mailing list