.\" Automatically generated by Pod::Man 4.10 (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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Locale::Po4a::Common 3pm" .TH Locale::Po4a::Common 3pm "2020-08-19" "Po4a Tools" "Po4a Tools" .\" 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" Locale::Po4a::Common \- common parts of the po4a scripts and utils .SH "DESCRIPTION" .IX Header "DESCRIPTION" Locale::Po4a::Common contains common parts of the po4a scripts and some useful functions used along the other modules. .PP If needed, you can disable the use of Text::WrapI18N as such: .PP .Vb 2 \& use Locale::Po4a::Common qw(nowrapi18n); \& use Locale::Po4a::Text; .Ve .PP instead of: .PP .Vb 1 \& use Locale::Po4a::Text; .Ve .PP The ordering is important here: as most Locale::Po4a modules load themselves Locale::Po4a::Common, the first time this module is loaded determines whether Text::WrapI18N is used. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "Showing output messages" .IX Subsection "Showing output messages" .IP "\(bu" 4 show_version($) .Sp Shows the current version of the script, and a short copyright message. It takes the name of the script as an argument. .IP "\(bu" 4 wrap_msg($@) .Sp This function displays a message the same way as \fBsprintf()\fR does, but wraps the result so that they look nice on the terminal. .IP "\(bu" 4 wrap_mod($$@) .Sp This function works like \fBwrap_msg()\fR, but it takes a module name as the first argument, and leaves a space at the left of the message. .IP "\(bu" 4 wrap_ref_mod($$$@) .Sp This function works like \fBwrap_msg()\fR, but it takes a file:line reference as the first argument, a module name as the second one, and leaves a space at the left of the message. .SS "Wrappers for other modules" .IX Subsection "Wrappers for other modules" .IP "\(bu" 4 Locale::Gettext .Sp When the Locale::Gettext module cannot be loaded, this module provide dummy (empty) implementation of the following functions. In that case, po4a messages won't get translated but the program will continue to work. .Sp If Locale::gettext is present, this wrapper also calls setlocale(\s-1LC_MESSAGES, ""\s0) so callers don't depend on the \s-1POSIX\s0 module either. .RS 4 .IP "\(bu" 4 bindtextdomain($$) .IP "\(bu" 4 textdomain($) .IP "\(bu" 4 gettext($) .IP "\(bu" 4 dgettext($$) .RE .RS 4 .RE .SH "AUTHORS" .IX Header "AUTHORS" .Vb 1 \& Jordi Vilalta .Ve .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright © 2005 \s-1SPI,\s0 Inc. .PP This program is free software; you may redistribute it and/or modify it under the terms of \s-1GPL\s0 (see the \s-1COPYING\s0 file).