By herom on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x-3.x
Issue links:
Description:
The original Yaml translations patterns format wasn't extensible, and has already accumulated multiple hacks to support all possible patterns, and has been blocking further work/features.
So, a new format is introduced, which is more extensible, but a bit more verbose. Here are the main changes:
- All patterns have been moved into a top-level
translation_patternskey. - For each pattern, the file match regex has been moved to a
matcheskey. - The list of translatable keys for each pattern are moved into a
translatable_keyskey.
Before:
*.info.yml:
- name
- description
- package
- regions
*.routing.yml:
- _title:
context: _title_context
After:
translation_patterns:
- matches: '*.info.yml'
translatable_keys:
- name
- description
- package
- regions
- matches: '*.routing.yml'
translatable_keys:
- key: _title
context: _title_context
Impacts:
Module developers