Sha256: d00a616e294a787e73759fcbdbb6f061d22bd19605e47adbb0f6d9044db61e56

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

<h2>
  Locales
  <small>(Primary locale is <%= Tolk::Locale.primary_locale.language_name %>)</small>
</h2>

<% if @locales.any? %>
  <ul class="locales-list">
    <% @locales.each do |locale| %>
      <li>
        <a href="<%= locale_path(locale) %>">
          <span><%= locale.language_name %></span>
          <% missing_count = locale.count_phrases_without_translation %>
          <% if missing_count > 0 %>
            <em class="missing_translations"><%= missing_count %></em>
          <% end %>
          <% if locale.has_updated_translations? %>
            <em class="updated_translations" title="Some phrases have changed">⚠</em>
          <% end %>
        </a>
      </li>
    <% end %>
    <li>
      <%= form_for(Tolk::Locale.new) do |f| %>
        <p>
          <select name="tolk_locale[name]">
            <%= options_for_select tolk_locale_selection %>
          </select>
          <%= f.submit '+ Add', class: 'btn' %>
        </p>
      <% end %>
    </li>
  </ul>
<% else %>
  <div class="empty-state">
    <%= render 'tolk/empty' %>
    <p class="empty-state__msg">
      No locales yet, add one:
    </p>
    <%= form_for(Tolk::Locale.new) do |f| %>
      <p>
        <select name="tolk_locale[name]">
          <%= options_for_select tolk_locale_selection %>
        </select>
        <%= f.submit '+ Add', class: 'btn' %>
      </p>
    <% end %>
  </div>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tolk-6.0.0 app/views/tolk/locales/index.html.erb
tolk-6.0.0.alpha1 app/views/tolk/locales/index.html.erb
tolk-5.0.2 app/views/tolk/locales/index.html.erb
tolk-5.0.1 app/views/tolk/locales/index.html.erb
tolk-5.0.0 app/views/tolk/locales/index.html.erb
tolk-4.3.0 app/views/tolk/locales/index.html.erb
tolk-4.2.0 app/views/tolk/locales/index.html.erb