Description
Symfony version(s) affected: 4.3.5
Description
Cache is not invalidated when you add a new path to translations to config/packages/translation.yaml
How to reproduce
Have a following content in config/packages/translation.yaml
:
framework:
default_locale: cs
translator:
paths:
- '%kernel.project_dir%/src/App/translations'
Add a new path to config/packages/translation.yaml
, so it looks like this:
framework:
default_locale: cs
translator:
paths:
- '%kernel.project_dir%/src/App/translations'
- '%kernel.project_dir%/src/Admin/translations'
- Create
messages.cs.yaml
file in%kernel.project_dir%/src/Admin/translations
- refresh the page
Expected result:
Translations are loaded automatically.
Actual result:
Translations are not loaded until the cache is manually cleared (e.g. by removing var/cache/dev/translations
dir from the filesystem).
New in version 4.3: Starting from Symfony 4.3, when you create a new translation file (or install a bundle that includes translation files), you don't have to clear the cache with the command php bin/console cache:clear as you had to do in previous Symfony versions.
Related issues: