[libreoffice/f16] Resolves: rhbz#771108 English menu in writer despite installation of libreoffice-langpack-de

David Tardon dtardon at fedoraproject.org
Thu Jan 12 09:40:48 UTC 2012


commit 09417afefa8c778cc2e84eceb27e4fc2bdc13dfb
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jan 12 10:40:22 2012 +0100

    Resolves: rhbz#771108 English menu in writer despite installation of libreoffice-langpack-de

 ...-writing-of-strings-from-the-first-module.patch |   85 ++++++++++++++++++++
 libreoffice.spec                                   |    8 ++-
 2 files changed, 92 insertions(+), 1 deletions(-)
---
diff --git a/0001-fix-writing-of-strings-from-the-first-module.patch b/0001-fix-writing-of-strings-from-the-first-module.patch
new file mode 100644
index 0000000..383bb23
--- /dev/null
+++ b/0001-fix-writing-of-strings-from-the-first-module.patch
@@ -0,0 +1,85 @@
+From 196885980bbb51562264cb5aad9a3e01133d1d7d Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Wed, 11 Jan 2012 14:04:54 +0100
+Subject: [PATCH] fix writing of strings from the first module
+
+---
+ l10ntools/scripts/fast_merge.pl |   21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl
+index 5dc63cf..cc632e4 100644
+--- a/l10ntools/scripts/fast_merge.pl
++++ b/l10ntools/scripts/fast_merge.pl
+@@ -89,11 +89,10 @@ while( hasLines() )
+     }
+     write_lines();
+ }
+-if( $#current+1 ne 0 )
++# write content of the last localize.sdf file
++if( $#buffer ge 0 )
+ {
+-    ( $path , $localize_file ) = make_paths();
+-    add_to_buffer();
+-    write_buffer( $path , $localize_file );
++    write_buffer( $last_path , $last_localize_file );
+ }
+ release_lock();
+ exit( 0 );
+@@ -248,15 +247,14 @@ sub make_paths
+ 
+     return ( $path , $localizeFile );
+ }
++
+ sub write_lines
+ {
+     if( $first_run ){
+-        add_to_buffer();
+         my( $path , $localize_file ) = make_paths();
+         $last_path = $path;
+         $last_localize_file = $localize_file;
+-        mkpath $path;
+-        write_buffer( $path , $localize_file );
++        add_to_buffer();
+         $first_run = '';
+     }
+     else
+@@ -269,7 +267,6 @@ sub write_lines
+         }
+         else
+         {
+-            mkpath $path;
+             write_buffer( $last_path , $last_localize_file );
+             add_to_buffer();
+             $last_path = $path;
+@@ -277,6 +274,11 @@ sub write_lines
+         }
+     }
+ }
++
++# Adds all lines that contain strings from one source file from every input file.
++# TODO: Would it not be better to add lines for all files from a directory (i.e., replace
++# "$afile eq $elem->file" by "$adir eq $elem->dir")? We could get rid of the delayed
++# writing then. But maybe there is a reason for doing it this way...
+ sub add_to_buffer
+ {
+     my $plainline;
+@@ -293,12 +295,15 @@ sub add_to_buffer
+         } while ( !$elem->endoffile && $amodule eq $elem->module && $afile eq $elem->file );
+     }
+ }
++
++# Writes the buffer to currently selected localize.sdf file.
+ sub write_buffer
+ {
+     my $path            = shift;
+     my $localize_file   = shift;
+     my $cnt             = $#buffer+1;
+     print "Write to $path $cnt lines\n";
++    mkpath $path;
+     open FILE , ">>$localize_file" or die "Can't open file '$localize_file'\n";
+     foreach ( @buffer )
+     {
+-- 
+1.7.7.5
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 314747a..8e5875d 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -28,7 +28,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        7%{?dist}
+Release:        8%{?dist}
 License:        LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -134,6 +134,7 @@ Patch35: 0001-Resolves-rhbz-754051-Libreoffice-calc-crashes-when-r.patch
 Patch36: 0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
 Patch37: 0001-sw-fdo-39159-fdo-40482-temp-selection-print-doc.patch
 Patch38: 0001-smath-does-not-handle-accents-in-MathML.patch
+Patch39: 0001-fix-writing-of-strings-from-the-first-module.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -816,6 +817,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch36 -p1 -b .rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
 %patch37 -p1 -b .fdo39159-fdo40482-temp-selection-print-doc.patch
 %patch38 -p1 -b .smath-does-not-handle-accents-in-MathML.patch
+%patch39 -p1 -b .fix-writing-of-strings-from-the-first-module.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2127,6 +2129,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Thu Jan 12 2012 David Tardon <dtardon at redhat.com> - 3.4.4.2-8-UNBUILT
+- Resolves: rhbz#771108 English menu in writer despite installation of
+  libreoffice-langpack-de
+
 * Fri Jan 06 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.4.2-7
 - Resolves: fdo#40482 Writer view options destroyed by printing
 - Resolves: rhbz#533318 smath does not handle accents in MathML


More information about the scm-commits mailing list