Translations
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
.row
|
||||
%h1
|
||||
= _ 'languages.list'
|
||||
%h2
|
||||
= _ 'languages.active'
|
||||
%ul.languages.active.small-block-grid-1.medium-block-grid-3.large-block-grid-4.grid.links
|
||||
- @language_codes.each do |code|
|
||||
- if code && @completeness.has_key?(code.to_s)
|
||||
%li.text-center
|
||||
%a{:href => "/translations/#{code}/"}
|
||||
%h3=_"languages.#{code}"
|
||||
- completeness = @completeness[code.to_s]
|
||||
- percent = @total_translations ? ((completeness / @total_translations.to_f) * 100).round() : 0
|
||||
.completeness
|
||||
= "#{completeness} / #{@total_translations} (#{percent}%)"
|
||||
%h2= _ 'languages.inactive'
|
||||
%ul.languages.inactive.small-block-grid-1.medium-block-grid-3.large-block-grid-4.grid.links
|
||||
- @language_codes.each do |code|
|
||||
- if code && !@completeness.has_key?(code.to_s)
|
||||
%li.text-center
|
||||
%a{:href => "/translations/#{code}/"}
|
||||
%h3=_"languages.#{code}"
|
||||
@@ -0,0 +1,41 @@
|
||||
.row
|
||||
%h1
|
||||
= _ 'language_translations', vars: {:language => (_ ('languages.' + @lang))}
|
||||
%table.columns#translations
|
||||
%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'
|
||||
@@ -1,4 +1,4 @@
|
||||
= form_tag user_sessions_path, :method => :post do
|
||||
= field :email, :email_field
|
||||
= field :password, :password_field_tag
|
||||
= actions [:sign_in, :facebook_sign_in]
|
||||
= actions [:Sign_In, :facebook_sign_in]
|
||||
|
||||
Reference in New Issue
Block a user