show muted words in NoteDetailed / NoteSub components
This commit is contained in:
parent
7cd1d9ad93
commit
05e5be8218
5 changed files with 191 additions and 10 deletions
|
|
@ -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)}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue