r1 - 01 Feb 2006 - 12:01:25 GMT - TWikiContributorYou are here: Bernstein > TWiki Web > TWikiI18NExtractDotPm

Package TWiki::I18N::Extract

Support translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon).

ClassMethod new ($session) -> $extract

Constructor. Creates a fresh new Extract object. A $session object, instance of the TWiki class, is optional: if it's available, it'll be used for printing warnings.

ObjectMethod extract ($msgid) -> $formated

This method overrides the one with same name in Locale::Maketext::Extract, as a workaround for a bug in the Locale::Maketext::Lexicon Perl package, and was not fixed up to the 0.53 release.

What it does is to call an alternative version of the _format function, which avoids double-escaping the extracted strings.

This method was tested only under the circumstances of TWiki's needs, i.e., extracting strings from source and topics and generating a brand new POT file. Merging with previous PO files is done with GNU gettext tools, so maybe if it's used for merging it can

Once that bug is fixed, in future TWiki versions this method may be removed.

!!!extract!!!

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
The Bernstein Website
Copyright © by the contributing authors.
Bernstein - The Memory of Paper http://www.bernstein.oeaw.ac.at
Ideas, requests, problems regarding Bernstein? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiI18NExtractDotPm
This site is powered by the TWiki collaboration platform