Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n-json/valid-message-syntax: Add possibility to allow Arrays #54

Open
Taucher2003 opened this issue May 29, 2022 · 0 comments
Open

Comments

@Taucher2003
Copy link

Currently it is hardcoded that Arrays can't be a valid translation. However, based on the setup, there are some legitimate usages of Arrays and this is blocking it for no reason.

} else if (Array.isArray(value)) {
invalidMessages.push({
value: ARRAY,
key,
path,
error: new TypeError('An Array cannot be a translation value.')
});
} else {

The problem is, that we can't bypass this check with a custom validator which would allow Arrays for some specific keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant