The messages linting script should be able to check dynamically generated messages
Observed behavior (please include a screenshot if possible)
In the following code, the messages are dynamically generated. Unfortunately, the message linting script only generates warnings for these items. This recently led to an uncaught message definition problem (#418) that made its way into dev.
{ACCESS_TYPES.map(a => (
<OptionButton
active={settings.access === a.type}
key={a.type}
onClick={this.setAccess}
value={a.type}>
{this.messages(`project.${a.message}`)}
</OptionButton>
))}
Expected behavior
My proposed solution is to have the linting script check for a comment at the end of the line that has a list of all possible message combinations and then make sure all of those are defined in the messages file. This wouldn't guarantee that some dynamically generated messages would still fail to resolve to something, but would've prevented #418.
This wouldn't require much refactoring as there are only 12 places where dynamically generated messages are used in the app.
Steps to reproduce the problem
Run messages linting script.
Any special notes on configuration used
n/a
Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)
dev branch