Sha256: 41670922b2db35585ff77a427713f7f11aa2d4289d779a5a142b0639a262ee44

Contents?: true

Size: 275 Bytes

Versions: 53

Compression:

Stored size: 275 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Tags
    class TranslationTag < Liquid::Tag
      def render(_context)
        key = @markup.strip
        I18n.t(key)
      end
    end
  end
end

Liquid::Template.register_tag("t", Bridgetown::Tags::TranslationTag)

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
bridgetown-core-1.3.0 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.1.0 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.1.0.beta1 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0.beta3 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0.beta2 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0.beta1 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0.alpha11 lib/bridgetown-core/tags/t.rb
bridgetown-core-1.0.0.alpha10 lib/bridgetown-core/tags/t.rb