Sha256: 039c953aed07217d815099ffdd8b4a7768eaa1cbf3c1e85cee804657a35322d8

Contents?: true

Size: 488 Bytes

Versions: 29

Compression:

Stored size: 488 Bytes

Contents

module Locomotive
  module TranslationsHelper

    def untranslated_locales(site, translation)
      list = site.locales.inject([]) do |memo,locale|
        translation.values[locale].present? ? memo :  memo << I18n.t("locomotive.locales.#{locale}")
      end

      if list.empty?
        ''
      else
        haml_tag :span, class: 'untranslated' do
          haml_tag :em, I18n.t('locomotive.translations.untranslated', list: list.to_sentence)
        end
      end
    end

  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
locomotivecms-3.0.0.pre.alpha.3 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.7 app/helpers/locomotive/translations_helper.rb
locomotivecms-3.0.0.pre.alpha.2 app/helpers/locomotive/translations_helper.rb
locomotivecms-3.0.0.pre.alpha app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.6 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.6.rc2 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.6.rc1 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.5 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.4 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.3 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.2 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.1 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.0 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.0.rc3 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.0.rc2 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.5.0.rc1 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.4.1 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.4.0 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.3.1 app/helpers/locomotive/translations_helper.rb
locomotive_cms-2.3.0 app/helpers/locomotive/translations_helper.rb