Fix missing translator comment warning for split translatable strings#11093
Merged
Conversation
…slatable strings - Ensured `checkPot` does not mistake a lengthy `msgid` with the POT file header - Added 5 additional known messages without translators comment with reference to their location in the source - Added 1 missing translators comment - Linted 25 existing translators comment so that they now properly land in the POT file
feerrenrut
reviewed
May 4, 2020
| 'Primary header', | ||
| 'Text frame', | ||
| # core.py:87 | ||
| r'Your gesture map file contains errors.\n"More details about the errors can be found in the log file."', |
Contributor
There was a problem hiding this comment.
Could you create an issue for these missing translator comment strings? This could be fairly straightforward work for a new contributor.
Contributor
Author
There was a problem hiding this comment.
Done: #11104
Could you please add the label "goodForNewDev"?
(Or allow me to label issues...)
feerrenrut
reviewed
May 4, 2020
feerrenrut
approved these changes
May 4, 2020
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
Thanks @JulienCochuyt
JulienCochuyt
added a commit
to accessolutions/nvda
that referenced
this pull request
May 19, 2020
feerrenrut
pushed a commit
that referenced
this pull request
Jun 3, 2020
PR #10941 brought to light flaws in checkPot regarding handling of long messages - fixed by PR #11093 In #11093 (comment) the creation of unit tests was discussed to help limit occurrence of future regressions. Discussion: #11093 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to issue number:
Fix-up of PR #7492
Found thanks to PR #10941
Fixes #11071
Follow-up of PR #11092
Summary of the issue:
When
xgettextextracts lengthy translatable strings, it starts its entry in the POT file withcheckPotmisinterpret this as the header line and thus triggers no error for missing translators comment for this message.Description of how this pull request fixes the issue:
checkPotdoes not mistake a lengthymsgidwith the POT file headerTesting performed:
Ran
scons checkPotwith its sole fix.Result: 31 errors
Addressed the 31 errors as detailed above.
Ran
scons checkPotagain.Result: 0 errors
Manually checked in the POT file some of the previously reported errors and ensured their translators comment has indeed been copied.
Finally, ran
scons tests, built a local launcher and checked in the GUI that some of the 31 incriminated messages were still translated as expected.Known issues with pull request:
Change log entry:
I don't think this deserves a change log entry.