Sha256: c254457043c411b86b2ba995afe82c5c4009b354c03cab1300e4ec91b3a124c1

Contents?: true

Size: 346 Bytes

Versions: 10

Compression:

Stored size: 346 Bytes

Contents

module Concerns::TranslationHint
  extend ActiveSupport::Concern

  included do
    def translation_hint
      attribute_value_trans = @builder.object.send("#{attribute_name}_trans")
      prefix = I18n.locale == :en ? '中文' : 'English'

      "<span class='font-italic font-grey'>#{prefix}: #{attribute_value_trans}</span>"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tmatt_cms-0.1.9 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.8 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.7 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.6 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.5 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.4 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.3 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.2 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.1 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb
tmatt_cms-0.1.0 lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb