Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0
Description: 

Routes, tabs and local tasks can specify their title in their data structure. This title is later on translated in the system. However it was not possible to provide text context for this string, if the meaning of the title is ambiguous. Such as 'Extend' and 'Views' in core are ambigous strings. Translators would not know to translate 'Extend' as in extending with modules or extending time, and translations need to use different words for these.

Now it is possible to provide text context for strings in these places. Use the _title_context key in routes by the side of _title:

example.content
  path: '/example'
  defaults:
    _controller: 'Drupal\example\Controller\ExampleController.php'
    _title: 'Extend'
    _title_context: 'With modules'

Use the title_context key in local tasks and local actions:

example.content:
  title: 'Extend'
  title_context: 'With modules'
  route_name: example.content
  tab_root_id: example.content

This support will need to be added on later to contextual links, but those are just being converted to YAML discovery and plugins.

Impacts: 
Module developers