Description

I'm building a site right now for a Hungarian customer, so I had to revise the Hungarian translation, and also review the UI bits. There is a small inconsistency I've found, which is pretty important for the Hungarian language (I don't know if this is an issue for other languages, too).

So there is a verbose_name and a verbose_name_plural field in the Meta class of a model. The verbose_name_plural field is used in two different contexts: once you can see it in the admin homepage (let's say "Entries" - the same applies to the permissions list), and you see it on the listing page ("2 entries"). The problem is that these two words are the same in English, but not in Hungarian. Remaining at our example: the homepage should say "Bejegyzések" (plural form), and the listing should say "2 bejegyzés" (we don't use the plural form after counts).

I hope you can fix the issue. A possible fix: use the verbose_name_plural on the listing page, and introduce a descriptive_name (or something similar) field for the admin index/permissions list.

Oldest firstNewest firstThreaded

Comments only

Change History (12)

The solution isn't going to be to introduce yet another attribute for the name, because that cycle we will spend forever chasing such differences between all the languages of the world. Sometimes we are just going to have tolerate slightly imperfect sentence structures when we are combining fragments like this.

In this case, we might be able to work around it by using ungettext() as the translation method instead of gettext() and add some clear documentation about why it is used that way. I'll have a think about the impact on existing code for that approach.

I've added a verbose_name_count Meta option for providing count texts. It uses a lazy ngettext for deferred lookups. It is fully backwards compatible as it constructs from verbose_name and verbose_name_plural if not provided.

After some more researching, I've found #11688 to be a more generic case for this issue. My approach is rather simplified to what is discussed in that issue. This will contribute to one single issue in #11688, but still many others remain.