-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support Wildcard *
in dynamic keys
#71
Comments
@muuvmuuv Hey, |
That is what I want to do so it does not show it when I use the /**
* t(FORM.ERROR.*)
*/
getErrors(): void {
// ...
for (const [key, value] of Object.entries(this.control.errors)) {
if (this.config.errors && this.config.errors[key]) {
// ....
} else {
this.errors.push({
type: 'error',
message: marker(`FORM.ERROR.${key.toUpperCase()}`),
value,
})
}
}
} I would like to avoid adding every case into |
@muuvmuuv The issue is that these keys are getting extracted and you don't want them extracted? |
I don't use |
@muuvmuuv a few questions:
|
I would like to reduce the "extra keys" section. |
@muuvmuuv I see what you mean. The thing is that the The correct way to handle this is by adding all those dynamic keys in the supported conventions, as the keys manager expects you to. I'll think about it a little more, but in the meantime, that's the approach I'm suggesting. |
I'm also interested in the ability to mark a section to ignore, as a way to keep a clean "find" report when using dynamic keys that I simply don't want to write a 500 lines comment for. |
A question here: shouldn't the validation part of this project be put on I think more people may have this use case of "I don't want extract, I only want to validate my translation keys" and tbh I thought that the Maybe this separation would put each project to its responsibility and allow this issue to be solved. |
@guilhermetod The detective and the extractor share the same code, they belong in the same repo. |
Is your feature request related to a problem? Please describe.
We have a scope
FORM.ERROR.XXX
and would like to avoid adding every scope here because it would be too difficult to maintain, can we have a wildcard for the last scope so that its ignored?Describe the solution you'd like
A wildcard
*
:FORM.ERROR.*
Describe alternatives you've considered
Something like "ignore scope FORM"
Additional context
Add any other context or screenshots about the feature request here.
Contribution
I would like to make a pull request for this feature:
[ ] Yes! 🚀
[x] Maybe next time – too much todo atm maybe earlier next year
The text was updated successfully, but these errors were encountered: