Better cs translation#1325
Merged
AdrianAtZyte merged 6 commits intoMay 7, 2026
Merged
Conversation
…ications to relative-type.
Comment on lines
-27
to
-29
| july: | ||
| - Črc | ||
| - črv |
Contributor
There was a problem hiding this comment.
Was this accidental? I wonder if we should keep črc.
Contributor
Author
There was a problem hiding this comment.
Yes it was, although I have never saw anyone using this variant. Should I put it back?
Contributor
There was a problem hiding this comment.
Now črv seems to be gone instead.
AdrianAtZyte
approved these changes
Apr 29, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1325 +/- ##
==========================================
+ Coverage 97.08% 97.10% +0.02%
==========================================
Files 235 235
Lines 2877 2904 +27
==========================================
+ Hits 2793 2820 +27
Misses 84 84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Could you check the 2 test issues? |
…ury to relative-type-regex - Fix broken simplification regex: '(?<=(za|před)\s)vteřin(u|ou)|sekund(u|ou)\b' had incorrect operator precedence — the second alternative 'sekund(u|ou)\b' matched unconditionally (no lookbehind), transforming e.g. 'před 45 sekundou' into '45 1 sekundu'. Wrapped both alternatives in a non-capturing group so the lookbehind applies to both. - Move \1 decade ago / in \1 decade / \1 century ago / in \1 century entries from relative-type to relative-type-regex in both cs.py and cs.yaml. These entries contain regex patterns (\d+[.,]?\d*); placing them in relative-type caused their literal text (including '?', '[', ']') to be indexed as wordchars, making '?' unique to Czech and causing Spanish text detection to fail.
serhii73
approved these changes
May 7, 2026
The expected translation for 'prvního ledna 2021 v půl šesté' had a double space before the time component. Since 'v' is in the Czech skip list, it is removed without leaving an extra space, so the correct expected value is '1. january 2021 5:30' (single space).
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves Czech language parsing in dateparser.
I updated cs.yaml by adding additional word forms, grammatical cases, and synonyms.
It also introduces support for Czech cardinal and ordinal numbers (including inflected forms), adds Czech variants for AM/PM, and enables parsing of expressions like "půl druhé" (1:30).
Notes: