On Wed, Nov 12, 2008 at 01:22:24PM +0100, intrigeri(a)boum.org wrote:
Hello,
Well, Joey came up with a patch (see below) that adds a nowrapi18n
option to Locale::Po4a::Common, but I now realize it's not enough, as
almost every po4a module runs its own 'use Locale::Po4a::Common;'.
I guess the "obvious" solution (i.e. adding support in every module
for the nowrapi18n option Joey implemented) is not desirable.
It also has the advantage of being simple.
How do you want to use this feature:
From ikiwiki, you load the Text module with this option, and the
option
is forwarded to Common.
From the command line tools, Chooser is loaded, and no option is
specified, no changes are needed.
This means that from all module, we need to change:
use Locale::Po4a::Common;
to:
use Locale::Po4a::Common $_;
(It might be obvious that I did not test this at all ;)
If the idea is something like that, it seems good, and could be re-used
for other features.
Any other idea?
Common is currently very command-line oriented.
It might be possible to create another Common.pm
It might also be possible to check if po4a is running on a terminal or
not. (I think it won't be when run by ikiwiki)
Cheers,
--
Nekral