cambiatus / frontend

Cambiatus Web based frontend using Elm
https://app.cambiatus.io
GNU Affero General Public License v3.0
24 stars 15 forks source link

Validate translation files #765

Open henriquecbuss opened 2 years ago

henriquecbuss commented 2 years ago

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:

Additional 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

lucca65 commented 2 years ago

generating elm files from non-elm files to use them with elm-review

Smart stuff!

henriquecbuss commented 2 years ago

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!

lucca65 commented 2 years ago

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