show muted words in NoteDetailed / NoteSub components

This commit is contained in:
Hazelnoot 2025-05-10 20:01:26 -04:00
parent 7cd1d9ad93
commit 05e5be8218
5 changed files with 191 additions and 10 deletions

View file

@ -59,6 +59,7 @@ export class I18n<T extends ILocale> {
if (typeof value === 'string') {
const parameters = Array.from(value.matchAll(/\{(\w+)\}/g), ([, parameter]) => parameter);
// TODO add a flag to suppress this warning from uses of <I18n> component
if (parameters.length) {
console.error(`Missing locale parameters: ${parameters.join(', ')} at ${String(p)}`);
}