Currently in our app, whenever we try to synchronize translations, we get SQL error due to incorrect data types. Turns out whenever an array key is a numeric value in the translations file, the parseTranslation function doesn't work correctly. This is an issue when translating http-statuses:
The above keys would turn into integers which causes issues in the DELETE query for the synchronize action. Rather than fixing that query and having to potentially figure out more queries where this goes wrong, instead this ensures the keys are always strings to begin with, avoiding the issue altogether.
As a small bonus fix, add a missing translation key for the Section in the resource.
Currently in our app, whenever we try to synchronize translations, we get SQL error due to incorrect data types. Turns out whenever an array key is a numeric value in the translations file, the
parseTranslation
function doesn't work correctly. This is an issue when translatinghttp-statuses
:The above keys would turn into integers which causes issues in the DELETE query for the synchronize action. Rather than fixing that query and having to potentially figure out more queries where this goes wrong, instead this ensures the keys are always strings to begin with, avoiding the issue altogether.
As a small bonus fix, add a missing translation key for the
Section
in the resource.