New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly cache Contao translations that only exist as Symfony translations #6889
Correctly cache Contao translations that only exist as Symfony translations #6889
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to create an empty cache file so that we do not search for language files here?
contao/core-bundle/contao/library/Contao/System.php
Lines 474 to 480 in 4034b23
// Try to load from cache | |
if (file_exists($strCacheDir . '/contao/languages/' . $strCreateLang . '/' . $strName . '.php')) | |
{ | |
include $strCacheDir . '/contao/languages/' . $strCreateLang . '/' . $strName . '.php'; | |
} | |
else | |
{ |
True. I think we can change the logic of the |
The addition of if (!str_starts_with($domain, 'contao_')) {
continue;
} is actually another bugfix. There was no check previously and thus bogus Contao language cache files were created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually tested this in my project, seems to do the job 👍
Thank you @fritzmg. |
Fixes #6741