.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Log::Report::Extract 3pm" .TH Log::Report::Extract 3pm "2018-04-16" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Log::Report::Extract \- Collect translatable strings .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 3 \& Log::Report::Extract is extended by \& Log::Report::Extract::PerlPPI \& Log::Report::Extract::Template .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # See the extensions .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module helps maintaining the \s-1POT\s0 files, updating the list of message-ids which are kept in them. After initiation, the \fIprocess()\fR method needs to be called with all files which changed since last processing and the existing \s-1PO\s0 files will get updated accordingly. If no translations exist yet, one \f(CW\*(C`textdomain/xx.po\*(C'\fR file will be created. .SH "METHODS" .IX Header "METHODS" .SS "Constructors" .IX Subsection "Constructors" .IP "Log::Report::Extract\->\fBnew\fR(%options)" 4 .IX Item "Log::Report::Extract->new(%options)" .Vb 3 \& \-Option \-\-Default \& charset \*(Aqutf\-8\*(Aq \& lexicon .Ve .RS 4 .IP "charset => \s-1STRING\s0" 2 .IX Item "charset => STRING" The character-set used in the \s-1PO\s0 files. .IP "lexicon => \s-1DIRECTORY\s0" 2 .IX Item "lexicon => DIRECTORY" The place where the lexicon is kept. When no lexicon is defined yet, this will be the directory where an \f(CW\*(C`domain/xx.po\*(C'\fR file will be created. .RE .RS 4 .RE .SS "Accessors" .IX Subsection "Accessors" .ie n .IP "$obj\->\fBaddPot\fR($domain, $pot, %options)" 4 .el .IP "\f(CW$obj\fR\->\fBaddPot\fR($domain, \f(CW$pot\fR, \f(CW%options\fR)" 4 .IX Item "$obj->addPot($domain, $pot, %options)" .PD 0 .ie n .IP "$obj\->\fBcharset\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcharset\fR()" 4 .IX Item "$obj->charset()" .PD Returns the character-set used inside the \s-1POT\s0 files. .ie n .IP "$obj\->\fBdomains\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBdomains\fR()" 4 .IX Item "$obj->domains()" Returns a sorted list of all known domain names. .ie n .IP "$obj\->\fBindex\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBindex\fR()" 4 .IX Item "$obj->index()" Returns the Log::Report::Lexicon::Index object, which is listing the files in the lexicon directory tree. .ie n .IP "$obj\->\fBpots\fR($domain)" 4 .el .IP "\f(CW$obj\fR\->\fBpots\fR($domain)" 4 .IX Item "$obj->pots($domain)" Returns the list of Log::Report::Lexicon::POT objects which contain the tables for \f(CW$domain\fR. .SS "Processors" .IX Subsection "Processors" .ie n .IP "$obj\->\fBcleanup\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBcleanup\fR(%options)" 4 .IX Item "$obj->cleanup(%options)" Remove all references. .Sp .Vb 2 \& \-Option\-\-Default \& keep [] .Ve .RS 4 .IP "keep => HASH|ARRAY" 2 .IX Item "keep => HASH|ARRAY" Keep the information about these filename, either specified as \s-1ARRAY\s0 of names, or a \s-1HASH\s0 where the keys are the named. .RE .RS 4 .RE .ie n .IP "$obj\->\fBprocess\fR($filename, %options)" 4 .el .IP "\f(CW$obj\fR\->\fBprocess\fR($filename, \f(CW%options\fR)" 4 .IX Item "$obj->process($filename, %options)" Update the domains mentioned in the \f(CW$filename\fR. All text-domains defined in the file will get updated automatically, but should not written before all files are processed. .Sp Returned is the number of messages found in this particular file. .ie n .IP "$obj\->\fBshowStats\fR( [$domains] )" 4 .el .IP "\f(CW$obj\fR\->\fBshowStats\fR( [$domains] )" 4 .IX Item "$obj->showStats( [$domains] )" Show a status about the \s-1DOMAIN\s0 (by default all domains). At least mode verbose is required to see this. .Sp The statistics are sent to (Log::Report) dispatchers which accept notice and info. This could be syslog. When you have no explicit dispatchers in your program, the level of detail get controlled by the 'mode': .Sp .Vb 1 \& use Log::Report mode => \*(AqDEBUG\*(Aq; # or \*(AqVERBOSE\*(Aq .Ve .ie n .IP "$obj\->\fBstore\fR( $domain, $filename, $linenr, $context, $msg, [$msg_plural] )" 4 .el .IP "\f(CW$obj\fR\->\fBstore\fR( \f(CW$domain\fR, \f(CW$filename\fR, \f(CW$linenr\fR, \f(CW$context\fR, \f(CW$msg\fR, [$msg_plural] )" 4 .IX Item "$obj->store( $domain, $filename, $linenr, $context, $msg, [$msg_plural] )" Register the existence of a ($msg, \f(CW$msg_plural\fR) in all POTs of the \f(CW$domain\fR. .ie n .IP "$obj\->\fBwrite\fR( [$domain] )" 4 .el .IP "\f(CW$obj\fR\->\fBwrite\fR( [$domain] )" 4 .IX Item "$obj->write( [$domain] )" Update the information of the files related to \f(CW$domain\fR, by default all processed \s-1DOMAINS.\s0 .Sp All information known about the written \f(CW$domain\fR is removed from the cache. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Log-Report-Lexicon distribution version 1.11, built on March 22, 2018. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2007\-2018 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR