[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.10,1.11 xgettext
From: |
Ambrose C. LI |
Subject: |
[Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.10,1.11 xgettext.pl,1.6,1.7 |
Date: |
Mon, 23 Feb 2004 14:16:13 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4927
Modified Files:
tmpl_process3.pl xgettext.pl
Log Message:
The timestamps in the generated PO file should make a little bit more sense
this way. In any case hard-coding a date didn't make any sense at all.
Index: tmpl_process3.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/tmpl_process3.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** tmpl_process3.pl 23 Feb 2004 20:04:04 -0000 1.10
--- tmpl_process3.pl 23 Feb 2004 22:16:08 -0000 1.11
***************
*** 240,243 ****
--- 240,244 ----
# Generate the temporary file that acts as <MODULE>/<LANG>.pot
my $st = system($xgettext, '-s', '-f', $tmpfile1, '-o', $tmpfile2,
+ '--po-mode',
(defined $charset_in? ('-I', $charset_in): ()),
(defined $charset_out? ('-O', $charset_out): ()));
Index: xgettext.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/xgettext.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** xgettext.pl 23 Feb 2004 20:04:34 -0000 1.6
--- xgettext.pl 23 Feb 2004 22:16:08 -0000 1.7
***************
*** 9,12 ****
--- 9,13 ----
use strict;
use Getopt::Long;
+ use POSIX;
use Locale::PO;
use TmplTokenizer;
***************
*** 20,23 ****
--- 21,25 ----
use vars qw( $charset_in $charset_out );
use vars qw( $verbose_p );
+ use vars qw( $po_mode_p );
###############################################################################
***************
*** 124,127 ****
--- 126,133 ----
my $pot_charset = (defined $charset_out? $charset_out: 'CHARSET');
$pot_charset = TmplTokenizer::charset_canon $pot_charset;
+ # Time stamps aren't exactly right semantically. I don't know how to fix
it.
+ my $time = POSIX::strftime('%Y-%m-%d %H:%M%z', localtime(time));
+ my $time_pot = $time;
+ my $time_po = $po_mode_p? $time: 'YEAR-MO-DA HO:MI+ZONE';
print OUTPUT <<EOF;
# SOME DESCRIPTIVE TITLE.
***************
*** 134,139 ****
msgstr ""
"Project-Id-Version: PACKAGE VERSION\\n"
! "POT-Creation-Date: 2004-02-05 20:55-0500\\n"
! "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
"Last-Translator: FULL NAME <address@hidden>\\n"
"Language-Team: LANGUAGE <address@hidden>\\n"
--- 140,145 ----
msgstr ""
"Project-Id-Version: PACKAGE VERSION\\n"
! "POT-Creation-Date: $time_pot\\n"
! "PO-Revision-Date: $time_po\\n"
"Last-Translator: FULL NAME <address@hidden>\\n"
"Language-Team: LANGUAGE <address@hidden>\\n"
***************
*** 256,259 ****
--- 262,266 ----
'O|output-charset=s' => \$charset_out, # INTERNAL
'output|o=s' => \$output,
+ 'po-mode' => \$po_mode_p, # INTERNAL
's|sort-output' => sub { $sort = 's' },
'F|sort-by-file' => sub { $sort = 'F' },
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.10,1.11 xgettext.pl,1.6,1.7,
Ambrose C. LI <=