Skip to content

Document locale identifier casing and parsing - #1372

Merged
akx merged 1 commit into
python-babel:masterfrom
himanshu748:docs/locale-identifier-casing
Oct 26, 2026
Merged

akx merged 1 commit into
python-babel:masterfrom
himanshu748:docs/locale-identifier-casing

Conversation

@himanshu748

@himanshu748 himanshu748 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #115.

Document recommended language, territory, script, and variant casing in the locale guide and API. Explain that Locale preserves constructor components while Locale.parse normalizes string identifiers, with mixed-case examples. Numeric territory codes and modifier casing are also covered. No runtime behavior changes.

Validation on Linux / Python 3.12.14 with the project's CLDR 48.2 import:

  • Full suite: 7,831 passed, 7 skipped, 2 xfailed, matching the unchanged baseline.
  • Core/localedata and API doctests: 151 passed, 1 skipped.
  • Guide constructor/parsing examples: 8 passed.
  • All applicable pinned pre-commit hooks, Ruff, and git diff --check passed.
  • Executable Python AST is unchanged after removing docstrings.
  • Strict Sphinx output matches the unchanged baseline's 111 unresolved-reference warnings and 5 pre-existing markup errors. The ordinary warnings-as-errors build has the same 5 markup errors (JavaScript extractor docstring indentation and unresolved targets in dates/dev/messages).

Other Python/OS matrix combinations remain for hosted CI.

Hosted CI and Security workflows currently await maintainer approval.

@akx
akx enabled auto-merge (squash) October 26, 2026 04:25
@codspeed

codspeed Bot commented Oct 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 88 untouched benchmarks


Comparing himanshu748:docs/locale-identifier-casing (e505e8e) with master (e2a1791)

Open in CodSpeed

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (e2a1791) to head (e505e8e).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1372   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          27       27           
  Lines        4922     4922           
=======================================
  Hits         4596     4596           
  Misses        326      326           
Flag Coverage Δ
macos-14-3.10 92.46% <ø> (ø)
macos-14-3.11 92.40% <ø> (ø)
macos-14-3.12 92.60% <ø> (ø)
macos-14-3.13 92.60% <ø> (ø)
macos-14-3.14 92.58% <ø> (ø)
macos-14-3.15 92.58% <ø> (ø)
macos-14-3.8 92.33% <ø> (ø)
macos-14-3.9 92.39% <ø> (ø)
macos-14-pypy3.10 92.46% <ø> (ø)
ubuntu-24.04-3.10 92.48% <ø> (ø)
ubuntu-24.04-3.11 92.42% <ø> (ø)
ubuntu-24.04-3.12 92.62% <ø> (ø)
ubuntu-24.04-3.13 92.62% <ø> (ø)
ubuntu-24.04-3.14 92.60% <ø> (ø)
ubuntu-24.04-3.15 92.60% <ø> (ø)
ubuntu-24.04-3.8 92.35% <ø> (ø)
ubuntu-24.04-3.9 92.41% <ø> (ø)
ubuntu-24.04-pypy3.10 92.48% <ø> (ø)
windows-2022-3.10 92.47% <ø> (ø)
windows-2022-3.11 92.41% <ø> (ø)
windows-2022-3.12 92.61% <ø> (ø)
windows-2022-3.13 92.61% <ø> (ø)
windows-2022-3.14 92.59% <ø> (ø)
windows-2022-3.15 92.59% <ø> (ø)
windows-2022-3.8 92.45% <ø> (ø)
windows-2022-3.9 92.40% <ø> (ø)
windows-2022-pypy3.10 92.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akx
akx merged commit 4438709 into python-babel:master Oct 26, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document if language identifiers in Local are case sensitive

2 participants