Translations do not end up in cache and used as keys
shanginn opened this issue · 3 comments
It's easier to show on example
repo with reproduction: https://github.com/shanginn/spiral-translator-test
Testing on ru
encoding and the file app/locale/ru/messages.ru.php
.
There are 3 translations:
'string in template' => 'строка в шаблоне',
'string using l' => 'строка используя l',
'string using say' => 'строка через trait и say',
The 'string in template' is used in the template home.dark.php
and during the translation compilation, it gets cached, all good.
The other 2 are used in app/src/Domain/User/Exception/WithLTestException.php
and app/src/Domain/User/Exception/WithSayTestException.php
respectively.
And during the translation compilation using:
php app.php i18n:reset
php app.php i18n:index ru
they do not get cached but appear "as is", i.e., as keys:
// runtime/cache/i18n.ru.php
'string in template' => 'строка в шаблоне',
'string using l' => 'string using l',
'string using say' => 'string using say',
PS
The application skeleton is created with the file app/locale/ru/messages.en.php
which I renamed to app/locale/ru/messages.ru.php
, but even with the old filename, the result is the same.
Additional Info
Q | A |
---|---|
Framework Version | 3.11.1 |
PHP version | 8.3 |
Operating system | MacOS |
@shanginn Hi, could you test the dev version from the master branch? The issue should be fixed.
hi
looks like it works fine on dev-master version 👍