Module: Locomotive::TranslationsHelper

Defined in:
app/helpers/locomotive/translations_helper.rb

Instance Method Summary collapse

Instance Method Details

#translation_completion_to_class(site, translation) ⇒ Object


4
5
6
7
8
9
10
# File 'app/helpers/locomotive/translations_helper.rb', line 4

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