[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.9,1.10
From: |
Ambrose C. LI |
Subject: |
[Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.9,1.10 |
Date: |
Mon, 23 Feb 2004 12:04:07 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4469
Modified Files:
tmpl_process3.pl
Log Message:
Fixed bug in "create" action reported by Benedict
Index: tmpl_process3.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/tmpl_process3.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** tmpl_process3.pl 23 Feb 2004 05:51:30 -0000 1.9
--- tmpl_process3.pl 23 Feb 2004 20:04:04 -0000 1.10
***************
*** 213,216 ****
--- 213,218 ----
}
+ my $xgettext = './xgettext.pl'; # actual text extractor script
+
if ($action eq 'create') {
# updates the list. As the list is empty, every entry will be added
***************
*** 223,227 ****
close $tmph;
# Generate the specified po file ($str_file)
! system ('xgettext.pl', '-s', '-f', $tmpfile, '-o', $str_file);
unlink $tmpfile || warn_normal "$tmpfile: unlink failed: $!\n", undef;
--- 225,230 ----
close $tmph;
# Generate the specified po file ($str_file)
! my $st = system ($xgettext, '-s', '-f', $tmpfile, '-o', $str_file);
! warn_normal "Text extraction failed: $xgettext: $!\n", undef if $st != 0;
unlink $tmpfile || warn_normal "$tmpfile: unlink failed: $!\n", undef;
***************
*** 236,246 ****
close $tmph1;
# Generate the temporary file that acts as <MODULE>/<LANG>.pot
! system('./xgettext.pl', '-s', '-f', $tmpfile1, '-o', $tmpfile2,
(defined $charset_in? ('-I', $charset_in): ()),
(defined $charset_out? ('-O', $charset_out): ()));
! # Merge the temporary "pot file" with the specified po file ($str_file)
! # FIXME: msgmerge(1) is a Unix dependency
! # FIXME: need to check the return value
! system('msgmerge', '-U', '-s', $str_file, $tmpfile2);
unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef;
unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef;
--- 239,254 ----
close $tmph1;
# Generate the temporary file that acts as <MODULE>/<LANG>.pot
! my $st = system($xgettext, '-s', '-f', $tmpfile1, '-o', $tmpfile2,
(defined $charset_in? ('-I', $charset_in): ()),
(defined $charset_out? ('-O', $charset_out): ()));
! if ($st == 0) {
! # Merge the temporary "pot file" with the specified po file ($str_file)
! # FIXME: msgmerge(1) is a Unix dependency
! # FIXME: need to check the return value
! system('msgmerge', '-U', '-s', $str_file, $tmpfile2);
! } else {
! warn_normal "Text extraction failed: $xgettext: $!\n", undef;
! warn_normal "Will not run msgmerge\n", undef;
! }
unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef;
unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.9,1.10,
Ambrose C. LI <=
- Prev by Date:
[Koha-cvs] CVS: koha/misc/translator VerboseWarnings.pm,1.2,1.3
- Next by Date:
[Koha-cvs] CVS: koha/misc/translator intranet.zh_TW,1.14,1.15 xgettext.pl,1.5,1.6
- Previous by thread:
[Koha-cvs] CVS: koha/misc/translator VerboseWarnings.pm,1.2,1.3
- Next by thread:
[Koha-cvs] CVS: koha/misc/translator intranet.zh_TW,1.14,1.15 xgettext.pl,1.5,1.6
- Index(es):