po4a's --split option
by Nicolas François
Hello,
po4a currently has a --split option, but the support for this option is
not complete (the option is not documented, so this is not a problem).
It currently uses Po.pm:filter to select the strings used in one document,
but, for all the documents, it writes the POT in the same file.
The main issue of --split is that the user doesn't specify where the POT
and POs should be written.
I propose to use a $master variable in po4a_paths for that. For example:
[po4a_paths] po4a/po/$master/$master.pot $lang:po4a/po/$master/$lang.po
(Then the --split option is not needed, it can be autodetected)
The second issue with --split is that all the POs for a language should be
merged (i.e. if a string is translated in a PO, the translation should be
shared by the other POs of the same language).
I propose to use msgcat for that.
Then, if 2 POs have different translations, msgcat will mark this string
fuzzy, and will propose both translations in the POs:
# type: type
#: ref1 ref2
#, fuzzy, no-wrap
msgid "my string"
msgstr ""
"#-#-#-#-# ref1 #-#-#-#-#\n"
"first translation\n"
"#-#-#-#-# ref2 #-#-#-#-#\n"
"second translation"
Later, if this string is unfuzzied in one of these POs, po4a will remove the
fuzzy mark on this string from all the POs.
The attached patch should perform what is described above. It does not use
Po.pm:filter, but msggrep.
I will commit it this week unless you think there is something wrong in
the above description.
Kind Regards,
--
Nekral
18 years, 10 months
po4a README.maintainers
by Nicolas François
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
18 years, 10 months