[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator/po update.pl,1.1.2.3,1.1.2.4
From: |
Ambrose C. LI |
Subject: |
[Koha-cvs] CVS: koha/misc/translator/po update.pl,1.1.2.3,1.1.2.4 |
Date: |
Sat, 22 Jan 2005 21:16:18 -0800 |
Update of /cvsroot/koha/koha/misc/translator/po
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4100
Modified Files:
Tag: rel_2_2
update.pl
Log Message:
Added a --pot option to generate the POT (PO template) file.
The POT files are currently named like css_opac_en_EN.po, which
are not what they would usually be named.
Index: update.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/po/Attic/update.pl,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** update.pl 11 Jan 2005 09:50:58 -0000 1.1.2.3
--- update.pl 23 Jan 2005 05:16:15 -0000 1.1.2.4
***************
*** 6,12 ****
use strict;
use integer;
my $lang = $ARGV[0];
! die "Usage: $0 LANG\n" unless $lang =~ /^[a-z]{2}(?:_[A-Z]{2})?$/;
# Remember whether we see the "po" directory; this is used later to guess
--- 6,22 ----
use strict;
use integer;
+ use Getopt::Long;
+
+ use vars qw( $pot_p );
+
+ GetOptions(
+ '--pot' => \$pot_p,
+ ) || exit(1);
my $lang = $ARGV[0];
! die <<EOF unless $pot_p || $lang =~ /^[a-z]{2}(?:_[A-Z]{2})?$/;
! Usage: $0 LANG
! $0 --pot
! EOF
# Remember whether we see the "po" directory; this is used later to guess
***************
*** 32,38 ****
# Now call tmpl_process3.pl to do the real work
! exec('./tmpl_process3.pl', 'update',
'-i', "../../koha-tmpl/$module-tmpl/$theme/en/",
! '-s', "po/${theme}_${module}_$lang.po", '-r');
die "tmpl_process3.pl: exec: $!\n";
--- 42,54 ----
# Now call tmpl_process3.pl to do the real work
! #
! # Traditionally, the pot file should be named PACKAGE.pot
! # (for Koha probably something like koha_intranet_css.pot),
! # but this is not Koha's convention.
! #
! my $target = "po/${theme}_${module}" . ($pot_p? ".pot": "$lang.po");
! exec('./tmpl_process3.pl', ($pot_p? 'create': 'update'),
'-i', "../../koha-tmpl/$module-tmpl/$theme/en/",
! '-s', $target, '-r');
die "tmpl_process3.pl: exec: $!\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator/po update.pl,1.1.2.3,1.1.2.4,
Ambrose C. LI <=