{% extends "admin/base.html.twig" %} {% trans_default_domain 'admin' %} {% import 'core/src-macro.html.twig' as resources %} {% block title %}{{ "Groupes de traductions"|trans }}{% endblock %} {% block pageTitle %}{{ "Groupes de traductions"|trans }}{% endblock %} {% block stylesheets %} {{ parent() }} {{ resources.encore_absolute_link_tags('admin-translation', 'admin') }} {% endblock %} {% block javascripts %} {{ parent() }} {{ resources.encore_entry_js_files('admin-translation', 'admin', 'Translation') }} {% endblock %} {% block body %} {% set toExtract = pagination.getTotalItemCount is defined and pagination.getTotalItemCount == 0 and not app.request.get('index_search') or pagination|length == 0 and not app.request.get('index_search') %} {% set allLocales = interface.website.configuration.allLocales %} {% set defaultLocale = interface.website.configuration.locale %} {% set stats = domains|transStats %} {% if is_granted('ROLE_INTERNAL') %}
{{ render_esi(controller('App\\Controller\\Admin\\Translation\\i18nController::import', {"website": websiteId()} )) }} {% endif %} {% include 'admin/page/translation/generator.html.twig' %} {% if not toExtract %}{{ "Groupe"|trans }} | {% for transLocale in allLocales %}{% if allLocales|length > 1 %} {% endif %} {% if stats[transLocale] is defined %} {{ stats[transLocale]['words'] }} {{ "mots"|trans }} {% endif %} | {% endfor %}
---|---|
{% for transLocale in interface.website.configuration.allLocales %} |
{% if stats[entity.name]['units'][transLocale] is defined %}
{{ stats[entity.name]['units'][transLocale] }}/{{ stats[entity.name]['units']['count'][transLocale] }} - {{ stats[entity.name][transLocale]['words'] }} {{ 'mots'|trans }}
{% set percent = stats[entity.name]['units'][transLocale]|percent(stats[entity.name]['units']['count'][transLocale]) %}
{% set color = percent < 100 ? 'danger' : 'success' %}
{% else %}
{{ "Vous devez regénérer des traductions !"|trans }}
{% endif %}
|
{% endfor %}