From b5e25243655c0f3381aad36d73e2978176c04113 Mon Sep 17 00:00:00 2001 From: Hector Garcia Date: Fri, 20 Apr 2001 12:15:37 +0000 Subject: Fixed bug that prevented new translations svn path=/trunk/; revision=9470 --- help/update_po.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'help') diff --git a/help/update_po.pl b/help/update_po.pl index 0cc236318b..7fa054e721 100755 --- a/help/update_po.pl +++ b/help/update_po.pl @@ -39,8 +39,11 @@ if (! $LANG){ exit; } else { $LANG .=".po"; } +if ( !(-d "./$LANG") ){ mkdir ("./$LANG", 0755) ; } + chdir ("./C"); if ( !(-d "./tmp") ) { mkdir ("./tmp", 0755) ; } + my $comand=""; open FILES, ") { system ( $comand ); print ("Updating $Original_file.po\n"); system ("mv $Original_file.po ../$LANG/$Original_file.pot"); - system ("cp ../$LANG/$Original_file.po ../$LANG/$Original_file.po.old"); - system ("msgmerge ../$LANG/$Original_file.po.old ../$LANG/$Original_file.pot -o ../$LANG/$Original_file.po"); + + if ( -f "../$LANG/$Original_file.po") { + system ("cp ../$LANG/$Original_file.po ../$LANG/$Original_file.po.old"); + system ("msgmerge ../$LANG/$Original_file.po.old ../$LANG/$Original_file.pot -o ../$LANG/$Original_file.po"); + } else { + system ("mv ../$LANG/$Original_file.pot ../$LANG/$Original_file.po"); + } + system ("msgfmt --statistics ../$LANG/$Original_file.po"); system ("rm -f ../$LANG/$Original_file.pot"); # print POTFILE $Converted_file."\n"; -- cgit