[Po4a-commits] "po4a po4a,1.30,1.31"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Fri Sep 2 22:07:55 UTC 2005


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv7675

Modified Files:
	po4a 
Log Message:
Finally, document how to specify options in the po4a config file.
I think the code is ugly, but it seems to work.


Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- po4a	29 Jun 2005 17:14:48 -0000	1.30
+++ po4a	2 Sep 2005 22:07:52 -0000	1.31
@@ -92,7 +92,8 @@
 You now naturally have to specify which documents are translated, their 
 format, and where to put the translations. It can be made by such lines:
 
- [type: sgml] doc/my_stuff.sgml fr:doc/fr/mon_truc.sgml de:doc/de/mein_cram.sgml
+ [type: sgml] doc/my_stuff.sgml fr:doc/fr/mon_truc.sgml \
+              de:doc/de/mein_cram.sgml
  [type: pod] script fr:doc/fr/script.1 de:doc/de/script.1 \
              add_fr:doc/l10n/script.fr.add
 
@@ -107,12 +108,53 @@
 If you've defined the template languages, you can rewrite the line above this
 way:
 
- [type: pod] script $lang:doc/$lang/script.1 add_fr:doc/l10n/script.fr.add
+ [type: pod] script $lang:doc/$lang/script.1 \
+             add_fr:doc/l10n/script.fr.add
 
 If all the languages had addenda with similar paths, you could also write
 something like:
 
- [type: pod] script $lang:doc/$lang/script.1 add_$lang:doc/l10n/script.$lang.add
+ [type: pod] script $lang:doc/$lang/script.1 \
+             add_$lang:doc/l10n/script.$lang.add
+
+=head2 Specifying options for the modules
+
+po4a accepts options that will be passed to the module. These options are
+module specific and are specified with the -o switch.
+
+If you need a specific option for one of the document you want to
+translate, you can also specify it in the configuration file. Options are
+introduced the I<opt> keyword. The argument of the I<opt> keyword must be
+quoted with double quotes if it contains a space (e.g. if you specify
+multiple options, or an option with an argument).
+You can also specify options that will only apply to a specific language
+by using the opt_I<lang> keyword.
+
+There are some known limitations: you can't specify an argument with a
+space or a double quote to a module option.
+
+Here is an example:
+ [type:man] data-05/test2_man.1 $lang:tmp/test2_man.$lang.1 \
+            opt:"-k 75" opt_it:"-L UTF-8" opt_fr:-v
+
+
+=head2 Specifying aliases
+
+If you must specify the same options for multiple files, you may be
+interested in defining a module alias. This can be done this way:
+
+[po4a_alias:test] man opt:"-k 21" opt_es:"-o debug=splitargs"
+
+This define a module alias named I<test>, based on the I<man> alias, with
+the I<-k 21> apply to all the languages and with I<-o debug=splitargs>
+applied to the Spanish translation.
+
+This module alias can then be use like a regular module:
+
+[type:test] data-05/test2_man.1 $lang:tmp/test2_man.$lang.1 \
+            opt_it:"-L UTF-8" opt_fr:-v
+
+Note that you can specify additional options on a per file basis.
 
 =head1 OPTIONS
 




More information about the Po4a-commits mailing list