move js strings to application helper
This commit is contained in:
parent
4484bf33fa
commit
5267365b4f
2 changed files with 7 additions and 5 deletions
|
|
@ -49,10 +49,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def get_javascript_strings_for language
|
||||
yml_path = File.join(Rails.root, "config/locales/diaspora/", "#{language}.yml")
|
||||
yaml = YAML::load IO.read(yml_path)
|
||||
|
||||
yaml[language]["javascripts"]
|
||||
def get_javascript_strings_for(language)
|
||||
Il8n.t('javascripts').to_json
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -276,4 +276,9 @@ module ApplicationHelper
|
|||
def info_text(text)
|
||||
image_tag 'icons/monotone_question.png', :class => 'what_is_this', :title => text
|
||||
end
|
||||
|
||||
|
||||
def get_javascript_strings_for(language)
|
||||
I18n.t('javascripts')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue