[Po4a-devel] [RFC] Enhancements about proposal

Denis Barbier bouzim at gmail.com
Tue Jan 19 20:06:59 UTC 2010


Hi there,

I am working on a project with po4a, its configuration file contains
many entries and I would like to help building derivatives.  One
problem is that addenda may be modified, added or removed by
derivatives.  I do not know yet what others will be doing with
addenda, but my feeling is that current handling of addenda is too
rigid.  Current syntax is:
  add_<lang>:<path>
I propose to allow prepending modifiers to path:
  add_<lang>:[?!@]*<path>
where '?' marks <path> as being optional, '!' discards any further
inclusion of <path>, and '@' means that <path> contains a list of
addenda, one file per line (those paths may also be prefixed by
modifiers).
A patch against current CVS is attached (without documentation nor
tests for now).

Example:
In configuration file:
        ...
        add_$lang:?@po4a/add_$lang/lists/local-pre.list \
        add_$lang:?po4a/add_$lang/addendum \
        add_$lang:?@po4a/add_$lang/lists/local-post.list
All addenda are optional, first and third addenda contain lists of
paths instead of addenda.
If po4a/add_fr/lists/local-pre.list contain the 2 lines
  !po4a/add_fr/addendum
  po4a/add_fr/my-addendum
and local-post.list does not exist, the only addendum for the French
translation will be 'po4a/add_fr/my-addendum'.

Note that $lang is expanded before addenda are processed, so lists
must not contain any variable.
What do you think about that?

Denis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a-addenda.patch
Type: application/octet-stream
Size: 1905 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20100119/1300cd73/attachment.obj>


More information about the Po4a-devel mailing list