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
|
#! /usr/bin/env perl
# Copyright (C) 2016-2018 Guido Flohr <guido.flohr@cantanea.com>,
# all rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use Getopt::Long;
use Locale::Messages qw(setlocale LC_MESSAGES);
use Locale::TextDomain qw(Template-Plugin-Gettext);
use Locale::XGettext::TT2;
Locale::Messages::setlocale(LC_MESSAGES, "");
my %options;
Locale::XGettext::TT2->newFromArgv(\@ARGV)->run->output;
=head1 NAME
xgettext-tt2 - Extract translatable strings from Template Toolkit 2 templates
=head1 SYNOPSIS
xgettext-tt2 [OPTIONS] INPUTFILES
xgettext-tt2 [OPTIONS] --files-from=FILELIST
=head1 DESCRIPTION
The program B<xgettext-tt2> extracts translatable strings from
templates for the Template Toolkit version 2 (see
L<http://www.template-toolkit.org>).
For an overview of all command line options try the command
"perldoc Locale::XGettext" or "man Locale::XGettext". The online
version of the manual page is available at L<https://github.com/gflohr/Locale-XGettext/blob/master/lib/Locale/XGettext.pod>.
=head1 DEFAULT KEYWORDS
The program uses the following built-in default keywords supported by
L<Template::Plugin::Gettext>:
=over 4
=item *
gettext:1
=item *
ngettext:1,2
=item *
pgettext:1c,2
=item *
gettextp:1,2c
=item *
npgettext:1c,2,3
=item *
ngettextp:1,2,3c
=item *
xgettext:1
=item *
nxgettext:1,2
=item *
pxgettext:1c,2
=item *
xgettextp:1,2c
=item *
npxgettext:1c,2,3
=item *
nxgettextp:1,2,3c
=back
=head1 DEFAULT KEYWORDS
The program has the following built-in default flags supported by
L<Template::Plugin::Gettext>:
=over 4
=item *
xgettext:1:perl-brace-format
=item *
nxgettext:1:perl-brace-format
=item *
nxgettext:2:perl-brace-format
=item *
pxgettext:2:perl-brace-format
=item *
xgettextp:1:perl-brace-format
=item *
npxgettext:2:perl-brace-format
=item *
npxgettext:3:perl-brace-format
=item *
nxgettextp:1:perl-brace-format
=item *
nxgettextp:2:perl-brace-format
=back
=head1 COPYRIGHT
Copyright (C) 2016-2018 Guido Flohr (http://www.guido-flohr.net/).
License LGPLv3+: L<GNU General Public License version 3 or later|http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Copyright (C) 2016-2018 Guido Flohr <guido.flohr@cantanea.com>,
all rights reserved.
=head1 SEE ALSO
L<Template>, L<Locale::XGettext>, L<Template::Plugin::Gettext>,
L<xgettext>, L<perl>
|