Started using Antl provider on my app… It seams like it doesnt work as I expected
First thing, I think I found an issue…
If Antl provider is added inside start/app then initial migrations are impossible to run due to error:
Error: ER_NO_SUCH_TABLE: Table 'starter.locales' doesn't exist
It seams like ace is for some reason checking locales table before running migrations… You can test this yourself by creating new adonis app, installing antl and running migration:run.
Second… It seams like antl is unable to translate locales that are added while app is running.
So for example… I have translated string in english for responses.something, but I don’t have the same for german (de). While application is running, I’m creating new row to locales database with de translation for responses.something. When antl.formatMessage for de is called it will throw an error:
A message must be provided as a String or AST.
There are also few errors with Http request locale returning * as locale, but I think this is due to my code… So I’ll comment about it after I find out what exactly is happening.