On Mon, 2010-09-20 at 22:45 +0200, Denis Barbier wrote:
Hi Daniel,
(I do not know whether you subscribed, thus Cc: you)
In order to produce meaningful PO files, you have to run
po4a-gettextize with an English file and its translation. I
downloaded man-pages-es 1.55 from
http://www.ditec.um.es/~piernas/manpages-es/.
I did not find man-pages 1.55 (do you have a copy?), but found 1.56 here:
http://rpmfind.net//linux/RPM/PLD/dists/ra/updates/general/SRPMS/man-page...
After extracting those tarballs, my directory contains:
man-pages-1.56 man-pages-es-1.55
Then
$ po4a-gettextize -f man -m man-pages-1.56/man2/accept.2 \
-l man-pages-es-1.55/man2/accept.2 -L UTF-8 -p accept.2-es-ES.po
works just fine. Some English manual pages contain accented letters,
you will then have to specify its encoding with the -M flag.
One more point: some manual pages have been removed (for instance most
pages under section 1), do not lose time converting them to PO files.
(But beware that some pages have been moved into another section)
> My second problem is to be able to convert more than a file at once, but
> that can wait :-)
Here we go: WARNING: These commands remove files after converting them
to PO files!!!
Make sure to use a VCS or work on a copy.
$ for f in man-pages-es-1.55/man*/*.?; do
echo Processing $f;
po4a-gettextize -f man \
-m man-pages-1.56${f#man-pages-es-1.55} \
-l $f -L UTF-8 -p $f.po 2>/dev/null && rm -f $f;
done
$ git ls-files --deleted | wc -l
1114
$ git ls-files man-pages-es-1.55/man? | wc -l
1303
Thus po4a-gettextize did successfully convert 1114 files from 1303.
You will have to manually check failing pages; this is pretty boring,
but you have to do that task only once.
Denis
Denis, thank you very much for your explanation. It took me on the right
track and now it's just a matter of time before we can update all those
man pages.
Best regards, Daniel.