Marking strings as untranslatable #76198
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I18N "Omit unnecessary lines from translations"
Purpose of change
Translation files contain many strings that are usually not visible to the player and do not make sense to translate.
Describe the solution
Make it possible to specify a "flag" for the string extractor in the comment for translators:
The extractor will skip such marked strings.
Describe alternatives you've considered
This
//~
comment for the translators must be inside a text object and be a string. But overall, it is a universal and simple solution, I don't think doing it any other way would be worth it.Testing
For now (not in this PR) I've added these flags to vanilla game spells and monster's pseudo guns. 96967 vs 96680 = -287 strings in .pot file. There should be more after the mods.
Diff file between these two translation files: pot.txt.
Additional context