#9988 closed (fixed)
Make it possible to handle translation contexts
Reported by: | Stephane Raimbault | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | french i18n-nofix | |
Cc: | claude@…, s.kuzmenko@…, bronger@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The file utils/date.py contains the following strings:
MONTHS = {
1:_('January'), 2:_('February'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'),
7:_('July'), 8:_('August'), 9:_('September'), 10:_('October'), 11:_('November'),
12:_('December')
}
MONTHS_AP = { # month names in Associated Press style
1:_('Jan.'), 2:_('Feb.'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'), 7:_('July'),
8:_('Aug.'), 9:_('Sept.'), 10:_('Oct.'), 11:_('Nov.'), 12:_('Dec.')
}
so there is only one string for 'July' in the PO file and it's not possible to have a contextual translation.
For example, in French, the first translation is 'Juillet' and the second one for AP is 'Juil.'.
The solution depends on http://bugs.python.org/issue2504
Attachments (3)
Change History (20)
comment:1 by , 16 years ago
Component: | Translations → Internationalization |
---|
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 15 years ago
Keywords: | i18n-nofix added |
---|
comment:4 by , 15 years ago
comment:5 by , 15 years ago
Summary: | It's not possible to correctly translate the months → Make it possible to handle translation contexts |
---|
See related django-i18n thread.
comment:6 by , 14 years ago
Triage Stage: | Design decision needed → Accepted |
---|
comment:7 by , 14 years ago
milestone: | → 1.3 |
---|
comment:8 by , 14 years ago
I just attached a patch to implement pgettext for Django (same patch uploaded on #11686). This would be the foundation needed to resolve this issue.
comment:9 by , 14 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:10 by , 14 years ago
Cc: | added |
---|
comment:11 by , 14 years ago
Note that Catalan translations will have to be updated after the MONTHS_AP patch so as regressiontests.i18n.tests.FormattingTests still pass successfully.
comment:12 by , 14 years ago
Cc: | added |
---|
comment:13 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:14 by , 14 years ago
comment:15 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'm reopening the ticket, because the latest patch which fixes the main issue of the original ticket is still not committed.
comment:16 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
[12296] is a first step in this direction.