merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0097-localize-pl-cygwin-paths.diff
blob23b47b04862cc09ac9a045b71724a4750118e03f
1 --- transex3/scripts/localize.pl.ORIG 2007-04-24 18:08:18.000000000 +0200
2 +++ transex3/scripts/localize.pl 2008-04-18 13:30:52.068500000 +0200
3 @@ -375,8 +375,9 @@
4 $command = "gsicheck";
6 my $errfile = $sdffile.".err";
7 - $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile";
8 + $command .= " -k -c -wcf $tmpfile -wef ".fix_cygwin_path($errfile)." -l \"\" ".fix_cygwin_path($sdffile);
9 #my $rc = system( $command );
10 + if ($bVerbose) { print STDOUT "localize.pl running $command\n"; }
11 my $output = `$command`;
12 my $rc = $? << 8;
13 if ( $output ne "" ){
14 @@ -444,7 +445,7 @@
15 # if ( -x $command ){
16 if( $command ){
17 if( !$bVerbose ){ $args .= " -QQ "; }
18 - $args .= " -e -f $localizeSDF -l ";
19 + $args .= " -e -f ".fix_cygwin_path($localizeSDF)." -l ";
20 my $bFlag="";
21 if( $bAll ) {$args .= " en-US";}
22 else{
23 @@ -481,7 +482,7 @@
24 # if ( $WIN eq "TRUE" ) { $args .= " > $my_localize_log"; }
25 # else { $args .= " >& $my_localize_log"; }
26 # }
27 - if ( $bVerbose ) { print STDOUT $command.$args."\n"; }
28 + if ( $bVerbose ) { print STDOUT "localize.pl running $command.$args.\n"; }
30 my $rc = system( $command.$args );
32 @@ -1105,6 +1106,19 @@
33 print STDERR "\nlocalize -m -l cs -f my.sdf\n( Merge cs translation into the sourcecode ) \n";
36 +sub fix_cygwin_path
38 + my ( $path ) = @_;
40 + if ( $^O eq 'cygwin' )
41 + {
42 + $path = qx{cygpath -m "$path"};
43 + chomp($path);
44 + }
46 + return $path;
49 # my $line = defined $_ ? $_ : '';
50 # my $leftpart = defined $2 ? $2 : '';
51 # my $prj = defined $3 ? $3 : '';