Sha256: a3d378faec4d6f8a805d9c3d013ae38f07e84f9aa5ed196217c3d104222cc545

Contents?: true

Size: 546 Bytes

Versions: 14

Compression:

Stored size: 546 Bytes

Contents

require 'active_support'
require 'active_support/concern'

module Fortitude
  class Widget
    module Localization
      extend ActiveSupport::Concern

      LOCALIZED_CONTENT_PREFIX = "localized_content_"

      # PUBLIC API
      def t(key, *args)
        base = self.class.translation_base
        if base && key.to_s =~ /^\./
          super("#{base}#{key}", *args)
        else
          super(key, *args)
        end
      end

      # PUBLIC API
      def ttext(key, *args)
        tag_text t(".#{key}", *args)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fortitude-0.9.4-java lib/fortitude/widget/localization.rb
fortitude-0.9.4 lib/fortitude/widget/localization.rb
fortitude-0.9.3-java lib/fortitude/widget/localization.rb
fortitude-0.9.3 lib/fortitude/widget/localization.rb
fortitude-0.9.2-java lib/fortitude/widget/localization.rb
fortitude-0.9.2 lib/fortitude/widget/localization.rb
fortitude-0.9.1-java lib/fortitude/widget/localization.rb
fortitude-0.9.1 lib/fortitude/widget/localization.rb
fortitude-0.9.0-java lib/fortitude/widget/localization.rb
fortitude-0.9.0 lib/fortitude/widget/localization.rb
fortitude-0.0.10-java lib/fortitude/widget/localization.rb
fortitude-0.0.10 lib/fortitude/widget/localization.rb
fortitude-0.0.9-java lib/fortitude/widget/localization.rb
fortitude-0.0.9 lib/fortitude/widget/localization.rb