Sha256: d438315f156045d43e67c4a379f29fa8a651bcc86dfca6ac0fe1192b8ec1a997
Contents?: true
Size: 764 Bytes
Versions: 1
Compression:
Stored size: 764 Bytes
Contents
module Locomotive module TranslationsHelper def translation_completion_to_class(site, translation) (case translation.values.count { |v| v.present? } when 0 then 'zero' when site.locales.size then 'all' else 'partially' end) + '-done' end # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms-3.0.0.pre.beta.1 | app/helpers/locomotive/translations_helper.rb |