app/views/tolk/locales/show.html.erb in tolk-1.3.7 vs app/views/tolk/locales/show.html.erb in tolk-1.3.8
- old
+ new
@@ -16,34 +16,44 @@
<% if @phrases.any? %>
<%= form_for @locale do |locale_form| %>
<table class="translations">
<tr>
<th class="translation"><%= @locale.language_name -%></th>
+ <th class="actions"></th>
<th class="key"><%= Tolk::Locale.primary_language_name -%></th>
</tr>
<% @phrases.each do |phrase| %>
<tr>
<% translation = Tolk::Translation.new(:locale => @locale, :phrase => phrase) %>
<td class="translation">
<%= hidden_field_tag :"translations[][id]", translation.id, :id => "#{translation.object_id}_id" %>
<%= hidden_field_tag :"translations[][phrase_id]", phrase.id, :id => "#{translation.object_id}_phrase_id" %>
<%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, :id => "#{translation.object_id}_locale_id" %>
- <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "#{translation.object_id}_text", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
+ <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "#{translation.object_id}_text" %>
</td>
+ <td class="actions">
+ <a class="copy" href="#" tabindex="-1" title="Copy original translation">←</a><br>
+ <span class="warning" title="Interpolation keys don't match">⚠</span>
+ </td>
<td class="phrase">
- <% if params[:q].present? -%>
- <%= highlight(format_i18n_value(phrase.translations.primary.text), params[:q]) -%>
- <% else -%>
+ <div class="original">
<%= format_i18n_value(phrase.translations.primary.text) -%>
- <% end -%>
- <%= boolean_warning if phrase.translations.primary.boolean? -%>
+ </div>
+ <div class="value">
+ <% if params[:q].present? -%>
+ <%= highlight(format_i18n_value(phrase.translations.primary.text), params[:q]) -%>
+ <% else -%>
+ <%= format_i18n_value(phrase.translations.primary.text) -%>
+ <% end -%>
+ <%= boolean_warning if phrase.translations.primary.boolean? -%>
+ </div>
<span class="key" title="<%= phrase.key %>"><%= truncate(phrase.key, :length => 100) %></span>
</td>
</tr>
<% end %>
</table>
<div class="table_submit">
- <p><%= locale_form.submit "Save changes" %></p>
+ <p><%= locale_form.submit "Save changes", :class => 'save' %></p>
</div>
<% end %>
<div class="paginate">
<%= will_paginate @phrases %>
</div>