Add comments for obsolete strings in translations #77549
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 "Obsolete strings now have a comment with an explanation"
Purpose of change
Objects in the game may be declared obsolete, but their text is still extracted into translations and these obsolete strings are hard to distinguish. The only hint is the file path (in the red box).
Describe the solution
Transifex apparently doesn't support syntax for deprecated entries from gettext, so replace the comment (in the green box) with a warning for those strings that only occur in obsoleted files.
obsolet
[e|ion] in it.lang/update_pot.sh
file, you can explicitly specify a substring via a new argument.Describe alternatives you've considered
Remove obsolete strings from translations?
Testing
The translations are extracted successfully, the comment has been replaced only in the right strings.
Comment replaced for a line with an obsolete source:
Comment replaced for a string with multiple obsolete sources:
The string is used somewhere else, the original comment remains:
Additional context