| Log-Report documentation | view source | Contained in the Log-Report distribution. |
Log::Report::Lexicon::PO - one translation definition
This module is administering one translation object. Sets of PO objects are kept in a POT file, implemented in Log::Report::Lexicon::POT.
-Option --Default automatic "" comment [] format [] fuzzy false msgid <required> msgid_plural undef msgstr "" or [] references []
Automaticly added comments. See addAutomatic().
Translator added comments. See addComment().
See format().
The string is not yet translated, some smart guesses may have been made. See fuzzy().
The translations for the msgid. When msgid_plural is defined, then an ARRAY must be provided.
The STRING is a blank separated list of LOCATIONS.
LOCATIONs are of the form filename:linenumber, for
instance lib/Foo.pm:42
See addReferences()
Add multiple lines to the translator's comment block. Returns an empty string if there are no comments.
Add multiple lines to the translator's comment block. Returns an empty string if there are no comments.
Parse a "flags" line.
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.
Returns a STRING which contains the cleaned paragraph of automatically added comments. If an argument is specified, it will replace the current comment.
Returns a STRING which contains the cleaned paragraph of translator's comment. If an argument is specified, it will replace the current comment.
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 ''
Returns whether the translation needs human inspection.
Returns whether the translation has any references, or is the header.
Returns the actual msgid, which cannot be undef.
With a STRING, a new translation will be set. Without STRING, a lookup will take place. When no plural is defined, use INDEX 0
Returns the actual msgid_plural, which can be undef.
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.
Remove all the references to the indicate FILENAME from the list. Returns the number of refs left.
Parse the STRING into a new PO object. The WHERE string should explain the location of the STRING, to be used in error messages.
Format the object into a multi-lined string.
-Option --Default nr_plurals undef
If the number of plurals is specified, then the plural translation list can be checked for the correct length. Otherwise, no smart behavior is attempted.
The message-id has no references anymore and no translations.
This module is part of Log-Report distribution version 0.93, built on June 30, 2011. Website: http://perl.overmeer.net/log-report/
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
| Log-Report documentation | view source | Contained in the Log-Report distribution. |