There's one more thing we need in order to generate error messages synchronously. Localization.forLocale is asynchronous because it reads the ftl file with the message templates. We need a way to do this synchronously. Relying on files is problematic for other reasons as well. Bundling is the thing that comes to mind which we'll need for the language server work.
We need to somehow move away from depending on files. We can put the translations in a string that can be imported, but then we loose to ability to use editor tooling for ftl files. It's probably something we'll just need to accept.
There's one more thing we need in order to generate error messages synchronously.
Localization.forLocaleis asynchronous because it reads the ftl file with the message templates. We need a way to do this synchronously. Relying on files is problematic for other reasons as well. Bundling is the thing that comes to mind which we'll need for the language server work.We need to somehow move away from depending on files. We can put the translations in a string that can be imported, but then we loose to ability to use editor tooling for ftl files. It's probably something we'll just need to accept.