-
Notifications
You must be signed in to change notification settings - Fork 52
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 for ignore some 'unused' keys #22
Comments
Hey @Gotusso |
Sorry, I'm not sure about what do you mean with "update" keys. My use case is more o less this: Javascript: // Get some value from the server
var backendValue = 'bar';
// Get the translation and use it somewhere
$translate('foo.' + backendValue).then(function(value) {
// ...
});
// 'fo' is a typo
$translate('fo.' + backendValue).then(function(value) {
// ...
}); JSON before running the grunt task: {
"foo": {
"bar": "Hello world!"
},
"bar": {
"baz": "Unused translation"
}
} Expected JSON after running the grunt task: {
"foo": {
"bar": "Hello world!"
}
} So I'm thinking about a configuration like this: {
namespace: true,
safeMode: false,
keepExtra: [
'foo.**'
]
} And with that, the task could know that it must keep everything inside foo translations and work as usual for the rest. |
If I well understand, you want ignore some pattern key to be able to write them down manually ? |
Exactly |
Okay @Gotusso i'll try to do the job |
Thanks! |
In our project sometimes we need to generate translation keys by concatenating strings.
If we don't use the option 'safeMode', those keys are removed.
The problem is that if we use it, those keys remains untouched but the unused keys (generated by typos or just not used) are not removed.
It would be really nice to have an option to avoid the removal of the 'unused' keys from a specific module, while keeping the behavior for the remaining modules untouched.
The text was updated successfully, but these errors were encountered: