Sha256: d05209b702ba8689e151503f6e3c68d3a72a92d1fa511969a36407a926da4b9b

Contents?: true

Size: 1.37 KB

Versions: 7

Compression:

Stored size: 1.37 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.svg' %>
    <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-4.1.1 app/views/tolk/locales/index.html.erb
tolk-4.1.0 app/views/tolk/locales/index.html.erb
tolk-4.0.1 app/views/tolk/locales/index.html.erb
tolk-4.0.0 app/views/tolk/locales/index.html.erb
tolk-3.2.1 app/views/tolk/locales/index.html.erb
tolk-3.2.0 app/views/tolk/locales/index.html.erb
tolk-3.1.0 app/views/tolk/locales/index.html.erb