.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
.\"
.\" 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 "Debian::L10n::Debconf 3pm"
.TH Debian::L10n::Debconf 3pm "2021-01-05" "perl v5.32.0" "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"
Debian::L10n::Debconf \- translation status of Debconf templates
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 8
\& use Debian::L10n::Debconf;
\& my $tmpl = Debian::L10n::Debconf\->new();
\& $tmpl\->read_compact($file);
\& my @languages = $tmpl\->langs();
\& foreach (sort @languages) {
\&        my ($t,$f,$u) = $tmpl\->stats($_);
\&        print "$_:${t}t${f}f${u}u\en";
\& }
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module extracts informations about translation status of Debconf
templates files.
.SH "METHODS"
.IX Header "METHODS"
.IP "new" 4
.IX Item "new"
This is the constructor.
.Sp
.Vb 1
\&   my $tmpl = Debian::L10n::Debconf\->new();
.Ve
.IP "read_compact" 4
.IX Item "read_compact"
Read a templates file containing all translations.  An optional second
argument may be used, any non-zero value tells that this file comes with
translations in other files.  In such a case no warning is raised if this
file contains translated fields, because maintainer is assumed to be
responsible for such translations.
.Sp
.Vb 1
\&   $tmpl\->read_compact($file);
.Ve
.IP "read_dispatched" 4
.IX Item "read_dispatched"
Read templates contained in several files.  First argument is the English file,
all other arguments are translated templates files.
.Sp
.Vb 2
\&   @trans = qw(templates.de templates.fr templates.ja templates.nl);
\&   $tmpl\->read_dispatched(\*(Aqtemplates\*(Aq, @trans);
.Ve
.IP "langs" 4
.IX Item "langs"
Return the languages in which this templates file is translated.
.Sp
.Vb 1
\&   my @list = $tmpl\->langs();
.Ve
.IP "filename" 4
.IX Item "filename"
When templates are dispatched into several files, return the filename in
which the language passed as argument is found.
.Sp
.Vb 1
\&   my $filename = $tmpl\->filename("de");
.Ve
.IP "count" 4
.IX Item "count"
Return the number of translatable strings in this templates file.
.Sp
.Vb 1
\&   my $number = $tmpl\->count();
.Ve
.IP "stats" 4
.IX Item "stats"
With an argument, return an array consisting of the number of
translated, fuzzy and untranslated strings for the language given as
argument.
Without argument, return a hash array indexed by language and returning
an array of the number of translated, fuzzy and untranslated strings.
.Sp
.Vb 6
\&   my ($t, $f, $u) = $tmpl\->stats("de");
\&   my %stats  = $tmpl\->stats();
\&   foreach (keys %stats) {
\&           print $_.\*(Aq:\*(Aq. $stats{$_}\->[0].\*(Aqt\*(Aq.$stats{$_}\->[1].\*(Aqf\*(Aq.
\&                $stats{$_}\->[2]."u\en";
\&   }
.Ve
.IP "entries" 4
.IX Item "entries"
Return an array containing all Debconf ids found in this templates file.
.Sp
.Vb 1
\&   my @ids = $tmpl\->entries();
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
Copyright (C) 2001  Denis Barbier <barbier@debian.org>
.PP
This program is free software; you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.