Author: jsuchome Date: Wed Apr 14 11:48:29 2010 New Revision: 61696 URL: http://svn.opensuse.org/viewcvs/yast?rev=61696&view=rev Log: - TIMEZONE.pm: search for language only when full locale was not given (preparation for bnc#558364) - 2.17.45 Modified: branches/SuSE-Code-11-SP1-Branch/country/VERSION branches/SuSE-Code-11-SP1-Branch/country/package/yast2-country.changes branches/SuSE-Code-11-SP1-Branch/country/timezone/src/YaPI/TIME.pm Modified: branches/SuSE-Code-11-SP1-Branch/country/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/country/VERSION?rev=61696&r1=61695&r2=61696&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/country/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/country/VERSION Wed Apr 14 11:48:29 2010 @@ -1 +1 @@ -2.17.44 +2.17.45 Modified: branches/SuSE-Code-11-SP1-Branch/country/package/yast2-country.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/country/package/yast2-country.changes?rev=61696&r1=61695&r2=61696&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/country/package/yast2-country.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/country/package/yast2-country.changes Wed Apr 14 11:48:29 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Apr 14 11:40:01 CEST 2010 - jsuchome@suse.cz + +- TIMEZONE.pm: search for language only when full locale was + not given (preparation for bnc#558364) +- 2.17.45 + +------------------------------------------------------------------- Thu Apr 1 13:22:33 CEST 2010 - jsuchome@suse.cz - '/sbin/hwclock --systz' can be called only once (bnc#584484) Modified: branches/SuSE-Code-11-SP1-Branch/country/timezone/src/YaPI/TIME.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/country/timezone/src/YaPI/TIME.pm?rev=61696&r1=61695&r2=61696&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/country/timezone/src/YaPI/TIME.pm (original) +++ branches/SuSE-Code-11-SP1-Branch/country/timezone/src/YaPI/TIME.pm Wed Apr 14 11:48:29 2010 @@ -7,6 +7,7 @@ textdomain("time"); # ------------------- imported modules +YaST::YCP::Import ("Language"); YaST::YCP::Import ("Timezone"); # ------------------------------------- @@ -42,7 +43,19 @@ $ret->{"timezone"} = Timezone->timezone; } if (($args->{"language"} || "") ne "") { - $ret->{"timezone_for_language"} = Timezone->GetTimezoneForLanguage ($args->{"language"} || "", ""); + my $language = $args->{"language"} || ""; + my $timezone_for_language = Timezone->GetTimezoneForLanguage ($language, ""); + # no timezone for this locale, try guessing only by language + unless ($timezone_for_language) { + my $lang_map = Language->GetLanguagesMap(0); + foreach my $lang (keys %$lang_map) { + if (substr ($lang, 0, 2) eq $language) { + $timezone_for_language = Timezone->GetTimezoneForLanguage ($lang, ""); + last; + } + } + } + $ret->{"timezone_for_language"} = $timezone_for_language; } return $ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org