Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Thu, Sep 15, 2011 at 12:44:01AM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
Actually that's not an omission:

The accessibility strings end up at
translations/unxlngx6.pro/misc/sdf/avmedia/source/framework/localize.sdf
here.

The attached patch fixes the issue here.
From 3381db95cc026f404094daabbed4a8d84685a142 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@frugalware.org>
Date: Thu, 15 Sep 2011 01:13:05 +0200
Subject: [PATCH] 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.
---
 l10ntools/scripts/fast_merge.pl |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl
index 5dc63cf..73b824e 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();
-- 
1.7.6

Attachment: pgpuqNokAEHLg.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.