Sha256: de5042e3ce0897f4c9a2d5187ae0a43b794e0cc45610c3226168a20bad277b58

Contents?: true

Size: 364 Bytes

Versions: 30

Compression:

Stored size: 364 Bytes

Contents

module Authlogic
  module I18n
    class Translator
      # If the I18n gem is present, calls +I18n.translate+ passing all
      # arguments, else returns +options[:default]+.
      def translate(key, options = {})
        if defined?(::I18n)
          ::I18n.translate key, options
        else
          options[:default]
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
authlogic-4.5.0 lib/authlogic/i18n/translator.rb
authlogic-4.4.3 lib/authlogic/i18n/translator.rb
authlogic-4.4.2 lib/authlogic/i18n/translator.rb
authlogic-4.4.1 lib/authlogic/i18n/translator.rb
authlogic-4.4.0 lib/authlogic/i18n/translator.rb
authlogic-4.3.0 lib/authlogic/i18n/translator.rb
authlogic-4.2.0 lib/authlogic/i18n/translator.rb
authlogic-4.1.1 lib/authlogic/i18n/translator.rb
authlogic-4.1.0 lib/authlogic/i18n/translator.rb
authlogic-4.0.1 lib/authlogic/i18n/translator.rb
authlogic-4.0.0 lib/authlogic/i18n/translator.rb
authlogic-3.8.0 lib/authlogic/i18n/translator.rb
authlogic-3.7.0 lib/authlogic/i18n/translator.rb
authlogic-3.6.1 lib/authlogic/i18n/translator.rb
authlogic-3.6.0 lib/authlogic/i18n/translator.rb
authlogic-3.5.0 lib/authlogic/i18n/translator.rb
refinerycms-0.9.6.34 vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb
refinerycms-0.9.6.33 vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb
refinerycms-0.9.6.32 vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb
refinerycms-0.9.6.31 vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb