[Feature Request] A tool for finding missing keys
Maybe somebody would like to implement this in future?
Discussed in https://github.com/aralroca/next-translate/discussions/1003
Originally posted by rusted-love March 11, 2023 Is there a tool that validates a key for each language presented ? For example, runtime warning logs may not be produced because translation is used in modal dialog. Missing translation cannot be done without some kind of unit testing. Command-line tool would prevent such kind of bugs.
I have seen how missing keys extractor implemented in lingui , it would be amazing to have something similar in next-translate.
You can use logger in the configuration to log the missing keys or integrate it there with some tool
You can use
loggerin the configuration to log the missing keys or integrate it there with some tool
It does not see missing keys in modal dialogs because they are not active.
+ there is no tool that finds missing keys across locales folder.
Solution can be less complex that "integrated unit tests that finds a missing keys by simulating application runtime".
Ok @rusted-love make sense, we can keep this issue open. Feel free to contribute to this 👍
Can we do something like this?
type Messages = typeof import('./messages/en.json');
declare interface IntlMessages extends Messages {}