You are here

locale-translation-update-info.html.twig in Zircon Profile 8

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.

File

core/modules/locale/templates/locale-translation-update-info.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  16. */
  17. #}
  18. <div class="locale-translation-update__wrapper" tabindex="0" role="button">
  19. <span class="locale-translation-update__prefix visually-hidden">Show description</span>
  20. {% if modules %}
  21. {% set module_list = modules|safe_join(', ') %}
  22. <span class="locale-translation-update__message">{% trans %}Updates for: {{ module_list }}{% endtrans %}</span>
  23. {% elseif not_found %}
  24. <span class="locale-translation-update__message">
  25. {%- trans -%}
  26. Missing translations for one project
  27. {%- plural not_found|length -%}
  28. Missing translations for @count projects
  29. {%- endtrans -%}
  30. </span>
  31. {% endif %}
  32. {% if updates or not_found %}
  33. <div class="locale-translation-update__details">
  34. {% if updates %}
  35. <ul>
  36. {% for update in updates %}
  37. <li>{{ update.name }} ({{ update.timestamp|format_date('html_date') }})</li>
  38. {% endfor %}
  39. </ul>
  40. {% endif %}
  41. {% if not_found %}
  42. {#
  43. Prefix the missing updates list if there is an available updates lists
  44. before it.
  45. #}
  46. {% if updates %}
  47. {{ 'Missing translations for:'|t }}
  48. {% endif %}
  49. {% if not_found %}
  50. <ul>
  51. {% for update in not_found %}
  52. <li>{{ update.name }} ({{ update.version|default('no version'|t) }}). {{ update.info }}</li>
  53. {% endfor %}
  54. </ul>
  55. {% endif %}
  56. {% endif %}
  57. </div>
  58. {% endif %}
  59. </div>

Related topics