Hello, First of all, that's a really good idea. On Sat, Aug 22, 2009 at 08:08:34AM +0200, bubulle@debian.org wrote: > Quoting KURASAWA Nozomu (nabetaro@debian.or.jp): > > Package: apt > > Severity: normal > > Tags: patch > > > > I tried to translate Japanese manpages by Po4a (0.36 or later). > > So, I will send you created files for po4a(1). > > > > Is it useful? > > > Certainly useful. However, I might need help to integrate this in > apt's build system. Nicolas? The tar ball from Nozomu can be extracted into the doc/ directory. I made a few changes in the po4a.conf file: * Use po_directory, this will be easier later to simply drop new PO files, without having to "activate" a translation. * Only specify options for the entity alias (-k 0 is needed to make sure the entity files will always be generated). Other options were default options (at least with current po4a), so not really useful. I made some changes in the build system to: * generate the translations before the language directories are asked to build their doc * a PHONY target to force updating the PO files * a clean target to update the PO files and remove the generated translated files Depending on the APT release processes, the update of PO files could be move to another target (dist / distclean / or just removed) * Use a variable list of manpages to be distributed (instead of debian/apt.manpages and debian/apt-utils.manpages). This fix a current issue in apt (i.e. it is not coming specifically from this patch), whichis that not all translated manpages are distributed. With po4a, the list of translated manpages will most probably change over the time, and this should be more flexible. There are some files in the current ja directory which Cdo not seems to be used. I removed them: * manpage.links, manpage.refs Do not seem to be used. I removed the current ja translation (.xml and grof files) I made some changes to fix (English) typos in the build system. Translation team can switch to the PO based translation by dropping a PO file in doc/po. Note that the transition must be complete for a language (all documents are translated manually or all are translated with PO) The existing translations could be reused. Translation teams can contact me to check how to do this. The attached patch builds correctly. (I only tried to build the packages (i.e. I did not tried other target, like dist, which I do not know if they are used). The second patch is an attempt to fix build warnings. It also fixes the generation of manual (e.g. there is no more "FIXME: manual" on the top of manpages) Best Regards, -- Nekral
Attachment:
apt_po4a_manpages.patch.bz2
Description: Binary data
diff -rau ../work/apt-0.7.22.2/doc/apt-cache.8.xml ./apt-0.7.22.2/doc/apt-cache.8.xml --- ../work/apt-0.7.22.2/doc/apt-cache.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-cache.8.xml 2009-08-22 17:28:04.785257614 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-cache</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-cdrom.8.xml ./apt-0.7.22.2/doc/apt-cdrom.8.xml --- ../work/apt-0.7.22.2/doc/apt-cdrom.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-cdrom.8.xml 2009-08-22 17:33:27.747424556 +0200 @@ -20,6 +20,7 @@ <refmeta> <refentrytitle>apt-cdrom</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt.conf.5.xml ./apt-0.7.22.2/doc/apt.conf.5.xml --- ../work/apt-0.7.22.2/doc/apt.conf.5.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt.conf.5.xml 2009-08-22 17:33:40.851424641 +0200 @@ -27,6 +27,7 @@ <refmeta> <refentrytitle>apt.conf</refentrytitle> <manvolnum>5</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-config.8.xml ./apt-0.7.22.2/doc/apt-config.8.xml --- ../work/apt-0.7.22.2/doc/apt-config.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-config.8.xml 2009-08-22 17:33:49.330868494 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-config</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt.ent ./apt-0.7.22.2/doc/apt.ent --- ../work/apt-0.7.22.2/doc/apt.ent 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt.ent 2009-08-22 17:32:29.378647029 +0200 @@ -158,7 +158,10 @@ <!ENTITY apt-docinfo " <refentryinfo> <address><email>apt@packages.debian.org</email></address> - <author><firstname>Jason</firstname> <surname>Gunthorpe</surname></author> + <author> + <firstname>Jason</firstname> <surname>Gunthorpe</surname> + <contrib></contrib> + </author> <copyright><year>1998-2001</year> <holder>Jason Gunthorpe</holder></copyright> <date>28 October 2008</date> <productname>Linux</productname> @@ -176,6 +179,7 @@ <author> <firstname>Jason</firstname> <surname>Gunthorpe</surname> + <contrib></contrib> </author> "> @@ -183,12 +187,14 @@ <author> <firstname>Mike</firstname> <surname>O'Connor</surname> + <contrib></contrib> </author> "> <!ENTITY apt-author.team " <author> <othername>APT team</othername> + <contrib></contrib> </author> "> @@ -196,25 +202,6 @@ <productname>Linux</productname> "> -<!ENTITY apt-email " - <address> - <email>apt@packages.debian.org</email> - </address> -"> - -<!ENTITY apt-author.jgunthorpe " - <author> - <firstname>Jason</firstname> - <surname>Gunthorpe</surname> - </author> -"> - -<!ENTITY apt-author.team " - <author> - <othername>APT team</othername> - </author> -"> - <!ENTITY apt-copyright " <copyright> <holder>Jason Gunthorpe</holder> diff -rau ../work/apt-0.7.22.2/doc/apt-extracttemplates.1.xml ./apt-0.7.22.2/doc/apt-extracttemplates.1.xml --- ../work/apt-0.7.22.2/doc/apt-extracttemplates.1.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-extracttemplates.1.xml 2009-08-22 17:33:54.083424773 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-extracttemplates</refentrytitle> <manvolnum>1</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-ftparchive.1.xml ./apt-0.7.22.2/doc/apt-ftparchive.1.xml --- ../work/apt-0.7.22.2/doc/apt-ftparchive.1.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-ftparchive.1.xml 2009-08-22 17:33:58.227424549 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-ftparchive</refentrytitle> <manvolnum>1</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-get.8.xml ./apt-0.7.22.2/doc/apt-get.8.xml --- ../work/apt-0.7.22.2/doc/apt-get.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-get.8.xml 2009-08-22 17:34:01.107424629 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-get</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-key.8.xml ./apt-0.7.22.2/doc/apt-key.8.xml --- ../work/apt-0.7.22.2/doc/apt-key.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-key.8.xml 2009-08-22 17:34:07.203424732 +0200 @@ -13,6 +13,7 @@ <refmeta> <refentrytitle>apt-key</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-mark.8.xml ./apt-0.7.22.2/doc/apt-mark.8.xml --- ../work/apt-0.7.22.2/doc/apt-mark.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-mark.8.xml 2009-08-22 17:34:25.539424373 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-mark</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt_preferences.5.xml ./apt-0.7.22.2/doc/apt_preferences.5.xml --- ../work/apt-0.7.22.2/doc/apt_preferences.5.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt_preferences.5.xml 2009-08-22 17:34:30.467940121 +0200 @@ -20,6 +20,7 @@ <refmeta> <refentrytitle>apt_preferences</refentrytitle> <manvolnum>5</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/apt-secure.8.xml ./apt-0.7.22.2/doc/apt-secure.8.xml --- ../work/apt-0.7.22.2/doc/apt-secure.8.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-secure.8.xml 2009-08-22 17:34:35.235424455 +0200 @@ -13,6 +13,7 @@ <refmeta> <refentrytitle>apt-secure</refentrytitle> <manvolnum>8</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- NOTE: This manpage has been written based on the diff -rau ../work/apt-0.7.22.2/doc/apt-sortpkgs.1.xml ./apt-0.7.22.2/doc/apt-sortpkgs.1.xml --- ../work/apt-0.7.22.2/doc/apt-sortpkgs.1.xml 2009-08-06 15:36:58.000000000 +0200 +++ ./apt-0.7.22.2/doc/apt-sortpkgs.1.xml 2009-08-22 17:34:52.131424177 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>apt-sortpkgs</refentrytitle> <manvolnum>1</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title --> diff -rau ../work/apt-0.7.22.2/doc/sources.list.5.xml ./apt-0.7.22.2/doc/sources.list.5.xml --- ../work/apt-0.7.22.2/doc/sources.list.5.xml 2009-08-06 15:36:59.000000000 +0200 +++ ./apt-0.7.22.2/doc/sources.list.5.xml 2009-08-22 17:34:55.587424261 +0200 @@ -21,6 +21,7 @@ <refmeta> <refentrytitle>sources.list</refentrytitle> <manvolnum>5</manvolnum> + <refmiscinfo class="manual">APT</refmiscinfo> </refmeta> <!-- Man page title -->