Closed redonkulus closed 4 years ago
Hi 😄 ,
Couple options at the moment I can think of:
1) use objects for the translations keys and include a property for description and translation value like so:
{
"BUY_ME": {
"description": "Button text to buy an item",
"value": "Buy me"
}
}
If you can do this, then you can use the identical-keys
rule to ensure each file has the same key structure (including description
) - all files have to match the key structure to some reference translation file. https://github.com/godaddy/eslint-plugin-i18n-json/#i18n-jsonidentical-keys
2) have a separate module preprocess the translation files then send them to eslint
Would any of these help?
Closing due to no response.
In our translation files, we require translator notes to add proper context for translators. Example:
I’d like the comment to be required for each string. Is this something that this plugin could handle? Or is there a way to provide this functionality be extending this plugin?