On Fri, May 22, 2015 at 05:14:20PM -0400, David Prévot wrote:

> I hope the “convert a pre-existing translation to po4a” HOWTO from
> po4a(7) will ease the PO files changes needed to cope with the new way
> to handle man pages table (I intend to give it a try soon for procps and
> findutils, unless this change is to be reverted of course). I’ll report
> back if there is an “easy way to upgrade” worth documenting with the
> “beware, disruptive change!” currently missing.

“easy” may be overrated, but let me just dump here my initial notes.
Both procps and findutils only had two affected pages (containing tbl).
po4a-gettextize must be used directly (i.e., not via a po4a call using
the existing config file) in order to produce a pre-filled PO file. As
such, the “convert a pre-existing translation to po4a” must be done for
every affected page.

## findutils

The initial PO file is completely translated

[With po4a 0.45]
- Run “po4a $config_file” to build the completely translated man pages
- Drop the addenda and eventually fix formating changes in translation

[With po4a 0.46]
- Use po4a-gettext for each page containing a table, e.g.,
  po4a-gettextize -L UTF-8 -f man -m C/man1/find.1 -l fr/man1/find.1 -p 
po4a/po/find.po
- Use msgattrib to set all messages non-'fuzzy', e.g.,
  msgattrib --clear-fuzzy -o po4a/po/find.po po4a/po/find.po
- Use the --compendium= switch of msgmerge to salvage the existing
  translations:
  po4a --msgmerge-opt '--compendium=po4a/po/find.po 
--compendium=po4a/po/locate.findutils.po' po4a/findutils.cfg
- Restore formating changes if relevant

## e2fsprogs

The initial PO file is completely translated

$ sudo aptitude install po4a/jessie
$ vi po4a/procps.cfg # drop addenda for ps.1 and slabtop.1
$ po4a po4a/procps.cfg

$ sudo aptitude install po4a/sid
$ vi C/man1/ps.1 C/man1/slabtop.1 # Handle duplicated strings
$ po4a-gettextize -L UTF-8 -f man -m C/man1/ps.1 -l fr/man1/ps.1 -p 
po4a/po/ps.po
$ msgattrib --clear-fuzzy -o po4a/po/ps.po po4a/po/ps.po
$ po4a-gettextize -L UTF-8 -f man -m C/man1/slabtop.1 -l fr/man1/slabtop.1 -p 
po4a/po/slabtop.po
$ msgattrib --clear-fuzzy -o po4a/po/slabtop.po po4a/po/slabtop.po
$ git checkout C/man1/ps.1 C/man1/slabtop.1 # Restore manpages
$ po4a --msgmerge-opt '--compendium=po4a/po/ps.po 
--compendium=po4a/po/slabtop.po' po4a/procps.cfg


I still need to diff the translated manpages (built with po4a 0.45 and
with po4a 0.46) in order to validate that I didn’t messed up too much
with the updated PO files.

Even if I already started to move forward with the new way to handle
tbl, please note that I won’t complain if this change actually gets
reverted (e.g., if people strongly oppose to such a disruptive change).

Regards

David

Attachment: signature.asc
Description: Digital signature

Reply via email to