Skip to content

Fix translation loss during catalog updates - #391

Merged
hugovk merged 5 commits into
python-humanize:mainfrom
BenYang12:fix/translation-extraction
Sep 16, 2026
Merged

hugovk merged 5 commits into
python-humanize:mainfrom
BenYang12:fix/translation-extraction

Conversation

@BenYang12

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • Restore extraction of apnumber() words and contextual ordinal() suffixes lost after
    Performance improvements: 1.07x - 8.4x #315, preserving existing translation keys and runtime locale switching.
  • Update the translation script and README to recognize the new contextual no-op marker.
  • Add German and French regression tests covering catalog updates. Both fail on original
    code; the fixed suite passes all 800 tests. Lint, mypy, docs build, and whitespace checks
    pass.

Related: #83 addressed a separate translation-extraction problem.

Additional source doctests expose one unrelated naturaldelta() example failure,
identical before and after this change.

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.69%. Comparing base (e46732e) to head (fd6236b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   99.57%   99.69%   +0.11%     
==========================================
  Files          12       12              
  Lines         944      980      +36     
==========================================
+ Hits          940      977      +37     
+ Misses          4        3       -1     
Flag Coverage Δ
macos-latest 97.55% <97.50%> (+0.09%) ⬆️
ubuntu-latest 97.55% <97.50%> (+0.09%) ⬆️
windows-latest 93.16% <40.00%> (-2.18%) ⬇️

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.

@hugovk hugovk added the changelog: Fixed For any bug fixes label Sep 16, 2026
@hugovk hugovk changed the title fix translation loss during catalog updates Fix translation loss during catalog updates Sep 16, 2026
@hugovk
hugovk enabled auto-merge (squash) September 16, 2026 16:11
@hugovk
hugovk merged commit bada0f8 into python-humanize:main Sep 16, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants