/usr/share/perl5/Log/Report/Lexicon/PO.pod is in liblog-report-perl 0.998-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | =encoding utf8
=head1 NAME
Log::Report::Lexicon::PO - one translation definition
=head1 SYNOPSIS
=head1 DESCRIPTION
This module is administering one translation object. Sets of PO
records are kept in a POT file, implemented in L<Log::Report::Lexicon::POT|Log::Report::Lexicon::POT>.
=head1 METHODS
=head2 Constructors
=over 4
=item Log::Report::Lexicon::PO-E<gt>B<new>(OPTIONS)
-Option --Default
automatic ""
comment []
format []
fuzzy false
msgctxt undef
msgid <required>
msgid_plural undef
msgstr "" or []
references []
=over 2
=item automatic => PARAGRAPH
Automatically added comments.
See L<addAutomatic()|Log::Report::Lexicon::PO/"Attributes">.
=item comment => PARAGRAPH
Translator added comments.
See L<addComment()|Log::Report::Lexicon::PO/"Attributes">.
=item format => ARRAY-OF-PAIRS|HASH
See L<format()|Log::Report::Lexicon::PO/"Attributes">.
=item fuzzy => BOOLEAN
The string is not yet translated, some smart guesses may have been made.
See L<fuzzy()|Log::Report::Lexicon::PO/"Attributes">.
=item msgctxt => STRING
Context string: text around the msgid itself.
=item msgid => STRING
=item msgid_plural => STRING
=item msgstr => STRING|ARRAY-OF-STRING
The translations for the msgid. When msgid_plural is defined, then an
ARRAY must be provided.
=item references => STRING|ARRAY-OF-LOCATIONS
The STRING is a blank separated list of LOCATIONS.
LOCATIONs are of the form C<filename:linenumber>, for
instance C<lib/Foo.pm:42>
See L<addReferences()|Log::Report::Lexicon::PO/"Attributes">
=back
=back
=head2 Attributes
=over 4
=item $obj-E<gt>B<addAutomatic>(LIST|ARRAY|STRING)
Add multiple lines to the translator's comment block. Returns an
empty string if there are no comments.
=item $obj-E<gt>B<addComment>(LIST|ARRAY|STRING)
Add multiple lines to the translator's comment block. Returns an
empty string if there are no comments.
=item $obj-E<gt>B<addFlags>(STRING)
Parse a "flags" line.
=item $obj-E<gt>B<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
C<filename:linenumber>. Returns the internal HASH with references.
=item $obj-E<gt>B<automatic>([LIST|ARRAY|STRING])
Returns a STRING which contains the cleaned paragraph of automatically
added comments. If an argument is specified, it will replace the current
comment.
=item $obj-E<gt>B<comment>([LIST|ARRAY|STRING])
Returns a STRING which contains the cleaned paragraph of translator's
comment. If an argument is specified, it will replace the current
comment.
=item $obj-E<gt>B<format>(LANGUAGE|PAIRS|ARRAY-OF-PAIRS|HASH)
When one LANGUAGE is specified, it looks whether a C<LANGUAGE-format> or
C<no-LANGUAGE-format> is present in the line of FLAGS. This will return
C<1> (true) in the first case, C<0> (false) in the second case. It will
return C<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 C<0>, C<1>, or C<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 ''
=item $obj-E<gt>B<fuzzy>([BOOLEAN])
Returns whether the translation needs human inspection.
=item $obj-E<gt>B<isActive>()
Returns whether the translation has any references, or is the header.
=item $obj-E<gt>B<msgctxt>()
Returns the message context, if provided.
=item $obj-E<gt>B<msgid>()
Returns the actual msgid, which cannot be C<undef>.
=item $obj-E<gt>B<msgstr>([INDEX, [STRING]])
With a STRING, a new translation will be set. Without STRING, a
lookup will take place. When no plural is defined, the INDEX is
ignored.
=item $obj-E<gt>B<plural>([STRING])
Returns the actual msgid_plural, which can be C<undef>.
=item $obj-E<gt>B<references>([STRING|LIST|ARRAY])
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.
=item $obj-E<gt>B<removeReferencesTo>(FILENAME)
Remove all the references to the indicate FILENAME from the list. Returns
the number of refs left.
=back
=head2 Parsing
=over 4
=item Log::Report::Lexicon::PO-E<gt>B<fromText>(STRING, [WHERE])
Parse the STRING into a new PO object. The WHERE string should explain
the location of the STRING, to be used in error messages.
=item $obj-E<gt>B<toString>(OPTIONS)
Format the object into a multi-lined string.
-Option --Default
nr_plurals undef
=over 2
=item nr_plurals => INTEGER
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.
=back
=item $obj-E<gt>B<unused>()
The message-id has no references anymore and no translations.
=back
=head1 SEE ALSO
This module is part of Log-Report distribution version 0.998,
built on October 22, 2013. Website: F<http://perl.overmeer.net/log-report/>
=head1 LICENSE
Copyrights 2007-2013 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 F<http://www.perl.com/perl/misc/Artistic.html>
|