Prevent community mods from warning on unused translations in the common assets
Currently when linting translations, we check for any unused translation keys. This works fine for the default mods, which own the entire sets of translation files. For community mods, they often import the translation files from the common mod assets, but they may only use some of the translations provided. Currently, they would get warnings about not using translations from the common files they have imported. Since the community mods don't own those translations, getting warnings about it is annoying. To solve this issue, introduce a AllowUnusedTranslationsInExternalPackages in the mod.yaml which defaults to true. This will prevent reporting of unused translation keys from external assets. Keys that are used for external assets will still be validated, and keys from the mod assets will be both validated and unused keys will be reported. We default the new flag to true and don't provide an update rule. This means community mods will get the new behaviour. For the default mods, we do want to check the "external" assets, since we control those assets. So the default mods have their mod.yaml updated to disable the flag and retain the existing behaviour of checking everything.
This commit is contained in:
@@ -191,6 +191,8 @@ Translations:
|
||||
ts|languages/chrome/en.ftl
|
||||
ts|languages/rules/en.ftl
|
||||
|
||||
AllowUnusedTranslationsInExternalPackages: false
|
||||
|
||||
Voices:
|
||||
ts|audio/voices.yaml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user