You are here

locale-translation-update-info.html.twig in Drupal 10

Theme override 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.

File

core/themes/stable/templates/admin/locale-translation-update-info.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for displaying translation status information.
  5. *
  6. * Displays translation status information per language.
  7. *
  8. * Available variables:
  9. * - modules: A list of modules names that have available translation updates.
  10. * - updates: A list of available translation updates.
  11. * - not_found: A list of modules missing translation updates.
  12. *
  13. * @see template_preprocess_locale_translation_update_info()
  14. */
  15. #}
  16. <div class="locale-translation-update__wrapper" tabindex="0" role="button">
  17. <span class="locale-translation-update__prefix visually-hidden">Show description</span>
  18. {% if modules %}
  19. {% set module_list = modules|safe_join(', ') %}
  20. <span class="locale-translation-update__message">{% trans %}Updates for: {{ module_list }}{% endtrans %}</span>
  21. {% elseif not_found %}
  22. <span class="locale-translation-update__message">
  23. {%- trans -%}
  24. Missing translations for one project
  25. {%- plural not_found|length -%}
  26. Missing translations for @count projects
  27. {%- endtrans -%}
  28. </span>
  29. {% endif %}
  30. {% if updates or not_found %}
  31. <div class="locale-translation-update__details">
  32. {% if updates %}
  33. <ul>
  34. {% for update in updates %}
  35. <li>{{ update.name }} ({{ update.timestamp|format_date('html_date') }})</li>
  36. {% endfor %}
  37. </ul>
  38. {% endif %}
  39. {% if not_found %}
  40. {#
  41. Prefix the missing updates list if there is an available updates lists
  42. before it.
  43. #}
  44. {% if updates %}
  45. {{ 'Missing translations for:'|t }}
  46. {% endif %}
  47. {% if not_found %}
  48. <ul>
  49. {% for update in not_found %}
  50. <li>{{ update.name }} ({{ update.version|default('no version'|t) }}). {{ update.info }}</li>
  51. {% endfor %}
  52. </ul>
  53. {% endif %}
  54. {% endif %}
  55. </div>
  56. {% endif %}
  57. </div>