Log::Report::Lexicon::PO

Log::Report::Lexicon::PO is a Perl module with one translation definition.
Download

Log::Report::Lexicon::PO Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mark Overmeer
  • Publisher web site:
  • http://search.cpan.org/~markov/

Log::Report::Lexicon::PO Tags


Log::Report::Lexicon::PO Description

Log::Report::Lexicon::PO is a Perl module with one translation definition. Log::Report::Lexicon::PO is a Perl module with one translation definition.METHODSConstructorsLog::Report::Lexicon::PO->new(OPTIONS) Option --Default automatic "" comment [] format [] fuzzy false msgid msgid_plural undef msgstr "" or [] references []. automatic => PARAGRAPHAutomaticly added comments. See addAutomatic().. comment => PARAGRAPHTranslator added comments. See addComment().. format => ARRAY-OF-PAIRS|HASHSee format().. fuzzy => BOOLEANThe string is not yet translated, some smart guesses may have been made. See fuzzy().. msgid => STRING. msgid_plural => STRING. msgstr => STRING|ARRAY-OF-STRINGThe translations for the msgid. When msgid_plural is defined, then an ARRAY must be provided.. references => STRING|ARRAY-OF-LOCATIONSThe STRING is a blank separated list of LOCATIONS. LOCATIONs are of the form filename:linenumber, for instance lib/Foo.pm:42 See addReferences()Attributes$obj->addAutomatic(LIST|ARRAY|STRING)Add multiple lines to the translator's comment block. Returns an empty string if there are no comments.$obj->addComment(LIST|ARRAY|STRING)Add multiple lines to the translator's comment block. Returns an empty string if there are no comments.$obj->addFlags(STRING)Parse a "flags" line.$obj->addReferences(STRING|LIST|ARRAY)The STRING is a blank separated list of LOCATIONS. The LIST and ARRAY contain separate LOCATIONs. A LOCATION is of the form filename:linenumber. Returns the internal HASH with references.$obj->automatic()Returns a STRING which contains the cleaned paragraph of automatically added comments. If an argument is specified, it will replace the current comment.$obj->comment()Returns a STRING which contains the cleaned paragraph of translator's comment. If an argument is specified, it will replace the current comment.$obj->format(LANGUAGE|PAIRS|ARRAY-OF-PAIRS|HASH)When one LANGUAGE is specified, it looks whether a LANGUAGE-format or no-LANGUAGE-format is present in the line of FLAGS. This will return 1 (true) in the first case, 0 (false) in the second case. It will return undef (also false) in case that both are not present.You can also specify PAIRS: the key is a language name, and the value is either 0, 1, or undef.Example: use of format() if($po->format('c')) ... unless($po->format('perl-brace')) ... if(defined $po->format('java')) ... $po->format(java => 1); # results in 'java-format' $po->format(java => 0); # results in 'no-java-format' $po->format(java => undef); # results in ''$obj->fuzzy()Returns whether the translation needs human inspection.$obj->isActiveReturns whether the translation has any references, or is the header.$obj->msgidReturns the actual msgid, which cannot be undef.$obj->msgstr(])With a STRING, a new translation will be set. Without STRING, a lookup will take place. When no plural is defined, use INDEX 0$obj->plural()Returns the actual msgid_plural, which can be undef.$obj->references()Returns an unsorted list of LOCATIONS. When options are specified, then those will be used to replace all currently defined references. Returns the unsorted LIST of references.$obj->removeReferencesTo(FILENAME)Remove all the references to the indicate FILENAME from the list. Returns the number of refs left.ParsingLog::Report::Lexicon::PO->fromText(STRING, )Parse the STRING into a new PO object. The WHERE string should explain the location of the STRING, to be used in error messages.$obj->toString(OPTIONS)Format the object into a multi-lined string. Option --Default nr_plurals undef. nr_plurals => INTEGERIf the number of plurals is specified, then the plural translation list can be checked for the correct lenght. Otherwise, no smart behavior is attempted.$obj->unusedThe message-id has no references anymore and no translations. Requirements: · Perl


Log::Report::Lexicon::PO Related Software