Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
demiankatz
left a comment
There was a problem hiding this comment.
I haven't had a chance for a full review yet, but see below for one idea that might help make this more future-proof.
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @404mike -- I took a closer look at the rest of this. See below for a couple more thoughts.
Also, should we wire this up in the "scripts" section of package.json, so it can be executed with npm run? That might help make it more visible as an option for people new to the project.
|
@demiankatz thank you for the feedback. I've updated the script to cover all the feedback so far. I've also renamed a few things to hopefully make things a bit more clear as to what they do? The latest change includes the ability to run the different tests from npm: |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @LlGC-mij for the progress here. See below for a few finishing touches (and feel free to modify or ignore my naming suggestions if you don't like them).
|
Thank you @demiankatz. Both @404mike and I are the same person 😆 (I forgot to update my keys!). I'm happy to look at fixing any issues found by the tool. I'll take a look next week. |
|
Ha, thanks, @LlGC-mij. You and yourself make an excellent team. ;-) |
A script to validate locales within the UV.
Using English as the primary language the script can be run on two tasks.
Checking for unused locales
Check if the locale is used anywhere within the UV modules?
Will produce:
This works by loading the English locale file and checking each of the module configs for any usage, incrementing the usage through each iteration.
The script doesn't check any .tsx files.
Check for missing locales
Does the English locale contain strings that are missing from the other locales?
Will produce:
All outputs above were ran against main branch.