Support Romanian ordinal formatting#331
Conversation
|
I do not have permission to add labels on this repository. This should use the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
=======================================
Coverage 99.55% 99.55%
=======================================
Files 12 12
Lines 900 905 +5
=======================================
+ Hits 896 901 +5
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 20.68%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_ordinal |
51 µs | 64.3 µs | -20.68% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing lin-hongkuan:codex/romanian-ordinal-format (78bbb13) with main (976484a)
| ordinal_format = P_(f"ordinal value {value} ({gender})", _ORDINAL_VALUE) | ||
| if ordinal_format == _ORDINAL_VALUE: | ||
| suffix = P_(f"{digit} ({gender})", _ORDINAL_SUFFIXES[digit]) | ||
| ordinal_format = P_(f"ordinal {digit} ({gender})", f"{_ORDINAL_VALUE}{suffix}") | ||
| return ordinal_format % {"value": value} |
There was a problem hiding this comment.
Could you explain a bit how this works? Any special instructions for the translator?
There was a problem hiding this comment.
This file only translates src/humanize/number.py, and not the other files. Is that intentional?
Fixes #270
Changes proposed in this pull request:
1forms and numeric forms such as21/23.Validation:
bash scripts/generate-translation-binaries.shpython -m pytest -q(776 passed)python -m ruff check .python -m ruff format --check .