Add Haitian Creole (ht) language support locale - #1375
speedyk-005 wants to merge 17 commits into
Conversation
|
Does CLDR track Haitian Creole? If so, maybe we can get most of this data from there, like we do for most languages, instead of through custom data. |
|
@AdrianAtZyte the CLDR repo contains a Haitian Creole locale (language code "ht"), but the current ht files in common/main do not include the usual date/time data (month/day names and date format patterns), so full date localization is not present in those files. |
|
|
Thanks for the review, @AdrianAtZyte! I'll update them accordingly. Quick note: en and de are actual Haitian Creole words used for counting (en [1], de [2], twa [3]... dis [10]), and e is also used to mean 'and'. |
|
All points are handled, plus one thing that fell out of re-running the data script.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1375 +/- ##
==========================================
- Coverage 97.18% 97.18% -0.01%
==========================================
Files 236 237 +1
Lines 3059 3058 -1
==========================================
- Hits 2973 2972 -1
Misses 86 86 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hey, any idea why the CI failed? Was it because of my changes? Let me know! |
Seems so. Can you not reproduce this issues locally? |
|
Thanks! Fixed now!! The CLDR 44.1 refresh regenerated language_locale_dict, silently dropping en-US and the ff-CM/ff-GN/ff-MR locale codes, so the loader's _isvalidlocale rejected them and the affected tests (test_loading, ff tests in test_clean_api) failed. |
|
Please, run pre-commit run --all-files. |
|
Done! |
|
|
Done!! As for "ane sa", it is more natural than "nan ane sa" |
|
|
My bad!! I'll fix them. |
|
The language_info.py is already reverted, maybe you were seeing an old commit. See: https://github.com/scrapinghub/dateparser/pull/1375/changes |
fff9429 to
6882682
Compare
|
Done! I mirror m shorthand and add un-prefixed mwa sa in ht in 6882682 |
|
|
Done!! |
Summary
Adds Haitian Creole ("ht") support to dateparser, including absolute dates (months, weekdays, numeric formats) and relative/freshness expressions.
Haitian Creole is spoken by more than 11 million people, and this adds it to the list of supported languages.
I am a native Haitian Creole speaker and validated the translations against native usage.
Sources checked for correctness:
Changes
Testing