Sha256: 3bd4faa2fbed37cb4e96711e570755bbd49db8c7257d4240f38f63089da85b48

Contents?: true

Size: 311 Bytes

Versions: 11

Compression:

Stored size: 311 Bytes

Contents

module Hyperstack
  module Component
    def t(attribute, opts = {})
      namespace = self.class.name.underscore.gsub(%r{::|/}, '.')

      HyperI18n::I18n.t("#{namespace}.#{attribute}", opts)
    end

    def l(time, format = :default, opts = {})
      HyperI18n::I18n.l(time, format, opts)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hyper-i18n-1.0.alpha1.8 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.7 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.6 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.5 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.4 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.3 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.2 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1.1 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.0.pre.alpha1 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.alpha1 lib/hyper-i18n/hyperstack/component.rb
hyper-i18n-1.0.pre.alpha1 lib/hyper-i18n/hyperstack/component.rb