#32797: model_ngettext incorrectly tries to translate already translated words
-------------------------------------+-------------------------------------
     Reporter:  Maciej Olko          |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  3.2
     Severity:  Normal               |               Resolution:
     Keywords:  i18n, gettext,       |             Triage Stage:  Accepted
  ngettext                           |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Comment (by Maciej Olko):

 Hi Carlton,

 I've added a test – sorry for my low response rate.

 Technically we can fix those missing plural forms without touching
 `model_ngettext()` function. We can also "just" simplify it as I mentioned
 previously.

 Nevertheless I am proposing removal of `model_ngettext()` function.
 * The pluralization should happen on message level, not on a parameter
 level (as for `object_name`), please refer to [1] [2].
 * Moreover the function implementation is broken. Internal `ngettext()`
 call is using already translated messages and even if we fix that, there
 will be no translations for the calls in messages catalog (we are missing
 so-called gettext noops for plurals of verbose names). Please let me know
 if I should elaborate more on that.

 Thanks.

 PS. I plan to publish proposals, I think in a form of DEPs, about
 admin/Django internationalization – first one about bringing verbose
 names' grammatical gender for inflection in parametrized messages, and
 second one about adding an ability to select a verbose name grammatical
 case inside translated messages. The selection of variable in a message,
 like proposed in my PR potentially is required by the proposed
 implementation of the second of those DEPs.

 [1] https://github.com/projectfluent/fluent/wiki/Good-Practices-for-
 Developers#prefer-wet-over-dry
 [2] https://code.djangoproject.com/ticket/11688#comment:21

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32797#comment:7>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.cdc4302c3ec7767deb67bdb3fa8bc351%40djangoproject.com.

Reply via email to