Sha256: 43338ac62ae7a6e0eb665598ea85387ac57509e59939d562c9cb2019fcbb13a3
Contents?: true
Size: 534 Bytes
Versions: 8
Compression:
Stored size: 534 Bytes
Contents
module Locomotive module Builder module Liquid module Filters module Translate def translate(key, locale = nil) translation = @context.registers[:mounting_point].translations[key.to_s] if translation translation.get(locale) || translation.get(Locomotive::Mounter.locale) else "[unknown translation key: #{key}]" end end end ::Liquid::Template.register_filter(Translate) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems