Opened 3 weeks ago
Last modified 3 weeks ago
#36679 assigned Bug
Basque locale date format does not handle conditional suffixes (date declination)
| Reported by: | uloidi | Owned by: | uloidi |
|---|---|---|---|
| Component: | Internationalization | Version: | 5.2 |
| Severity: | Normal | Keywords: | translation |
| Cc: | Claude Paroz, Mike Edmunds | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
Hello,
The Basque date declination grammar requires some logic but we can't introduce due to the software design.
Here is a clear example of the problem:
Current Django Output: 2025ko urriaren 11a
Correct Grammatical Form: 2025eko urriaren 11
There are two errors here based on conditional rules:
Year Suffix: It should be 2025eko. The suffix changes based on the last sound of the year number. Years ending in a consonant sound (like 2025, bost) must use -eko, while the current output -ko is for years ending in a vowel (like 2024, lau).
Day Article: It should be 11. The -a article should not be added to numbers that already end in the vowel ‘a’. The number 11 in Basque is hamaika, so adding another -a (hamaika-a) is grammatically wrong.
My proposal is to change the Basque (eu) date template with "(e)ko" instead of "ko" in the year suffix and "(a)" instead of "a" in the day suffix
Change History (6)
comment:1 by , 3 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 3 weeks ago
| Has patch: | set |
|---|
comment:3 by , 3 weeks ago
| Triage Stage: | Accepted → Unreviewed |
|---|
comment:4 by , 3 weeks ago
| Cc: | added |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Cleanup/optimization → Bug |
Hello uloidi, thank you for taking the time to create the report and for the clear explanation about the issue.
I'll cc more people in this ticket so they can advice on the matter, ideally we'd need at least one more Basque-speaker to validate the proposal. I've mentioned the former author of the Basque locale fixes in your PR.
[EDIT] I see you posted in the forum about this? For reference to future readers: https://forum.djangoproject.com/t/basque-date-declination/43205/2
With the research there done by Mike (thank you!!!), I think this ticket can be accepted.
uloidi, to proceed with this change, the PR should be re-targeted to main, since this is not a change we can backport to 5.2 per our backporting policy.
comment:5 by , 3 weeks ago
| Summary: | Basque date declination → Basque locale date format does not handle conditional suffixes (date declination) |
|---|
comment:6 by , 3 weeks ago
I guess that at this stage, we'd need to see some POC code that would show how language-specific logic could be injected into django.utils.dateformat.DateFormat/TimeFormat classes, without two much performance regressions.
https://github.com/django/django/pull/19988