summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-17 11:22:17 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-17 11:22:17 +0000
commit186329ef04ad70df3f05dade00cc1f2b00f5ce35 (patch)
tree8b87b94adb5abf184c987499b39f728867000247 /lib/redmine
parentcaefd6d1157e75dd8474c82ce9f478f4b3451ee8 (diff)
downloadredmine-186329ef04ad70df3f05dade00cc1f2b00f5ce35.tar.gz
redmine-186329ef04ad70df3f05dade00cc1f2b00f5ce35.zip
code cleanup: rubocop: fix Layout/ElseAlignment in lib/redmine/i18n.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18704 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/i18n.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index 5621be68c..8343bccb0 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -117,17 +117,18 @@ module Redmine
# The result is cached to prevent from loading all translations files
# unless :cache => false option is given
def languages_options(options={})
- options = if options[:cache] == false
- available_locales = ::I18n.backend.available_locales
- valid_languages.
- select {|locale| available_locales.include?(locale)}.
- map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.
- sort_by(&:first)
- else
- ActionController::Base.cache_store.fetch "i18n/languages_options/#{Redmine::VERSION}" do
- languages_options :cache => false
+ options =
+ if options[:cache] == false
+ available_locales = ::I18n.backend.available_locales
+ valid_languages.
+ select {|locale| available_locales.include?(locale)}.
+ map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.
+ sort_by(&:first)
+ else
+ ActionController::Base.cache_store.fetch "i18n/languages_options/#{Redmine::VERSION}" do
+ languages_options :cache => false
+ end
end
- end
options.map {|name, lang| [name.force_encoding("UTF-8"), lang.force_encoding("UTF-8")]}
end