Hi Tobias,

Le 01/06/2011 15:37, Tobias Quathamer a écrit :
> Am Mittwoch, den 01.06.2011, 15:01 -0400 schrieb David Prévot:

>> Please find attached the initial French documentation translation,
>> proofread by the debian-l10n-french mailing list contributors.
> 
> Great, thanks a lot for your work! I've applied the patch and unfuzzied
> the msgstrs after the update to the new RST source file (bug #627577).
> You might want to double check, though, my French is quite rusty ...

Sorry, I just noticed on the anonscm web interface that you already
committed the previous patches, I just cant see them on my local Git
repository, even after a fresh

        git clone git+ssh://git.debian.org/git/users/toddy/isoquery.git

Something must be wrong in my config somewhere :/. Will check once
resolve this issue.

>> […] I can offer a much simple po4a config file and
>> appropriate rule that won't need update when a new language is added.
>> I don't know Python enough to propose as much simple rules to handle
>> their rst2man generation or installation, but it would be a start.
> 
> I'd be very interested in that config file.

Here is a (draft) patch against the isoquery-1.4 version (will update it
once resolved my hopefully local issue if you wish, but it should almost
be a matter of removing some more lines).

I'm not really satisfied with the patch against wscript : it still needs
to to be updated in order to provide a new target (language), and the
po4a.cfg file only works at build time (I had to tricked it in order to
work during the build process).

With a simpler po4a.cfg file as :

-------------%<-------------

[po_directory] man/

[po4a_alias: text] text opt:"-o markdown"

[type: text] man/isoquery.rst \
        $lang:man/$lang/isoquery.rst \
        add_$lang:?man/$lang.add

------------>%--------------

you would just run “po4a man/po4a.cfg” in order to update the POT and PO
files, and to build the resulting man/**/isoquery.rst translation, with
the one provided in the attached patch, it builds the translation in
build/man/**/isoquery.rst as expected. I hope you would find a proper
way to handle many translations in wscript, and I would provide more
po4a input if you need.

I dropped the UTF-8 forcing since it should be the default, it's easy to
add if something gets broken.

Regards

David

From f00be490cd346a4c373dd218e769ea889f2a4f8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Pr=C3=A9vot?= <[email protected]>
Date: Wed, 1 Jun 2011 17:23:43 -0400
Subject: [PATCH] Handle po4a stuff in its own cfg file

---
 man/po4a.cfg |    7 +++++++
 wscript      |   27 ++++-----------------------
 2 files changed, 11 insertions(+), 23 deletions(-)
 create mode 100644 man/po4a.cfg

diff --git a/man/po4a.cfg b/man/po4a.cfg
new file mode 100644
index 0000000..26267f8
--- /dev/null
+++ b/man/po4a.cfg
@@ -0,0 +1,7 @@
+[po_directory] ../man/
+
+[po4a_alias: text] text opt:"-o markdown"
+
+[type: text] ../man/isoquery.rst \
+	$lang:man/$lang/isoquery.rst \
+	add_$lang:?../man/$lang.add
diff --git a/wscript b/wscript
index d64a12e..48e2d8a 100644
--- a/wscript
+++ b/wscript
@@ -30,7 +30,7 @@ def configure(conf):
     conf.find_program('msgfmt', var='MSGFMT')
     conf.find_program(['rst2man','rst2man.py'], var='RST2MAN')
     conf.find_program('gzip', var='GZIP')
-    conf.find_program('po4a-translate', var='PO4A_TRANSLATE')
+    conf.find_program('po4a', var='PO4A')
     conf.check_tool('python')
     conf.check_python_version((2,4))
     conf.check_tool('gnu_dirs')
@@ -54,28 +54,9 @@ def build(bld):
         rule = '${RST2MAN} ${SRC} ${TGT}',
     )
     bld(
-        source = 'man/de.add man/de.po man/isoquery.rst',
-        target = 'man/de/isoquery.rst',
-        rule = '${PO4A_TRANSLATE} ' + \
-               '--format text ' + \
-               '--option markdown ' + \
-               '--addendum ${SRC[0].bldpath()} ' + \
-               '--po ${SRC[1].bldpath()} ' + \
-               '--master ${SRC[2].bldpath()} ' + \
-               '--master-charset UTF-8 ' + \
-               '--localized ${TGT}',
-    )
-    bld(
-        source = 'man/pt.add man/pt.po man/isoquery.rst',
-        target = 'man/pt/isoquery.rst',
-        rule = '${PO4A_TRANSLATE} ' + \
-               '--format text ' + \
-               '--option markdown ' + \
-               '--addendum ${SRC[0].bldpath()} ' + \
-               '--po ${SRC[1].bldpath()} ' + \
-               '--master ${SRC[2].bldpath()} ' + \
-               '--master-charset UTF-8 ' + \
-               '--localized ${TGT}',
+        source = 'man/po4a.cfg',
+        target = 'man/de/isoquery.rst man/pt/isoquery.rst',
+        rule = '${PO4A} ${SRC}',
     )
     bld(
         source = 'man/de/isoquery.rst',
-- 
1.7.5.3

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to