Sha256: 34224859f2845e60a26d72b40c4240fc765bacb2f51a5eaed5d2024837dfd993

Contents?: true

Size: 1.64 KB

Versions: 6

Compression:

Stored size: 1.64 KB

Contents

<% if I18n.locale == I18n.default_locale %>
  <p>There can't be missing translations for the main language</p>
<% elsif @missing_translations.empty? %>
  <p>There are no missing translations</p>
<% else %>
  <p>There are <%= @missing_translations.size %> missing translations in [<%= I18n.locale %>]. You can
  create them below and you can see the translation key and also the original
  content in the reference language [ <%= I18n.default_locale %> ]
  </p>
  <table id='missing_translations'>
    <thead>
      <tr class="header">
        <th>Key</th>
        <th>Value in [ <%= I18n.default_locale %> ]</th>
        <th>Your translation to [ <%= I18n.locale %> ]</th>
        <% if can? :destroy, Interpret::Translation %>
          <th>Delete</th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <% @missing_translations.each do |trans| %>
        <tr>
          <td><%= trans[:key] %></td>
          <td><%= trans[:ref_value] %></td>
          <td>
            <%= form_for Interpret::Translation.new, :url => translations_path do |f| %>
              <%= f.hidden_field "locale", :value => I18n.locale %>
              <%= f.hidden_field "key", :value => trans[:key] %>
              <%= f.text_area :value, :rows => 4, :cols => 60 %>
              <%= submit_tag "Create" %>
            <% end %>
          </td>
          <% if can? :destroy, trans[:source] %>
            <td>
              <%= link_to "Destroy", trans[:source], :method => :delete, :confirm => "Are you sure?" %>
              the original [ <%= I18n.default_locale %> ] translation.
            </td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
interpret-1.1.2 app/views/interpret/missing_translations/index.html.erb
interpret-1.1.1 app/views/interpret/missing_translations/index.html.erb
interpret-1.1.0 app/views/interpret/missing_translations/index.html.erb
interpret-1.0.2 app/views/interpret/missing_translations/index.html.erb
interpret-1.0.1 app/views/interpret/missing_translations/index.html.erb
interpret-1.0.0 app/views/interpret/missing_translations/index.html.erb