#11688: verbose_name should allow dynamical translation based on a number
--------------------------------------+------------------------------------
     Reporter:  Mitar                 |                    Owner:  nobody
         Type:  New feature           |                   Status:  new
    Component:  Internationalization  |                  Version:  1.1
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Maciej Olko):

 For what it's worth analogous list of missing inflections for Polish
 language (analogous to list for Lithuanian by sirex –
 https://code.djangoproject.com/ticket/11688#comment:15):

 {{{
 [ genitive ]             "Cannot delete %(name)s"
 [ accusative, @gender ]  "Delete selected %(verbose_name_plural)s"
 []                       '%(verbose_name)s: %(obj)s'
 [ accusative ]           'Added %(name)s "%(object)s".
 [ dative ]               'Changed %(list)s for %(name)s "%(object)s".'
 [ accusative ]           'Deleted %(name)s "%(object)s".'
 [ @gender ]              'The %(name)s "%(obj)s" was added successfully.'
 [ accusative, @gender ]  "You may add another %(verbose_name)s below."
 [ @gender ]              'The %(name)s "%(obj)s" was changed
 successfully.'
 [ @gender ]              'The %(name)s "%(obj)s" was added successfully.
 You may edit it again below.'
 [ accusative, @gender ]  "You may add another %(verbose_name)s below."
 [ accusative ]           'Add %(verbose_name)s'
 []                       '%(name)s object with primary key %(key)r does
 not exist.'
 [ accusative ]           'Change %s'
 [ number (nominative/accusative/genitive), @gender ] "%(count)s %(name)s
 was changed successfully."
 [ accusative ]           {% blocktranslate with cl.opts.verbose_name as
 name %}Add {{ name }}{% endblocktranslate %}
 [ accusative ]           {% translate 'Add' %} {{ opts.verbose_name }}
 [ accusative, @gender ]  {% blocktranslate with
 verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{
 verbose_name }}{% endblocktranslate %}
 [ accusative ]           'Select %(verbose_name)s'
 [ accusative ]           'Select %(verbose_name)s to change'
 [ number (nominative/accusative/genitive) ] '%d %(verbose_name)s' %
 (self.result_count, name)
 [ genitive ]             {% blocktranslate with filter_title=title %} By
 {{ filter_title }} {% endblocktranslate %}
 [ genitive, @gender ]    "No %(verbose_name)s found matching the query"
 [ genitive, @gender ]    "No %(verbose_name_plural)s available"
 [ @gender ]              "Future %(verbose_name_plural)s not available
 because %(class_name)s.allow_future is False."
 [ number (nominative/accusative/genitive) ] {{ cl.result_count }} {% if
 cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{
 cl.opts.verbose_name_plural }}{% endif %}
 }}}

 It confirms Luke's hypothesis, that different grammatical cases can be
 used in the same phrase for different languages. It may also be an
 arbitrary decision of translator to choose a translation and change the
 case of a noun (the choice is sometimes the matter of taste, not fully
 deterministic).

 I'd propose a bit different approach to the issue, using context
 translations and capability of format strings to reach for attributes (the
 MVP for my proposed approach can be seen here:
 https://github.com/m-aciek/attributivegettext). I'd try to find time to
 write a DEP with the proposal in the following months.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/11688#comment:24>
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/063.5fc06e7a712f71185b7912777d0b9ff5%40djangoproject.com.

Reply via email to