{% 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 %}
{% if searchForm %} {% include 'admin/core/form/index-search-form.html.twig' with {'form': searchForm} %} {% endif %}
{% include 'admin/include/stripe-preloader.html.twig' with {'preloaderId': 'index-preloader'} only %} {% for transLocale in allLocales %} {% endfor %} {% for entity in pagination %} {% set name = 'singular'|trans([], entity.name) and 'singular'|trans([], entity.name) != 'singular' ? 'singular'|trans([], entity.name) : entity.adminName %} {% if name != '_undefined' %} {% for transLocale in interface.website.configuration.allLocales %} {% endfor %} {% endif %} {% endfor %}
{{ "Groupe"|trans }} {% if allLocales|length > 1 %} {% endif %} {% if stats[transLocale] is defined %} {{ stats[transLocale]['words'] }} {{ "mots"|trans }} {% endif %}
{{ name }} {% if is_granted('ROLE_INTERNAL') %} {% if entity.forTranslator %} {% endif %} {% if entity.extract %} {% endif %} {% endif %}
{% if is_granted('ROLE_INTERNAL') %} {% endif %} {% if is_granted('ROLE_INTERNAL') %} {% endif %}
{% 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 %}
{% include 'admin/core/include/pagination.html.twig' %}
{% endif %} {% endblock %}