[yast-commit] r61699 - in /trunk/country: VERSION package/yast2-country.changes timezone/src/YaPI/TIME.pm
Author: jsuchome Date: Wed Apr 14 11:50:24 2010 New Revision: 61699 URL: http://svn.opensuse.org/viewcvs/yast?rev=61699&view=rev Log: - TIMEZONE.pm: search for language only when full locale was not given (preparation for bnc#558364) - 2.19.13 Modified: trunk/country/VERSION trunk/country/package/yast2-country.changes trunk/country/timezone/src/YaPI/TIME.pm Modified: trunk/country/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/VERSION?rev=61699&r1=61698&r2=61699&view=diff ============================================================================== --- trunk/country/VERSION (original) +++ trunk/country/VERSION Wed Apr 14 11:50:24 2010 @@ -1 +1 @@ -2.19.12 +2.19.13 Modified: trunk/country/package/yast2-country.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/package/yast2-country.changes?rev=61699&r1=61698&r2=61699&view=diff ============================================================================== --- trunk/country/package/yast2-country.changes (original) +++ trunk/country/package/yast2-country.changes Wed Apr 14 11:50:24 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Apr 14 11:49:53 CEST 2010 - jsuchome@suse.cz + +- TIMEZONE.pm: search for language only when full locale was + not given (preparation for bnc#558364) +- 2.19.13 + +------------------------------------------------------------------- Tue Apr 6 13:57:12 CEST 2010 - jsuchome@suse.cz - enable switching off NTP (bnc#589296) Modified: trunk/country/timezone/src/YaPI/TIME.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/YaPI/TIME.pm?rev=61699&r1=61698&r2=61699&view=diff ============================================================================== --- trunk/country/timezone/src/YaPI/TIME.pm (original) +++ trunk/country/timezone/src/YaPI/TIME.pm Wed Apr 14 11:50:24 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
participants (1)
-
jsuchome@svn.opensuse.org