Skip to content

Conversation

@SaschaCowley
Copy link
Member

No description provided.

github-actions bot and others added 2 commits December 1, 2025 13:16
This pull request updates translations to languages being tracked from
Crowdin.

Co-authored-by: GitHub Actions <>
Fixes #18982

### Summary of the issue:
Markdown files for our documentation may sometimes contain special
markdown linter comments, which are incorrectly being included in
content to translate, and in some cases breaking detection of markdown
entities such as table rows.
For example in userguide.md we have:
```
|None |`--enable-start-on-logon=True|False` |When installing, enable NVDA's [Use NVDA during Windows sign-in](#StartAtWindowsLogon)| <!-- markdownlint-disable-line MD055 MD056 -->
```

This produces a translation unit such as:
```
<unit id="ab362c58-1f2e-4bbc-99aa-85bd37b39689">
<notes>
<note appliesTo="source">line: 5978</note>
</notes>
<segment>
<source>|None |`--enable-start-on-logon=True|False` |When installing, enable NVDA's [Use NVDA during Windows sign-in](#StartAtWindowsLogon)| &lt;!-- markdownlint-disable-line MD055 MD056 --&gt;</source>
</segment>
</unit>
```

* The source string incorrectly contains the markdown linter comment.
* The source string has not been correctly processed as a table row (the
start and end vertical bars are still present)
* There is no prefix and suffix (containing the vertical bars) in the
notes.

### Description of user facing changes:
None.

### Description of developer facing changes:
None.

### Description of development approach:
In markdownTranslate.py:
* add a regular expression to match these markdown comments.
* Add a preprocessMarkdownLines function, which runs this regex on all
lines.
* All places that read in a markdown file now preprocess all lines with
preprocessMarkdownLines, such as generateSkeleton, updateSkeleton,
generateXliff, and ensureMarkdownFilesMatch.

English auto generated userguide xliff:
* manually remove the translation unit that incorrectly contains the
markdown linter comment, and also remove its line from the skeleton. The
next time that userGuide.md is changed, this translation unit will
automatically be replaced with the correct content.

### Testing strategy:
* ran `markdownTranslate.py generateXliff -m userguide.md -o
test_generated.xliff` and ensured that the translation unit in
test_generated.xliff for that table row no longer contains the markdown
linter comment.
* ran `markdownTranslate.py updateXliff -x userguide.xliff -m
userGuide.md -o test_updated.xliff`
* again ensured that the translation unit for that table row no longer
contained the markdown linter comment.
* generated a unified diff of userguide.xliff and test_updated.xliff,
and ensured that the only change was the addition of the corrected
translation unit, and the replacement of the related line in the
skeleton content with the new translation ID for that unit, now with the
leading and trailing vertical bars previously missing.

### Known issues with pull request:
None known.
@SaschaCowley SaschaCowley requested a review from a team as a code owner December 2, 2025 03:16
@SaschaCowley SaschaCowley requested a review from seanbudd December 2, 2025 03:16
@SaschaCowley SaschaCowley merged commit 1f162b2 into master Dec 2, 2025
43 of 45 checks passed
@github-actions github-actions bot added this to the 2026.1 milestone Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants