diff options
author | Hector Garcia <hectorg@src.gnome.org> | 2001-04-20 20:15:37 +0800 |
---|---|---|
committer | Hector Garcia <hectorg@src.gnome.org> | 2001-04-20 20:15:37 +0800 |
commit | b5e25243655c0f3381aad36d73e2978176c04113 (patch) | |
tree | 26dbeb4d3ec4d4ca58b3c7ae0f6a3999986b0363 | |
parent | 133cef787721037da4e0e9223b12d22185b52d50 (diff) | |
download | gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar.gz gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar.bz2 gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar.lz gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar.xz gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.tar.zst gsoc2013-evolution-b5e25243655c0f3381aad36d73e2978176c04113.zip |
Fixed bug that prevented new translations
svn path=/trunk/; revision=9470
-rwxr-xr-x | doc/update_po.pl | 13 | ||||
-rwxr-xr-x | help/update_po.pl | 13 |
2 files changed, 22 insertions, 4 deletions
diff --git a/doc/update_po.pl b/doc/update_po.pl index 0cc236318b..7fa054e721 100755 --- a/doc/update_po.pl +++ b/doc/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, "<POTFILES.in" ; @@ -65,8 +68,14 @@ while (<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"; 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, "<POTFILES.in" ; @@ -65,8 +68,14 @@ while (<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"; |