Open henriquecbuss opened 2 years ago
generating elm files from non-elm files to use them with elm-review
Smart stuff!
Mathew Griffith just released an awesome Elm code generation tool: https://package.elm-lang.org/packages/mdgriffith/elm-codegen/latest/. Maybe we could use it to solve this!
amazing! this might be a good opportunity to work this issue, since we are almost done with categories and orders will still take a while
What we have We have a few JSON files we use to translate text into English, Portuguese, Spanish, etc.
These files are all of different lengths, which means some files have missing keys. We also don't really know which keys are still in use and which keys aren't being used anymore.
Proposal Check that all of the files have the same keys and that they're all in sync with each other. While we're at it, we can even remove unused keys and validate that all of our texts are being properly translated.
Why
How We can use elm-review for this!
For this particular case, we could do something like this:
Html.text
call, check if it uses a key from that dict. We need to remember which keys have been usedAdditional context We have already talked about this before (we even have a pinned message on the #devs channel on Slack about this), but recently I was listening to Elm Radio where jfmengels talked about generating elm files from non-elm files to use them with elm-review