module Concerns::TranslationHint

Public Instance Methods

translation_hint() click to toggle source
# File lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb, line 5
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