You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/12/09 09:43:21 UTC

svn commit: r1549513 - in /openoffice/trunk/main/solenv/bin/modules/installer: languages.pm patch/InstallationSet.pm patch/Msi.pm

Author: af
Date: Mon Dec  9 08:43:20 2013
New Revision: 1549513

URL: http://svn.apache.org/r1549513
Log:
123531: Handle languages that are internally prefixed with 'en-US_'

Modified:
    openoffice/trunk/main/solenv/bin/modules/installer/languages.pm
    openoffice/trunk/main/solenv/bin/modules/installer/patch/InstallationSet.pm
    openoffice/trunk/main/solenv/bin/modules/installer/patch/Msi.pm

Modified: openoffice/trunk/main/solenv/bin/modules/installer/languages.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/languages.pm?rev=1549513&r1=1549512&r2=1549513&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/languages.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/languages.pm Mon Dec  9 08:43:20 2013
@@ -462,4 +462,29 @@ sub get_key_language ($)
 	}
 }
 
+
+
+
+=head2 get_normalized_language ($language)
+
+    Transform "..._<language>" into "<language>".
+    The ... part, if it exists, is typically en-US.
+
+    If $language does not contain a '_' then $language is returned unmodified.
+
+=cut
+sub get_normalized_language ($)
+{
+    my ($language) = @_;
+    
+    if ($language =~ /^.*?_(.*)$/)
+    {
+        return $1;
+    }
+    else
+    {
+        return $language;
+    }
+}
+
 1;

Modified: openoffice/trunk/main/solenv/bin/modules/installer/patch/InstallationSet.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/patch/InstallationSet.pm?rev=1549513&r1=1549512&r2=1549513&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/patch/InstallationSet.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/patch/InstallationSet.pm Mon Dec  9 08:43:20 2013
@@ -253,7 +253,7 @@ sub GetUnpackedPath ($$$$$)
         $package_format,
         installer::patch::Version::ArrayToDirectoryName(
             installer::patch::Version::StringToNumberArray($version)),
-        $language);
+        installer::languages::get_normalized_language($language));
 }
 
 

Modified: openoffice/trunk/main/solenv/bin/modules/installer/patch/Msi.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/patch/Msi.pm?rev=1549513&r1=1549512&r2=1549513&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/patch/Msi.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/patch/Msi.pm Mon Dec  9 08:43:20 2013
@@ -51,7 +51,7 @@ sub FindAndCreate($$$$$)
     $path = installer::patch::InstallationSet::GetUnpackedExePath(
         $version,
         $is_current_version,
-        $language,
+        installer::languages::get_normalized_language($language),
         "msi",
         $product_name);
 
@@ -75,6 +75,7 @@ sub FindAndCreate($$$$$)
     If construction fails then IsValid() will return false.
 
 =cut
+
 sub new ($$$$$$)
 {
     my ($class, $filename, $version, $is_current_version, $language, $product_name) = @_;
@@ -122,6 +123,7 @@ sub IsValid ($)
     Write all modified tables back into the databse.
 
 =cut
+
 sub Commit ($)
 {
     my $self = shift;
@@ -159,6 +161,7 @@ sub Commit ($)
     call for the same table is very cheap.
 
 =cut
+
 sub GetTable ($$)
 {
     my ($self, $table_name) = @_;
@@ -197,6 +200,7 @@ sub GetTable ($$)
     Write the given table back to the databse.
 
 =cut
+
 sub PutTable ($$)
 {
     my ($self, $table) = @_;
@@ -243,6 +247,7 @@ sub PutTable ($$)
     to their last modification times (mtime).
 
 =cut
+
 sub EnsureAYoungerThanB ($$)
 {
     my ($filename_a, $filename_b) = @_;
@@ -276,6 +281,7 @@ sub EnsureAYoungerThanB ($$)
     Returns long and short name (in this order) as array.
 
 =cut
+
 sub SplitLongShortName ($)
 {
     my ($name) = @_;
@@ -300,6 +306,7 @@ sub SplitLongShortName ($)
     table.
 
 =cut
+
 sub SplitTargetSourceLongShortName ($)
 {
     my ($name) = @_;
@@ -322,6 +329,7 @@ sub SplitTargetSourceLongShortName ($)
     to hashes that contains short and long source and target names.
 
 =cut
+
 sub GetDirectoryMap ($)
 {
     my ($self) = @_;
@@ -423,6 +431,7 @@ sub GetDirectoryMap ($)
     calls but the first are cheap.
 
 =cut
+
 sub GetFileMap ($)
 {
     my ($self) = @_;