This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/core/modules/locale/templates/locale-translation-update-info.html.twig

60 lines
1.9 KiB
Twig
Raw Normal View History

{#
/**
* @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>