locale-translation-update-info.html.twig

Same filename in this branch
  1. 8.9.x core/themes/stable/templates/admin/locale-translation-update-info.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/admin/locale-translation-update-info.html.twig
  2. 9 core/themes/stable/templates/admin/locale-translation-update-info.html.twig
  3. 9 core/modules/locale/templates/locale-translation-update-info.html.twig
  4. 10 core/themes/stable9/templates/admin/locale-translation-update-info.html.twig
  5. 10 core/modules/locale/templates/locale-translation-update-info.html.twig
  6. 11.x core/themes/stable9/templates/admin/locale-translation-update-info.html.twig
  7. 11.x core/modules/locale/templates/locale-translation-update-info.html.twig

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 also

template_preprocess_locale_translation_update_info()

1 theme call to locale-translation-update-info.html.twig
TranslationStatusForm::buildForm in core/modules/locale/src/Form/TranslationStatusForm.php
Form builder for displaying the current translation status.

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


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.