Case handling for application verbose names

240 views
Skip to first unread message

Aymeric Augustin

unread,
Mar 9, 2014, 4:23:27 PM3/9/14
to django-d...@googlegroups.com
Hello,

https://code.djangoproject.com/ticket/22070 reported an inconsistency in the capitalization of application verbose names. It was most visible in the admin index page. In order to fix this bug, application names were capitalized. The alternative was to pass application names through capfirst like model names.

AppConfig.verbose_name is intended to mirror Model._meta.verbose_name/verbose_name_plural. The latter are expected to be lower-case: https://docs.djangoproject.com/en/dev/ref/models/options/#verbose-name. That makes it easier to use them in sentences such as "Delete selected %(verbose_name_plural)s".

Can the same argument be applied to application names? In theory, maybe, and that’s why I was surprised by the fix for #22070. In practice there’s usually a single instance of each application in a Django project. From that perspective application names can be treated like proper nouns and should be capitalized.

This question matters because it isn’t possible to capitalize or lower-case correctly in general. I’d like to avoid changing the API after the beta.

I’m now thinking that it's acceptable to keep capitalized application names and live with the inconsistency. However, if I have missed an argument in favor of lower case names, let me know.

--
Aymeric.



Russell Keith-Magee

unread,
Mar 9, 2014, 8:30:41 PM3/9/14
to Django Developers
I agree it's an inconsistency, but I think it's an inconsistency that makes sense in light of the "proper noun" observation that you've made. I can't think of any example where you'd refer to an application in the plural - to my mind, it's a standalone product that is by its very nature limited to cardinality 1 in any Django context. Autocapitalization is essentially impossible to get right, and the most common usage of the app name is as a label in the admin; on the flip side, I can't see any reason why the lowercase admin name is desirable.

Yours,
Russ Magee %-)


Shai Berger

unread,
Mar 10, 2014, 3:27:10 AM3/10/14
to django-d...@googlegroups.com
On Monday 10 March 2014 08:30:41 Russell Keith-Magee wrote:
> On Mon, Mar 10, 2014 at 4:23 AM, Aymeric Augustin <
>
> aymeric....@polytechnique.org> wrote:
> >
> > I'm now thinking that it's acceptable to keep capitalized application
> > names and live with the inconsistency. However, if I have missed an
> > argument in favor of lower case names, let me know.
>
> I agree it's an inconsistency, but I think it's an inconsistency that makes
> sense in light of the "proper noun" observation that you've made. I can't
> think of any example where you'd refer to an application in the plural

Actually, a short check verifies that, as a trivial example, most apps in
contribs are already named in the plural.

So, +1 (to both Russell and Aymeric).

Russell Keith-Magee

unread,
Mar 10, 2014, 7:47:54 PM3/10/14
to Django Developers
Apologies - I confused the issue with my language here. I know a common convention for app names themselves is to use the plural for the app name; I was referring to multiple instances of a single app. "Here's my list of administration consoles" isn't a phrase you'd have occasion to write in a normal Django context.
 
So, +1 (to both Russell and Aymeric).
 
However, it looks like we ended up on the same page.

Russ %-)
Reply all
Reply to author
Forward
0 new messages