Debian Codegraph @

bin/xgettext-tt2

raw
1 #! /usr/bin/env perl
2
3 # Copyright (C) 2016-2018 Guido Flohr <[email protected]>,
4 # all rights reserved.
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 use strict;
20
21 use Getopt::Long;
22 use Locale::Messages qw(setlocale LC_MESSAGES);
23 use Locale::TextDomain qw(Template-Plugin-Gettext);
24
25 use Locale::XGettext::TT2;
26
27 Locale::Messages::setlocale(LC_MESSAGES, "");
28
29 my %options;
30
31 Locale::XGettext::TT2->newFromArgv(\@ARGV)->run->output;
32
33 =head1 NAME
34
35 xgettext-tt2 - Extract translatable strings from Template Toolkit 2 templates
36
37 =head1 SYNOPSIS
38
39 xgettext-tt2 [OPTIONS] INPUTFILES
40 xgettext-tt2 [OPTIONS] --files-from=FILELIST
41
42 =head1 DESCRIPTION
43
44 The program B<xgettext-tt2> extracts translatable strings from
45 templates for the Template Toolkit version 2 (see
46 L<http://www.template-toolkit.org>).
47
48 For an overview of all command line options try the command
49 "perldoc Locale::XGettext" or "man Locale::XGettext". The online
50 version of the manual page is available at L<https://github.com/gflohr/Locale-XGettext/blob/master/lib/Locale/XGettext.pod>.
51
52 =head1 DEFAULT KEYWORDS
53
54 The program uses the following built-in default keywords supported by
55 L<Template::Plugin::Gettext>:
56
57 =over 4
58
59 =item *
60
61 gettext:1
62
63 =item *
64
65 ngettext:1,2
66
67 =item *
68
69 pgettext:1c,2
70
71 =item *
72
73 gettextp:1,2c
74
75 =item *
76
77 npgettext:1c,2,3
78
79 =item *
80
81 ngettextp:1,2,3c
82
83 =item *
84
85 xgettext:1
86
87 =item *
88
89 nxgettext:1,2
90
91 =item *
92
93 pxgettext:1c,2
94
95 =item *
96
97 xgettextp:1,2c
98
99 =item *
100
101 npxgettext:1c,2,3
102
103 =item *
104
105 nxgettextp:1,2,3c
106
107 =back
108
109 =head1 DEFAULT KEYWORDS
110
111 The program has the following built-in default flags supported by
112 L<Template::Plugin::Gettext>:
113
114 =over 4
115
116 =item *
117
118 xgettext:1:perl-brace-format
119
120 =item *
121
122 nxgettext:1:perl-brace-format
123
124 =item *
125
126 nxgettext:2:perl-brace-format
127
128 =item *
129
130 pxgettext:2:perl-brace-format
131
132 =item *
133
134 xgettextp:1:perl-brace-format
135
136 =item *
137
138 npxgettext:2:perl-brace-format
139
140 =item *
141
142 npxgettext:3:perl-brace-format
143
144 =item *
145
146 nxgettextp:1:perl-brace-format
147
148 =item *
149
150 nxgettextp:2:perl-brace-format
151
152 =back
153
154
155 =head1 COPYRIGHT
156
157 Copyright (C) 2016-2018 Guido Flohr (http://www.guido-flohr.net/).
158 License LGPLv3+: L<GNU General Public License version 3 or later|http://gnu.org/licenses/lgpl.html>.
159 This is free software: you are free to change and redistribute it.
160 There is NO WARRANTY, to the extent permitted by law.
161 Copyright (C) 2016-2018 Guido Flohr <[email protected]>,
162 all rights reserved.
163
164 =head1 SEE ALSO
165
166 L<Template>, L<Locale::XGettext>, L<Template::Plugin::Gettext>,
167 L<xgettext>, L<perl>