Parent

Object

Public Instance Methods

files_to_translate() click to toggle source

do not rename, gettext_i18n_rails_js overwrites this to inject coffee + js

# File lib/gettext_i18n_rails/tasks.rb, line 123
def files_to_translate
  Dir.glob("{app,lib,config,#{locale_path}}/**/*.{rb,erb,haml,slim}")
end
load_gettext() click to toggle source
# File lib/gettext_i18n_rails/tasks.rb, line 2
def load_gettext
  require 'gettext'
  require 'gettext/utils'
end
locale_path() click to toggle source
# File lib/gettext_i18n_rails/tasks.rb, line 112
def locale_path
  path = FastGettext.translation_repositories[text_domain].instance_variable_get(:@options)[:path] rescue nil
  path || File.join(Rails.root, "locale")
end
text_domain() click to toggle source
# File lib/gettext_i18n_rails/tasks.rb, line 117
def text_domain
  # if your textdomain is not 'app': require the environment before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain
  ENV['TEXTDOMAIN'] || (FastGettext.text_domain rescue nil) || "app"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.