view core/modules/locale/templates/locale-translation-update-info.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
line wrap: on
line source
{#
/**
 * @file
 * Default theme implementation for displaying translation status information.
 *
 * Displays translation status information per language.
 *
 * Available variables:
 * - modules: A list of modules names that have available translation updates.
 * - updates: A list of available translation updates.
 * - not_found: A list of modules missing translation updates.
 *
 * @see template_preprocess_locale_translation_update_info()
 *
 * @ingroup themeable
 */
#}
<div class="locale-translation-update__wrapper" tabindex="0" role="button">
  <span class="locale-translation-update__prefix visually-hidden">Show description</span>
  {% if modules %}
    {% set module_list = modules|safe_join(', ') %}
    <span class="locale-translation-update__message">{% trans %}Updates for: {{ module_list }}{% endtrans %}</span>
  {% elseif not_found %}
    <span class="locale-translation-update__message">
      {%- trans -%}
        Missing translations for one project
      {%- plural not_found|length -%}
        Missing translations for @count projects
      {%- endtrans -%}
    </span>
  {% endif %}
  {% if updates or not_found %}
    <div class="locale-translation-update__details">
      {% if updates %}
        <ul>
          {% for update in updates %}
            <li>{{ update.name }} ({{ update.timestamp|format_date('html_date') }})</li>
          {% endfor %}
        </ul>
      {% endif %}
      {% if not_found %}
        {#
          Prefix the missing updates list if there is an available updates lists
          before it.
        #}
        {% if updates %}
          {{ 'Missing translations for:'|t }}
        {% endif %}
        {% if not_found %}
          <ul>
            {% for update in not_found %}
              <li>{{ update.name }} ({{ update.version|default('no version'|t) }}). {{ update.info }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      {% endif %}
    </div>
  {% endif %}
</div>