[Po4a-devel] po4a README.maintainers

Nicolas François nicolas.francois at centraliens.net
Sat Feb 11 21:27:26 UTC 2006


Hello,

Marc Haber already asked for a small document that could give best
practice for maintainers.

Today, Denis and Thomas also pointed that we should define a common
hierarchy to help the l10n robot to detect POs used for translation.
This robot is used by some translation teams (at least the French one) to
inform the translators that the PO needs to be updated.
Detecting po4a's PO will permit to check that the POT are up-to-date and
the POs also.
(Denis and Thomas, correct me if I'm wrong)


Can you check if the attached file is clear enough? (is it too verbose?)
Do you agree of the proposed file hierarchy?
Does it represent your opinion?


BTW, there are currently 17 packages which build-depend on po4a:
adduser, apt-build, apt-proxy, apt-show-versions, base-passwd,
belocs-locales-bin, debarchiver, debhelper, deborphan, debsums,
devscripts, fakeroot, glibc, mailliststat, pppconfig, smb2www, squashfs

dpkg (soon in experimental)

apt, aptitude and debianutils may also switch

Kind Regards,
-- 
Nekral
-------------- next part --------------
This document provides some general rules to deploy a translation process
that will ease the work of maintainers (upstream and distribution
maintainers) and translators (or translation teams).


Translators usually retrieve a POT (for a new translation) or the current
PO for their language, then they translate the untranslated strings and
update the translation of the string marked fuzzy.


Translators need to know if a PO has to be updated:
 * they can verify the POs in the version control system or in the
   distributed archives/packages
 * they can be inform by the translation teams, which automatically
   check the status of the POs in various packages.
We want to avoid the translator to be notified by an user reporting that
some strings are not translated even if the PO contain no untranslated or
fuzzy string.


Thus it is important to ensure that the POT are up-to-date with the
original documentation and that the POs contains the same strings as the
POT.

 1. Upstream maintainers should update the POT according to the orginal
    documents and update the POs according to these uptodate POT when they
    distribute an archive.

 2. If the switch to po4a is done in a distribution, the source package
    should also contain up to date translation materials.

 3. If the documentation is patched by the distribution, the maintainer
    must not forget to update the POT and POs.

It is important to ensure that the translation materials are updated
automatically.


A standardized architecture of the source tree will help the translation
teams when they try to detect the POS that need to be updated.

Thus we recommend the following architecture:

  root
   |
   |-- doc, man, ...
   |    |
   |    |-- en
   |    |    |
   |    |    \-- original documents
   |    |
   |    |-- po4a
   |    |    |
   |    |    |-- po
   |    |    |    |
   |    |    |    |-- <package>.pot
   |    |    |    |-- <lang1>.po
   |    |    |    \-- ...
   |    |    |
   |    |    |-- add_<lang>
   |    |    |    |
   |    |    |    |-- <translator1>.add
   |    |    |    \-- ...
   |    |    |
   |    |    \-- <package>.cfg
   |    |
   |    |-- <lang1>
   |    |     |
   |    |     \-- generated translations
   |    |
   |    \-- ...

We recommend to use a configuration file with po4a that does not require
any option (put the options in the configuration file).
This permits to easily check that the POT is up-to-date with the
documentation and that the 


It is important to avoid a build failure in the case a generated
translation cannot be generated (the PO is too outdated, an addendum
cannot be applied, ...), thus you should use wildcards or test if the file
was generated in the 'install' or 'dist' rules


Examples
========

Using po4a upstream
-------------------
When po4a is used upstream, we recommend to run po4a in the 'dist' rule.
This will update the POT and POs, and will generate the translated documents.
These translated documents can be distributed in the source archive if the
maintainer don't want to add a build dependency on po4a.
It is important to distribute the POT and POs in the source archive.

A typical dist rule could then be:

dist:
	po4a --rm-backups <package>.cfg
	...

If automake is used, The following could also be used.

dist-hook:
	po4a --rm-backups <package>.cfg
	...


Using po4a in a distribution
----------------------------
(Debian packaging is taken as an example, you will have to adapt this to
your distribution)
In a Debian package, to ensure that the source package is released with
all the POT and POs are up-to-date, you should run po4a in the 'clean' rule
of debain/rules. The translated documents can be generated in the 'build'
(or 'build-indep') rule:

clean:
	# Updtate the POT and POs
	cd <...>/po4a && po4a --no-translations --rm-backups <package>.cfg

build:
	# Generate the translations
	cd <...>/po4a && po4a --rm-backups <package>.cfg




More information about the Po4a-devel mailing list