summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-26 11:38:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-26 11:38:52 +0000
commit3fcd683e6bad87ba5df91a17c3a5933519b81320 (patch)
tree35680397282dfac559756f540723245991c0d04a /lib
parent12890945e527c2803ad5a85ca4afbe1017c34025 (diff)
downloadredmine-3fcd683e6bad87ba5df91a17c3a5933519b81320.tar.gz
redmine-3fcd683e6bad87ba5df91a17c3a5933519b81320.zip
Force UTF-8 encoding of language names.
git-svn-id: http://svn.redmine.org/redmine/trunk@13807 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/i18n.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index 4b8dc2185..7f16105f1 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -93,7 +93,7 @@ module Redmine
# The result is cached to prevent from loading all translations files
# unless :cache => false option is given
def languages_options(options={})
- if options[:cache] == false
+ options = if options[:cache] == false
valid_languages.
select {|locale| ::I18n.exists?(:general_lang_name, locale)}.
map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.
@@ -103,6 +103,7 @@ module Redmine
languages_options :cache => false
end
end
+ options.map {|name, lang| [name.force_encoding("UTF-8"), lang.force_encoding("UTF-8")]}
end
def find_language(lang)