Keep It Simple, Stupid | |
PerlMonks |
RFC for users of Locale::Maketext::Lexiconby clinton (Priest) |
on Nov 23, 2008 at 11:47 UTC ( [id://725413]=perlmeditation: print w/replies, xml ) | Need Help?? |
Hi all
I'm a co-maintainer of Locale::Maketext::Lexicon and I'd like to make a change to the format of the .po file created by Locale::Maketext::Extract / xgettext.pl. Currently it writes out each entry in the .po file as:
However, when I edit the file with POEdit, it rewrites the file as:
... which causes a large unneccessary diff. Looking at the gettext manual, having the vars comment before the file location seems to be consistent, but having the file references on new lines is controlled by the option --no-wrap. However, Locale::Maketext::Extract already wraps the msgids, so the behaviour is currently inconsistent. What I'd like to know is: can I just make this change, or would it affect you with whatever client you use for editing the .po files? Should I be providing output format options instead? thanks Clint Update: Turns out I hadn't read the gettext manual well enough. The msgid's are only split onto separate lines if they contain embedded newlines, so L::M::Extract is correct in this regard. However, the default for gettext is to have the arguments comment before the file positions, and to put each file position onto a separate line. In the interests of maintaining backward compatibility, I've added the option --wrap which will split the file positions onto separate lines. This has been released as v 0.75 of Locale::Maketext::Extract (CPAN currently syncing)
Back to
Meditations
|
|