Skip to content

Preserve literal apostrophes when splitting interval patterns - #1541

Open
lvuping wants to merge 1 commit into
python-babel:masterfrom
lvuping:fix/pattern-literal-apostrophes
Open

lvuping wants to merge 1 commit into
python-babel:masterfrom
lvuping:fix/pattern-literal-apostrophes

Conversation

@lvuping

@lvuping lvuping commented Dec 6, 2026

Copy link
Copy Markdown

Splitting the interval pattern HH''mm – HH''mm turns the escaped apostrophes into single quote delimiters. Formatting 12:30 with the resulting parts then produces just 12 on each side, losing the minutes and separator.

Escape literal apostrophes when reconstructing a pattern even when the literal contains no date fields. The regression test formats both interval endpoints and checks the displayed text.

Ran make test after importing CLDR on Python 3.13 (8,294 passed). Developed with OpenAI Codex.

Copilot AI balanced review requested due to automatic review settings December 6, 2026 00:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

2 participants