Skip to content

Conversation

@nijel
Copy link
Member

@nijel nijel commented Jan 7, 2026

Starting translation with a list marker will make docutils treat it as list what will either look weird or break the build.

@nijel nijel added this to the 5.15.2 milestone Jan 7, 2026
@nijel nijel requested a review from Copilot January 7, 2026 07:59
@nijel nijel self-assigned this Jan 7, 2026
@nijel nijel requested a review from AliceVisek as a code owner January 7, 2026 07:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds detection for unintended list conversion in reStructuredText translations. When a translation starts with a list marker (like * or -) but the source text doesn't, it can cause the text to be rendered as a list item, which may break the document structure or render incorrectly.

  • Adds a new check in RSTSyntaxCheck to detect when translations inappropriately start with list markers
  • Includes comprehensive test coverage for the new list marker detection
  • Fixes an existing issue in Japanese documentation where a list marker was incorrectly added

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
weblate/checks/markup.py Adds list marker detection logic to RSTSyntaxCheck.check_single() and changes return type of validate_rst_snippet() from list to tuple for better caching
weblate/checks/tests/test_markup_checks.py Adds test_list() method with multiple test cases covering both valid and invalid list marker scenarios
docs/locales/ja/LC_MESSAGES/docs.po Fixes a real-world example by removing an incorrectly added list marker from the Japanese translation
docs/changes.rst Documents the new feature in the changelog for version 5.15.2

Starting translation with a list marker will make docutils treat it as
list what will either look weird or break the build.
@nijel nijel enabled auto-merge (rebase) January 7, 2026 08:08
@nijel nijel disabled auto-merge January 7, 2026 08:44
@nijel nijel merged commit be0530a into WeblateOrg:main Jan 7, 2026
49 of 50 checks passed
@nijel nijel deleted the rst-list branch January 7, 2026 08:44
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.

1 participant