function template_preprocess_locale_translation_update_info

Same name and namespace in other branches
  1. 8.9.x core/modules/locale/locale.pages.inc \template_preprocess_locale_translation_update_info()
  2. 10 core/modules/locale/locale.pages.inc \template_preprocess_locale_translation_update_info()
  3. 11.x core/modules/locale/locale.pages.inc \template_preprocess_locale_translation_update_info()

Prepares variables for translation status information templates.

Translation status information is displayed per language.

Default template: locale-translate-edit-form-strings.html.twig.

Parameters

array $variables: An associative array containing:

  • updates: The projects which have updates.
  • not_found: The projects which updates are not found.

See also

\Drupal\locale\Form\TranslationStatusForm

File

core/modules/locale/locale.pages.inc, line 25

Code

function template_preprocess_locale_translation_update_info(array &$variables) {
    foreach ($variables['updates'] as $update) {
        $variables['modules'][] = $update['name'];
    }
}

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