<% translatable = @translatable.present? ? @translatable : @translated %>

<%= I18n.t('translations.form.translate_from_and_to', :from => TranslationsHelper::available_locales[translatable.original_locale], :to => TranslationsHelper::available_locales[h(@translation.locale)]) %>

<%= form.error_messages %> <%= form.hidden_field :locale %> <%= hidden_field_tag :version, params[:version] if params[:version] %> <% translatable_attributes = @translatable.present? ? @translatable.translatable_attributes : @translated.translatable_attributes @untranslated_values_with_localized_labels = untranslated_values_with_localized_labels -%> <% translatable_attributes.each do |attribute_key| %> <% untranslated_value = @untranslated_values_with_localized_labels.find { |l| l[:attribute_key] == attribute_key } locals = { :form => form, :untranslated_value => untranslated_value } %> <%= render 'translatable_value', locals %> <% if untranslated_value[:value].present? -%> <%= render 'translation_field', locals.merge(:attribute_key => attribute_key) %> <% else -%> <% end -%> <% end %>

<%= TranslationsHelper::available_locales[translatable.original_locale] %>

<%= TranslationsHelper::available_locales[@translation.locale] %>

<%= I18n.t('translations.form.original_has_no_value') -%>
<%= form.submit @button_text %>