class Object
Public Instance Methods
files_to_translate()
click to toggle source
# File lib/gettext_i18n_rails/tasks.rb, line 124 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 113 def locale_path FastGettext.translation_repositories[text_domain].instance_variable_get(:@options)[:path] rescue File.join(Rails.root, "locale") end
text_domain()
click to toggle source
# File lib/gettext_i18n_rails/tasks.rb, line 119 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