Ticket #9988: months_ap_pgettext.patch

File months_ap_pgettext.patch, 1.3 KB (added by claudep, 4 years ago)

Add context to MONTHS_AP dict strings

  • django/utils/dates.py

     
    11"Commonly-used date structures"
    22
    3 from django.utils.translation import ugettext_lazy as _
     3from django.utils.translation import ugettext_lazy as _, pgettext_lazy
    44
    55WEEKDAYS = {
    66    0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
     
    2828    'sep':9, 'oct':10, 'nov':11, 'dec':12
    2929}
    3030MONTHS_AP = { # month names in Associated Press style
    31     1:_('Jan.'), 2:_('Feb.'), 3:_('March'), 4:_('April'), 5:_('May'), 6:_('June'), 7:_('July'),
    32     8:_('Aug.'), 9:_('Sept.'), 10:_('Oct.'), 11:_('Nov.'), 12:_('Dec.')
     31    1: pgettext_lazy('abrev. month', 'Jan.'),  2: pgettext_lazy('abrev. month', 'Feb.'),
     32    3: pgettext_lazy('abrev. month', 'March'), 4: pgettext_lazy('abrev. month', 'April'),
     33    5: pgettext_lazy('abrev. month', 'May'),   6: pgettext_lazy('abrev. month', 'June'),
     34    7: pgettext_lazy('abrev. month', 'July'),  8: pgettext_lazy('abrev. month', 'Aug.'),
     35    9: pgettext_lazy('abrev. month', 'Sept.'), 10: pgettext_lazy('abrev. month', 'Oct.'),
     36    11: pgettext_lazy('abrev. month', 'Nov.'), 12: pgettext_lazy('abrev. month', 'Dec.')
    3337}
Back to Top