I think that alt.month Month translations were created to help in this
kind of situations (https://github.com/django/django/commit/2478f8588e) so
this issue can be solved by a combination of a Catalan formats.py patch
(django/conf/locale/ca/formats.py) and changing that translations (via
Transifex).
Actual:
DATE_FORMAT = r"j \d\e F \d\e Y"
msgid "January"
msgstr "enero"
msgid "April"
msgstr "abril"
{item.date | date} output -> 25 de enero de 2007
{item.date | date} output -> 4 de abril de 2014 ---> THIS IS WRONG
Proposal:
DATE_FORMAT = r"j E \d\e Y" # E placeholder: alt. month translations for
special cases.
msgctxt "alt. month"
msgid "January"
msgstr "de enero"
msgctxt "alt. month"
msgid "April"
msgstr "d'abril"
{item.date | date} output -> 25 de enero de 2007
{item.date | date} output -> 4 d'abril de 2014
I'm trying to reach Catalan Transifex Team to add those strings, I think
.po/.mo files won't follow the usual pull request way, but they must be
changed before this file gets patched.
Alternative month representation is available since this
https://code.djangoproject.com/ticket/12309#no1
--
Ticket URL: <https://code.djangoproject.com/ticket/33661>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "patch.patch" added.
patch file for formats.py
* owner: nobody => mpachas
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:1>
* Attachment "patch.diff" added.
patch with .diff extension
--
Ticket URL: <https://code.djangoproject.com/ticket/33661>
* stage: Unreviewed => Accepted
Comment:
Hi, thanks for the report.
>… it is wrong when the month name starts with vowel like abril (April),
agost (August) or octubre (October). In that case it should be d'abril,
d'agost or d'octubre.
Yep, OK.
Let's accept; without reviewing fully, your explanation that we need to
update the formats sounds likely.
Are you able to open a PR on GitHub with your patch?
https://github.com/django/django/pulls
Moltes gràcies!
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:2>
* cc: Carlton Gibson (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:3>
Comment (by mpachas):
Replying to [comment:3 Carlton Gibson]:
I will open a PR as soon as we update django.po and django.mo for Catalan.
Otherwise, if the PR gets merged without the translations update then
DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT will show an incomplete
format for all months instead of a wrong format for 3 months.
If you think I should open it anyway, please tell me. Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:4>
Comment (by Carlton Gibson):
Replying to [comment:4 mpachas]:
Yes, I would open it anyway: it's easier to work with PRs than patch files
(if only that we're already there, and seeing it in our list…)
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:5>
Old description:
> DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT strings in Catalan
> language are wrong because it uses always the preposition "de" between
> the day number and the month name but it is wrong when the month name
> starts with vowel like abril (April), agost (August) or octubre
> (October). In that case it should be d'abril, d'agost or d'octubre.
>
New description:
DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT strings in Catalan
language are wrong because it uses always the preposition "de" between the
day number and the month name but it is wrong when the month name starts
with vowel like abril (April), agost (August) or octubre (October). In
that case it should be d'abril, d'agost or d'octubre.
I think that alt.month Month translations were created to help in this
kind of situations (https://github.com/django/django/commit/2478f8588e) so
this issue can be solved by a combination of a Catalan formats.py patch
(django/conf/locale/ca/formats.py) and changing that translations (via
Transifex).
Actual:
DATE_FORMAT = r"j \d\e F \d\e Y"
msgid "January"
msgstr "gener"
msgid "April"
msgstr "abril"
{item.date | date} output -> 25 de gener de 2007
{item.date | date} output -> 4 de abril de 2014 ---> THIS IS WRONG
Proposal:
DATE_FORMAT = r"j E \d\e Y" # E placeholder: alt. month translations for
special cases.
msgctxt "alt. month"
msgid "January"
msgstr "de gener"
msgctxt "alt. month"
msgid "April"
msgstr "d'abril"
{item.date | date} output -> 25 de gener de 2007
{item.date | date} output -> 4 d'abril de 2014
I'm trying to reach Catalan Transifex Team to add those strings, I think
.po/.mo files won't follow the usual pull request way, but they must be
changed before this file gets patched.
Alternative month representation is available since this
https://code.djangoproject.com/ticket/12309#no1
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:6>
Comment (by mpachas):
Replying to [comment:5 Carlton Gibson]:
> Replying to [comment:4 mpachas]:
>
> Yes, I would open it anyway: it's easier to work with PRs than patch
files (if only that we're already there, and seeing it in our list…)
> Thanks
PR available at https://github.com/django/django/pull/15634, I've just get
in touch with aaloy as Transifex coordinator for Django translations in
Catalan.
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:7>
Old description:
> DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT strings in Catalan
> language are wrong because it uses always the preposition "de" between
> the day number and the month name but it is wrong when the month name
> starts with vowel like abril (April), agost (August) or octubre
> (October). In that case it should be d'abril, d'agost or d'octubre.
>
> I think that alt.month Month translations were created to help in this
> kind of situations (https://github.com/django/django/commit/2478f8588e)
> so this issue can be solved by a combination of a Catalan formats.py
> patch (django/conf/locale/ca/formats.py) and changing that translations
> (via Transifex).
>
> Actual:
> DATE_FORMAT = r"j \d\e F \d\e Y"
>
> msgid "January"
New description:
msgid "January"
msgstr "gener"
msgid "April"
msgstr "abril"
Proposal:
Patch: https://github.com/django/django/pull/15634
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:8>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"aa28c392b9491f02330905cb73b7078b1cd18c60" aa28c392]:
{{{
#!CommitTicketReference repository=""
revision="aa28c392b9491f02330905cb73b7078b1cd18c60"
Fixed #33661 -- Corrected Catalan date-format localization.
Changed DATE_FORMAT, DATETIME_FORMAT and MONTH_DAY_FORMAT
to use E placeholder (Month, locale specific alternative)
to handle both “de gener” and contracted “d’abril” cases.
Thanks to Ferran Jovell for review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33661#comment:10>