]> git.sesse.net Git - ttk-gettext/blob - make-pot.pl
Add a note about what to do when changing/adding strings.
[ttk-gettext] / make-pot.pl
1 #! /usr/bin/perl
2 use Template;
3 require 'Sesse::ExtractGettext.pm';
4
5 my $template = Template->new({ FACTORY => 'Sesse::ExtractGettext' });
6 my $date = `date +"%Y-%M-%d %H:%M%z"`;   # pah :-)
7 chomp $date;
8
9 print <<"EOF";
10 # template file for $ARGV[0]
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: myproject\\n"
14 "Report-Msgid-Bugs-To: \\n"
15 "POT-Creation-Date: $date\\n"
16 "MIME-Version: 1.0\\n"
17 "Content-Type: text/plain; charset=utf-8\\n"
18 "Content-Transfer-Encoding: 8bit\\n"
19
20 EOF
21
22 my $eaten = '';
23 $template->process($ARGV[0], { page => 'templates/index.tmpl' }, \$eaten)
24         or die $template->error();    # errors don't really matter, but OK
25
26 print "# eof\n";