Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.9 KiB

- banner_title (_ 'language_translations', vars: {:language => (_ ('languages.' + @lang))})
- page_style :form
11 years ago
.row
11 years ago
%table.columns#translations{data: {token: form_authenticity_token}}
11 years ago
%thead
%tr
%th.key=_'translations.Key'
%th.key=_'translations.Pages'
%th.key=_'translations.Value'
- @translations.sort{| a1, a2 | a1[0].downcase <=> a2[0].downcase}.each do |k,translation|
- current_translation = Translation.locale(@lang.to_sym).lookup(k)#[0].value #_ translation[0], :strict, locale: @lang.to_sym
- current_translation = current_translation.size() > 0 ? current_translation = current_translation[0].value : nil
- cached = (translation['languages'] && translation['languages'].include?(@lang))
- vars = translation.has_key?('vars') && translation['vars'].size() > 0 ? translation['vars'] : nil
- (vars && vars.include?(:count) ? I18n.backend.get_pluralization_rules(@lang) : [nil]).each do |pluralization|
- key = k + (pluralization ? ".#{pluralization.to_s}" : '')
%tr{:class => current_translation ? 'exists' : 'not-exists', :data => {:key => key}}
%td.key
= key
- if vars
.tags
%h5=_'translations.Vars'
%ul
- vars.each do |v|
%li=v
%td.pages
%ul
- translation['pages'].each do |page|
%li
%a{:href => page}=page
%td.value.primary
- if current_translation
= current_translation
- elsif I18n.locale.to_s == @lang.to_s
Nil
- else
- translation_hint = Translation.locale(I18n.locale).lookup(k)
- translation_hint = translation_hint && translation_hint.size() > 0 ? translation_hint = translation_hint[0].value : nil
= translation_hint ? (_ "languages.#{I18n.locale.to_s}") + " = \"#{translation_hint}\"" : 'Nil'
- unless current_translation
%a{:href => '#', :class => 'auto-translate button small'}='Auto'
11 years ago
-# content_for :footer_scripts
= javascript_include_tag 'translations'