solenv/bin/make_installer.pl | 6 - solenv/bin/modules/installer/globals.pm | 1 solenv/bin/modules/installer/languages.pm | 73 ----------------- solenv/bin/modules/installer/scriptitems.pm | 116 ---------------------------- 4 files changed, 196 deletions(-)
New commits: commit a7664d4b09b16a4b102e595d7ea4511652c76614 Author: Andras Timar <ati...@suse.com> Date: Mon Dec 5 14:05:29 2011 +0100 remove unused ONLY_ASIA_LANGUAGE and ONLY_WESTERN_LANGUAGE options diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index 6e3a68e..7cecbc9 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -823,12 +823,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10b.log", $filesinproductlanguageresolvedarrayref); } } - $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlyasialanguage_files_from_productlists($filesinproductlanguageresolvedarrayref); - if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10d.log", $filesinproductlanguageresolvedarrayref); } - - $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlywesternlanguage_files_from_productlists($filesinproductlanguageresolvedarrayref); - if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10e.log", $filesinproductlanguageresolvedarrayref); } - installer::scriptitems::make_filename_language_specific($filesinproductlanguageresolvedarrayref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10f.log", $filesinproductlanguageresolvedarrayref); } diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index b55bafd..c7e8954 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -98,7 +98,6 @@ BEGIN "tk" ); @items_at_modules = ("Files", "Dirs", "Unixlinks"); - @asianlanguages = ("ja", "ko", "zh-CN", "zh-TW"); @bidilanguages = ("ar", "fa", "he", "ug"); $ziplistname = ""; diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm index 8c7fc7e..82ac7d0 100644 --- a/solenv/bin/modules/installer/languages.pm +++ b/solenv/bin/modules/installer/languages.pm @@ -205,79 +205,6 @@ sub get_default_language return ${$languagesref}[0]; # ToDo, only returning the first language } -############################################################# -# Contains the installation set one of the asian languages? -############################################################# - -sub detect_asian_language -{ - my ($languagesref) = @_; - - my $containsasia = 0; - - for ( my $i = 0; $i <= $#{$languagesref}; $i++ ) - { - my $onelang = ${$languagesref}[$i]; - $onelang =~ s/\s*$//; - - for ( my $j = 0; $j <= $#installer::globals::asianlanguages; $j++ ) - { - my $asialang = $installer::globals::asianlanguages[$j]; - $asialang =~ s/\s*$//; - - if ( $onelang eq $asialang ) - { - $containsasia = 1; - last; - } - } - - if ( $containsasia ) { last; } - } - - return $containsasia; -} - -############################################################# -# Contains the installation set only asian languages? -############################################################# - -sub contains_only_asian_languages -{ - my ($languagesref) = @_; - - my $onlyasian = 1; - - for ( my $i = 0; $i <= $#{$languagesref}; $i++ ) - { - my $onelang = ${$languagesref}[$i]; - $onelang =~ s/\s*$//; - - if (! installer::existence::exists_in_array($onelang, \@installer::globals::asianlanguages)) - { - $onlyasian = 0; - last; - } - } - - return $onlyasian; -} - -################################################################ -# Contains the installation set one of the western languages -################################################################ - -sub detect_western_language -{ - my ($languagesref) = @_; - - my $containswestern = 1; - - if ( contains_only_asian_languages($languagesref) ) { $containswestern = 0; } - - return $containswestern; -} - ################################################################ # Determining the language used by the Java installer ################################################################ diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index 96bdec9..bb8fe55 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -1585,122 +1585,6 @@ sub add_License_Files_into_Installdir } ############################################################################ -# Removing files with flag ONLY_ASIA_LANGUAGE, only if no asian -# language is part of the product. -# This special files are connected to the root module and are not -# included into a language pack (would lead to conflicts!). -# But this files shall only be included into the product, if the -# product contains at least one asian language. -############################################################################ - -sub remove_onlyasialanguage_files_from_productlists -{ - my ($filesarrayref) = @_; - - my $infoline; - - my @newfilesarray = (); - my $returnfilesarrayref; - - my $containsasianlanguage = installer::languages::detect_asian_language($installer::globals::alllanguagesinproductarrayref); - - my $alllangstring = installer::converter::convert_array_to_comma_separated_string($installer::globals::alllanguagesinproductarrayref); - $infoline = "\nLanguages in complete product: $alllangstring\n"; - push( @installer::globals::logfileinfo, $infoline); - - if ( ! $containsasianlanguage ) - { - $infoline = "Product does not contain asian language -> removing files\n"; - push( @installer::globals::logfileinfo, $infoline); - - for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ ) - { - my $onefile = ${$filesarrayref}[$i]; - my $styles = ""; - if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; } - if ( $styles =~ /\bONLY_ASIA_LANGUAGE\b/ ) - { - $infoline = "Flag ONLY_ASIA_LANGUAGE: Removing file $onefile->{'Name'} from files collector!\n"; - push( @installer::globals::logfileinfo, $infoline); - next; - } - - push(@newfilesarray, $onefile); - } - - $returnfilesarrayref = \@newfilesarray; - } - else - { - $returnfilesarrayref = $filesarrayref; - - $infoline = "Product contains asian language -> Nothing to do\n"; - push( @installer::globals::logfileinfo, $infoline); - - } - - return $returnfilesarrayref; -} - -############################################################################ -# Removing files with flag ONLY_WESTERN_LANGUAGE, only if no western -# language is part of the product. -# This special files are connected to the root module and are not -# included into a language pack (would lead to conflicts!). -# But this files shall only be included into the product, if the -# product contains at least one western language. -############################################################################ - -sub remove_onlywesternlanguage_files_from_productlists -{ - my ($filesarrayref) = @_; - - my $infoline; - - my @newfilesarray = (); - my $returnfilesarrayref; - - my $containswesternlanguage = installer::languages::detect_western_language($installer::globals::alllanguagesinproductarrayref); - - my $alllangstring = installer::converter::convert_array_to_comma_separated_string($installer::globals::alllanguagesinproductarrayref); - $infoline = "\nLanguages in complete product: $alllangstring\n"; - push( @installer::globals::logfileinfo, $infoline); - - if ( ! $containswesternlanguage ) - { - $infoline = "Product does not contain western language -> removing files\n"; - push( @installer::globals::logfileinfo, $infoline); - - for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ ) - { - my $onefile = ${$filesarrayref}[$i]; - my $styles = ""; - if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; } - if ( $styles =~ /\bONLY_WESTERN_LANGUAGE\b/ ) - { - $infoline = "Flag ONLY_WESTERN_LANGUAGE: Removing file $onefile->{'Name'} from files collector!\n"; - push( @installer::globals::logfileinfo, $infoline); - next; - } - - push(@newfilesarray, $onefile); - } - - $returnfilesarrayref = \@newfilesarray; - } - else - { - $returnfilesarrayref = $filesarrayref; - - $infoline = "Product contains western language -> Nothing to do\n"; - push( @installer::globals::logfileinfo, $infoline); - - } - - return $returnfilesarrayref; -} - -############################################################################ # Some files are included for more than one language and have the same # name and the same destination directory for all languages. This would # lead to conflicts, if the filenames are not changed. _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits