ref: refs/heads/master
commit 055f49b8bd433d33b00dd88fdec3e390b8508a74
Author: Ladislav Slezak
Date: Tue Nov 3 18:36:27 2009 +0100
display correct language name
... when locale contains also a country code (like zh_CN, pt_BR)
---
webclient/package/yast2-webclient.changes | 6 ++++++
.../vendor/plugins/lang_helper/lib/lang_helper.rb | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/webclient/package/yast2-webclient.changes b/webclient/package/yast2-webclient.changes
index 7b69040..2750e1a 100644
--- a/webclient/package/yast2-webclient.changes
+++ b/webclient/package/yast2-webclient.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Nov 3 18:32:54 CET 2009 - lslezak@suse.cz
+
+- display correct language name when the current locale contains
+ also a country code (like zh_CN, pt_BR)
+
+-------------------------------------------------------------------
Tue Nov 3 13:18:41 CET 2009 - jreidinger@suse.cz
- show if host is blocked due to too much failed attempts
diff --git a/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb b/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
index ab13816..92c10bb 100644
--- a/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
+++ b/webclient/vendor/plugins/lang_helper/lib/lang_helper.rb
@@ -42,6 +42,12 @@ module LangHelper
end
def current_locale_name
+ # check full locale at first (language + country)
+ if LANGUGAGES.has_key?(locale.to_s)
+ return language_name locale.to_s
+ end
+
+ # use only language code
language_name current_locale
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org