Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
laziness, impatience, and hubris
 
PerlMonks  

Re: RFC for users of Locale::Maketext::Lexicon

by bart (Canon)
on Nov 26, 2008 at 18:15 UTC ( #726179=note: print w/ replies, xml ) Need Help??


in reply to RFC for users of Locale::Maketext::Lexicon

I'm trying out Locale::Maketext::Lexicon 0.75 right now, and apparently it has a much worse behaviour than you describe here, regarding var comments: read_po() simply drops them! So if you read in a .po file with read_po() and immediately save it again with write_po(), they're gone! Which is not very nice...

BTW why is there nothing in the whole suite foreseen to manually add single lexicon entry? To fill in the translation for a phrase by a Perl script? As it is now, it makes a lot more sense to manually construct the output to write a .po file, than to try to use this module, which kind of defeats its purpose, IMHO... The only thing it's useful for, impressive though it may be, is to parse file and generate stub files, with just the original text without translations. So you can only use it for the big stuff, but not for the little things.


Comment on Re: RFC for users of Locale::Maketext::Lexicon
Re^2: RFC for users of Locale::Maketext::Lexicon
by clinton (Priest) on Nov 28, 2008 at 18:03 UTC

    Strings get added and removed from your project. xgettext.pl needs to see all of the strings across the whole project to make a complete list of unique strings, the vars passed in, and where the strings are used.

    The purpose of the Locale::Maketext::Extract* modules within this distribution is to:

    • read in an existing .po file (if one exists)
    • parse all of the source code in whatever formats are supported and extract the original string, any arguments that are passed in, and the location of the string
    • write out a new .po file, merging in the new data, and removing strings that have not been translated and are no longer used.

    It retains any user generated comments and translations, but everything else is under the control of xgettext.pl, as per GNU's gettext utilities.

    It is not intended as a general PO-file manipulator.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-04-19 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls