[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - i18npool/source solenv/bin
Andras Timar
atimar at suse.com
Wed Apr 3 00:42:32 PDT 2013
i18npool/source/isolang/langid.pl | 6 -
solenv/bin/modules/installer.pm | 33 ++++----
solenv/bin/modules/installer/languages.pm | 99 ------------------------
solenv/bin/modules/installer/windows/feature.pm | 3
4 files changed, 20 insertions(+), 121 deletions(-)
New commits:
commit b0bf938bd4bfd137ab176c0fe4c84f08deb9e650
Author: Andras Timar <atimar at suse.com>
Date: Tue Mar 19 07:52:45 2013 -0700
fdo#54278 Only en-US help pack should contain en-US help
Language of the installer and language of the installed help files are two
separate things. It was not good that they were handled in the same array.
Now all help packs has English + localized installer.
Only en.US help pack isntalls en-US help.
Also, maintaning the list of languages, that are not supported by Windows,
is pointless. What Windows? Windows 8 supports a lot more than Windows XP.
Change-Id: I075a18648796a42609329ead9e8e6a9da9c1fef3
diff --git a/i18npool/source/isolang/langid.pl b/i18npool/source/isolang/langid.pl
index 78221b5..b57c936 100755
--- a/i18npool/source/isolang/langid.pl
+++ b/i18npool/source/isolang/langid.pl
@@ -397,12 +397,6 @@ sub main()
# needs a duplicated pair of backslashes to produce a literal \\
('^\s*completelangiso\s*=', '^\s*$', '^\s*' . $langcoun . '\s*\\\\*$'));
- # @noMSLocaleLangs = ( "br", "bs", ... )
- grepFile(
- '^\s*@noMSLocaleLangs\s*=\s*\(\s*(\s*"([a-z]{2,3})(-[A-Z][A-Z])?"\s*,?)*' . $langcoun . '',
- "$SRC_ROOT", "solenv", "bin/modules/installer/languages.pm",
- ('^\s*@noMSLocaleLangs\s*=', '\)\s*$', '"' . $langcoun . '"'));
-
# af 1252 1078 # Afrikaans
grepFile(
'^\s*' . $langcoun . '',
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 4e4ebe7..84959b0 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -435,6 +435,7 @@ sub run {
for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
{
my $languagesarrayref = installer::languages::get_all_languages_for_one_product($installer::globals::languageproducts[$n], $allvariableshashref);
+ my @setuplanguagesarray = @{ $languagesarrayref };
my $languagestringref = installer::languages::get_language_string($languagesarrayref);
installer::logger::print_message( "------------------------------------\n" );
@@ -458,6 +459,8 @@ sub run {
$installer::globals::addsystemintegration = 0;
$installer::globals::addlicensefile = 0;
$installer::globals::makedownload = 1;
+ @setuplanguagesarray = grep { $_ ne "en-US" } @setuplanguagesarray;
+ unshift(@setuplanguagesarray, "en-US");
}
############################################################
@@ -550,7 +553,7 @@ sub run {
# Resolving include paths (language dependent)
################################################
- $includepatharrayref_lang = installer::ziplist::replace_languages_in_paths($includepatharrayref, $languagesarrayref);
+ $includepatharrayref_lang = installer::ziplist::replace_languages_in_paths($includepatharrayref, \@setuplanguagesarray);
if ( $installer::globals::refresh_includepaths ) { installer::worker::collect_all_files_from_includepaths($includepatharrayref_lang); }
@@ -1427,21 +1430,21 @@ sub run {
# Collection all available directory trees
installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref);
- # Attention: The table "Director.idt" contains language specific strings -> parameter: $languagesarrayref !
- installer::windows::directory::create_directory_table($directoriesforepmarrayref, $languagesarrayref, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir);
+ # Attention: The table "Director.idt" contains language specific strings -> parameter: \@setuplanguagesarray !
+ installer::windows::directory::create_directory_table($directoriesforepmarrayref, \@setuplanguagesarray, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir);
$filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table($filesinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, $newidtdir, $allvariableshashref, $uniquefilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder);
if ( $installer::globals::updatedatabase ) { installer::windows::file::check_file_sequences($allupdatefileorder, $allupdatecomponentorder); }
- # Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref !
- installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref);
+ # Attention: The table "Registry.idt" contains language specific strings -> parameter: \@setuplanguagesarray !
+ installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, \@setuplanguagesarray, $allvariableshashref);
installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath, $allvariableshashref);
- # Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref !
+ # Attention: The table "Feature.idt" contains language specific strings -> parameter: \@setuplanguagesarray !
installer::windows::feature::add_uniquekey($modulesinproductlanguageresolvedarrayref);
$modulesinproductlanguageresolvedarrayref = installer::windows::feature::sort_feature($modulesinproductlanguageresolvedarrayref);
- installer::windows::feature::create_feature_table($modulesinproductlanguageresolvedarrayref, $newidtdir, $languagesarrayref, $allvariableshashref);
+ installer::windows::feature::create_feature_table($modulesinproductlanguageresolvedarrayref, $newidtdir, \@setuplanguagesarray, $allvariableshashref);
installer::windows::featurecomponent::create_featurecomponent_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $newidtdir);
@@ -1449,11 +1452,11 @@ sub run {
installer::windows::font::create_font_table($filesinproductlanguageresolvedarrayref, $newidtdir);
- # Attention: The table "Shortcut.idt" contains language specific strings -> parameter: $languagesarrayref !
+ # Attention: The table "Shortcut.idt" contains language specific strings -> parameter: \@setuplanguagesarray !
# Attention: Shortcuts (Folderitems) have icon files, that have to be copied into the Icon directory (last parameter)
my @iconfilecollector = ();
- installer::windows::shortcut::create_shortcut_table($filesinproductlanguageresolvedarrayref, $linksinproductlanguageresolvedarrayref, $folderinproductlanguageresolvedarrayref, $folderitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, $newidtdir, $languagesarrayref, $includepatharrayref, \@iconfilecollector);
+ installer::windows::shortcut::create_shortcut_table($filesinproductlanguageresolvedarrayref, $linksinproductlanguageresolvedarrayref, $folderinproductlanguageresolvedarrayref, $folderitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, $newidtdir, \@setuplanguagesarray, $includepatharrayref, \@iconfilecollector);
installer::windows::inifile::create_inifile_table($inifiletableentries, $filesinproductlanguageresolvedarrayref, $newidtdir);
@@ -1481,9 +1484,9 @@ sub run {
# For multilingual installation sets, the differences of this
# databases have to be stored in transforms.
- for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
+ for ( my $m = 0; $m <= $#{\@setuplanguagesarray}; $m++ )
{
- my $onelanguage = ${$languagesarrayref}[$m];
+ my $onelanguage = ${\@setuplanguagesarray}[$m];
my $is_rtl = 0;
my @rtllanguages = ("ar", "fa", "he", "ug", "ky-CN");
@@ -1584,7 +1587,7 @@ sub run {
# adding language specific properties for multilingual installation sets
- installer::windows::property::set_languages_in_property_table($languageidtdir, $languagesarrayref);
+ installer::windows::property::set_languages_in_property_table($languageidtdir, \@setuplanguagesarray);
# adding settings into CheckBox.idt
installer::windows::property::update_checkbox_table($languageidtdir, $allvariableshashref);
@@ -1623,13 +1626,13 @@ sub run {
# Creating transforms, if the installation set has more than one language
# renaming the msi database
- my $defaultlanguage = installer::languages::get_default_language($languagesarrayref);
+ my $defaultlanguage = installer::languages::get_default_language(\@setuplanguagesarray);
if ( $installer::globals::iswin || $installer::globals::packageformat eq 'msi' )
{
- if ( $#{$languagesarrayref} > 0 )
+ if ( $#{\@setuplanguagesarray} > 0 )
{
- installer::windows::msiglobal::create_transforms($languagesarrayref, $defaultlanguage, $installdir, $allvariableshashref);
+ installer::windows::msiglobal::create_transforms(\@setuplanguagesarray, $defaultlanguage, $installdir, $allvariableshashref);
}
# if there are Merge Modules, they have to be integrated now
my $mergedbname = installer::windows::msiglobal::get_msidatabasename($allvariableshashref, $defaultlanguage);
diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm
index db5ce85..139da94 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -133,105 +133,6 @@ sub get_all_languages_for_one_product
installer::remover::remove_leading_and_ending_whitespaces(\$last);
push(@languagearray, "$last");
- if ( $installer::globals::iswindowsbuild )
- {
- my $furthercheck = 1;
-
- # For some languages (that are not supported by Windows, english needs to be added to the installation set
-
- # FIXME The script i18npool/source/isolang/langid.pl greps this very
- # source file to read this array. Be careful!
- my @noMSLocaleLangs = (
- "br",
- "bs",
- "dz",
- "gu",
- "km",
- "nr",
- "ns",
- "nso",
- "rw",
- "ss",
- "st",
- "tg",
- "ts",
- "tn",
- "ve",
- "xh",
- "zu",
- "ne",
- "bn",
- "bn-BD",
- "bn-IN",
- "lo",
- "cy",
- "ku",
- "as-IN",
- "te-IN",
- "ml-IN",
- "mr-IN",
- "ur-IN",
- "ta-IN",
- "or-IN",
- "ti-ER",
- "eo",
- "ka",
- "ga",
- "uk",
- "gd",
- "my",
- "mai",
- "brx",
- "dgo",
- "kok",
- "mni",
- "ca-XV",
- "sat",
- "ug",
- "om",
- "si",
- "or",
- "oc",
- "ml",
- "as",
- "ast",
- "ht",
- "jbo",
- "fur",
- "ny",
- "so",
- "kab",
- "tk",
- "ky-CN",
- );
-
- if ( all_elements_of_array1_in_array2(\@languagearray, \@noMSLocaleLangs) )
- {
- my $officestartlanguage = $languagearray[0];
- unshift(@languagearray, "en-US"); # am Anfang einfügen!
- $installer::globals::ismultilingual = 1;
- $installer::globals::added_english = 1;
- $installer::globals::set_office_start_language = 1;
- # setting the variable PRODUCTLANGUAGE, needed for Linguistic-ForceDefaultLanguage.xcu
- $allvariables->{'PRODUCTLANGUAGE'} = $officestartlanguage;
- $furthercheck = 0;
- }
-
- # In bilingual installation sets, in which english is the first language,
- # the Office start language shall be the second language.
-
- if ( $furthercheck )
- {
- if (( $#languagearray == 1 ) && ( $languagearray[0] eq "en-US" ))
- {
- my $officestartlanguage = $languagearray[1];
- $installer::globals::set_office_start_language = 1;
- # setting the variable PRODUCTLANGUAGE, needed for Linguistic-ForceDefaultLanguage.xcu
- $allvariables->{'PRODUCTLANGUAGE'} = $officestartlanguage;
- }
- }
- }
-
return \@languagearray;
}
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index c22b864..33aa351 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -387,8 +387,9 @@ sub create_feature_table
# Controlling the language!
# Only language independent feature or feature with the correct language will be included into the table
+ # But help packs are different. They have en-US added as setup language.
- if (! (!(( $onefeature->{'ismultilingual'} )) || ( $onefeature->{'specificlanguage'} eq $onelanguage )) ) { next; }
+ if (! (!(( $onefeature->{'ismultilingual'} )) || ( $onefeature->{'specificlanguage'} eq $onelanguage ) || $installer::globals::helppack ) ) { next; }
my %feature = ();
More information about the Libreoffice-commits
mailing list