%
@page_title = "Translate"
show_filters = ["all", "untranslated", "translated"]
show_filters << "changed" if @from_locale != @to_locale
%>
<%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>
<% if @total_entries > 0 %>
<%= form_tag(translate_path) do %>
<%= hidden_field_tag(:filter, params[:filter], :id => "hid_filter") %>
<%= hidden_field_tag(:sort_by, params[:sort_by], :id => "hid_sort_by") %>
<%= hidden_field_tag(:key_type, params[:key_type], :id => "hid_key_type") %>
<%= hidden_field_tag(:key_pattern, params[:key_pattern], :id => "hid_key_pattern") %>
<%= hidden_field_tag(:text_type, params[:text_type], :id => "hid_text_type") %>
<%= hidden_field_tag(:text_pattern, params[:text_pattern], :id => "hid_text_pattern") %>
Translations from <%= @from_locale %> to <%= @to_locale %>
<%= submit_tag "Save Translations" %>
<% @paginated_keys.each do |key| %>
<%=
from_text = lookup(@from_locale, key)
render (from_text.is_a?(Array) ? 'array_form' : 'string_form'), {
:from_locale => @from_locale,
:to_locale => @to_locale,
:key => key,
}
%>
<% end %>
<%= submit_tag "Save Translations" %>
<% end %>
<% end %>
<%= render :partial => 'pagination', :locals => {:total_entries => @total_entries, :per_page => per_page} %>