% provide(:title, t('problems.show.problem_subtitle', id: @translation.problem_id)) %>
<% if @translation.pending? %>
<%= link_to admin_translation_decline_path(@translation), method: :post, class: 'btn btn-default btn-sm pull-right' do %>
<%= icon :remove %> <%= t '.decline_translation' %>
<% end %>
<%= link_to admin_translation_accept_path(@translation), method: :post, class: 'btn btn-default btn-sm pull-right' do %>
<%= icon :ok %> <%= t '.accept_translation' %>
<% end %>
<% end %>
<%= panel do %>
<%= sanitize @translation.content, scrubber: TranslationContentScrubber.new %>
<% end %>
<% if @translation.problem.is_translated? %>
<% if @translation.title != @translation.problem.title %>
<%= t 'activerecord.attributes.translation.title' %>
<%= t '.changed_title_html', old: @translation.problem.title, new: @translation.title %>
<% end %>
<%= t 'activerecord.attributes.translation.content' %>
<%= raw Diffy::Diff.new(@translation.problem.content, @translation.content, allow_empty_diff: false).to_s(:html) %>
<%= t('.already_translated') %> <%= link_to t('.visit_current_translation'), @translation.problem, target: '_blank', class: 'alert-link' %>
<% else %>
<%= t 'activerecord.attributes.translation.content' %>
<%= raw Diffy::Diff.new(@translation.content, @translation.content, allow_empty_diff: false).to_s(:html) %>
<%= t('.is_new_translation') %>
<% end %>
<%= link_to t('problems.show.view_original_problem'), @translation.problem.original_url, target: '_blank' %>