Class: Object

### Home Classes Methods

### In Files

- lib/gettext_i18n_rails/tasks.rb

### Parent

BasicObject

### Methods

- #files_to_translate
- #gettext_default_options
- #gettext_msgmerge_options
- #gettext_xgettext_options
- #locale_path
- #text_domain

### Class/Module Index

Quicksearch

- GettextI18nRails
- GettextI18nRails::Backend
- GettextI18nRails::BaseParser
- GettextI18nRails::GettextHooks
- GettextI18nRails::HamlParser
- GettextI18nRails::HtmlSafeTranslations
- GettextI18nRails::ModelAttributesFinder
- GettextI18nRails::Railtie
- GettextI18nRails::SlimParser
- RubyGettextExtractor
- RubyGettextExtractor::Extractor18
- RubyGettextExtractor::Extractor19
- RubyGettextExtractor::ExtractorMethods
- ActionController
- ActionController::Base
- ActiveModel
- ActiveModel::Translation
- ActiveRecord
- ActiveRecord::Base
- I18n
- I18n::Config
- Object
- String

No matching classes.

# 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 16
    def files_to_translate
      Dir.glob("{app,lib,config,#{locale_path}}/**/*.{rb,erb,haml,slim}")
    end

gettext_default_options() click to toggle source

    # File lib/gettext_i18n_rails/tasks.rb, line 20
    def gettext_default_options
      config = (Rails.application.config.gettext_i18n_rails.default_options if defined?(Rails.application))
      config || ]--sort-by-msgid --no-location --no-wrap]
    end

gettext_msgmerge_options() click to toggle source

    # File lib/gettext_i18n_rails/tasks.rb, line 25
    def gettext_msgmerge_options
      config = (Rails.application.config.gettext_i18n_rails.msgmerge if defined?(Rails.application))
      config || gettext_default_options
    end

gettext_xgettext_options() click to toggle source

    # File lib/gettext_i18n_rails/tasks.rb, line 30
    def gettext_xgettext_options
      config = (Rails.application.config.gettext_i18n_rails.xgettext if defined?(Rails.application))
      config || gettext_default_options
    end

locale_path() click to toggle source

    # File lib/gettext_i18n_rails/tasks.rb, line 5
    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 10
    def text_domain
      # if your textdomain is not 'app': require the environment before calling e.g. gettext:find OR add TEXTDOMAIN=my_domain
      (FastGettext.text_domain rescue nil) || ENV['TEXTDOMAIN'] || "app"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.