#33565: makemessages command skips the nl-nl-x-informal folder
-------------------------------------+-------------------------------------
Reporter: Ronnie van den | Owner: nobody
Crommenacker |
Type: Bug | Status: new
Component: | Version: 3.2
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ronnie van den Crommenacker):
> Based on the [https://www.w3.org/International/articles/language-
tags/#extension W3.org article], I'd say this isn't something we should
really support:
>
> > Because these subtags are only meaningful within private agreements
and cannot be used interoperably across the Web, they should be used with
great care, and avoided whenever possible.
>
> So I would say `wontfix`.
The way i read the comment is "it should be ~used~ with great care", which
doesn't not say anything about the ~support~ for the private extension.
It exists in the `language-tags` for a reason, but for `locales` it seems
not that clear in `ISO/IEC 15897` what the restrictions to the format
actually are. I have seen some uncommon formats in the wild (see comment
https://code.djangoproject.com/ticket/33565?replyto=9#comment:5).
I understand that if something should not be used there is little reason
to support it. However, Django has added support for private subtags in
the `to_locale` function already via #28546 and it used to work before
Django 3.2.
> Then I look at #28546, and see that we did add support in `to_locale`… —
That was your ticket too. I'm guessing you may be the only person using
this. 🙂
Yeah, i think i'm the only one. It was (and is) still the perfect solution
for the problem we (as a company) are facing. Other solutions would be far
more complex.
> Can I ask, how come it's taken 5 years for you to hit the issue with
`makemessages`?
> Would a project level custom `makemessages` serve?
> This would mean we don't need to add the complication for few (just
you?) users 🤔
The `makemessages` command worked (maybe by accident) perfectly for many
years, until we updated to Django 3.2 recently.
This commit included in Django 3.2 added extra checks which, by accident,
stopped the support for private subtags
https://github.com/django/django/commit/f63f3cdf0969c23fd0c05de0f4a2a1df0cd5112e
As a temporary solution we rename `nl_NL_x_informal` to `nl_NL-x-informal`
after we run makemessages
> I have to say I'm still not sure. The patch isn't that big, so we could
add it for symmetry with #28546.
I hope you will reconsider to include the patch. I'll understand Django
wouldn't support it officially, document it and test for it in upcoming
releases. If it occasionally breaks, ill understand and i am happy to
contribute patches when it breaks again.
--
Ticket URL: <https://code.djangoproject.com/ticket/33565#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107017fbbc69409-5b35b2a1-fcb5-467f-bd8d-36b047865dcc-000000%40eu-central-1.amazonses.com.