summaryrefslogtreecommitdiff
path: root/l10ntools/scripts
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-09-15 01:13:05 +0200
committerAndras Timar <atimar@suse.com>2011-09-15 11:07:40 +0200
commit47a8454f5f76030203ce6458cf63d4348bdacffe (patch)
treeae2bffb21b75e6e66f56c1b210b29e8bc4c3b8ea /l10ntools/scripts
parent6b457882d011d218ab4764e71fc8d5edfb1d8a87 (diff)
fast_merge: fix mis-merge of first module's strings
The problem was that in write_lines() when $first_run was true, the add_to_buffer() call already set the current module's name to the second module. A fix for this is to use let make_paths() take a parameter, and in case of the first run, pass the really first module name, not the current one.
Diffstat (limited to 'l10ntools/scripts')
-rw-r--r--l10ntools/scripts/fast_merge.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl
index 5dc63cf95d79..73b824ea4e27 100644
--- a/l10ntools/scripts/fast_merge.pl
+++ b/l10ntools/scripts/fast_merge.pl
@@ -91,7 +91,7 @@ while( hasLines() )
}
if( $#current+1 ne 0 )
{
- ( $path , $localize_file ) = make_paths();
+ ( $path , $localize_file ) = make_paths($current[ 0 ]->module);
add_to_buffer();
write_buffer( $path , $localize_file );
}
@@ -240,7 +240,8 @@ sub hasLines
sub make_paths
{
- my $localizeFile = $merge_dir."\\".$current[ 0 ]->module."\\".$current[ 0 ]->file;
+ my $module = shift ;
+ my $localizeFile = $merge_dir."\\".$module."\\".$current[ 0 ]->file;
my $path = getDir( $localizeFile );
$path =~ s/\\/\//g;
@@ -251,8 +252,9 @@ sub make_paths
sub write_lines
{
if( $first_run ){
+ my $module = $current[ 0 ]->module;
add_to_buffer();
- my( $path , $localize_file ) = make_paths();
+ my( $path , $localize_file ) = make_paths($module);
$last_path = $path;
$last_localize_file = $localize_file;
mkpath $path;
@@ -262,7 +264,7 @@ sub write_lines
else
{
return , if ( $#current+1 eq 0 );
- my( $path , $localize_file ) = make_paths();
+ my( $path , $localize_file ) = make_paths($current[ 0 ]->module);
if( $path eq $last_path )
{
add_to_buffer();