Sha256: dd8412d0dac3f3f6674e162ee55420093d31a593738f8f013448584295d0e6c1

Contents?: true

Size: 782 Bytes

Versions: 14

Compression:

Stored size: 782 Bytes

Contents

module TranslationCenter
  module CenterHelper

    # returns a human readable view of the changes
    def format_change(attribute, value)
      # if value is an array then changed value
      if value.is_a? Array 
        "<span class=\"label label-info\">#{attribute}</span> changed from <span class=\"label label-important\">#{value[0]}</span> to <span class=\"label label-success\">#{value[1]}</span>".html_safe
      # else value is new
      else
        "<span class=\"label label-info\">#{attribute}</span> has new value <span class=\"label label-success\">#{value}</span>".html_safe
      end
    end

    def translator_identifier_placeholder
      "#{TranslationCenter::CONFIG['translator_type']} #{TranslationCenter::CONFIG['identifier_type']}".upcase
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
translation_center-2.0.2 app/helpers/translation_center/center_helper.rb
translation_center-2.0.1 app/helpers/translation_center/center_helper.rb
translation_center-1.7.2 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.8.4 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.8.3 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.8.2 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.8.1 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.8.0 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.7.9 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.7.8 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-0.0.0 app/helpers/translation_center/center_helper.rb
afalkear_translation_center-1.7.7 app/helpers/translation_center/center_helper.rb
translation_center-1.7.1 app/helpers/translation_center/center_helper.rb
translation_center-1.7.0 app/helpers/translation_center/center_helper.rb