Sha256: 81c79282609c4389493bdc2c103b6aba2145ac49c95d7f6b6f93fd28c98e057e

Contents?: true

Size: 423 Bytes

Versions: 9

Compression:

Stored size: 423 Bytes

Contents

module UIAlchemy
  module TranslationHelper
    # Test for Gettext presence, punt to rails translations otherwise
    if respond_to?(:_)
      include UIAlchemy::GettextTranslations
    else
      include UIAlchemy::RailsTranslations
    end

    def get_string(text_key)
      if respond_to?(:_)
        return _(TRANSLATIONS[text_key])
      else
        return I18n.t TRANSLATIONS[text_key]
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ui_alchemy-rails-1.0.12 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.11 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.10 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.9 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.8 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.7 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.6 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.5 app/helpers/ui_alchemy/translation_helper.rb
ui_alchemy-rails-1.0.4 app/helpers/ui_alchemy/translation_helper.rb