﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14450	Simple but powerfull patch to make application name localizable	Vsevolod Novikov	nobody	"The applied patch is used to make application names localizable for admin interface and also for other purposes.

This patch is applied to django v. 1.2.3 (django.VERSION = (1, 2, 3, 'final', 0))

It uses a new APP_NAMES variable from the user-provided settings.py which should be a dictionary having application label (model._meta.app_label) as a key, and application verbose name as a value. If the APP_NAMES is absent or doesn't contain a label of the application, the old schema (app_label.Title()) is used.

This way allows to localize application names exactly as other things in the project:

settings.py:
{{{
...
from django.utils.translation import ugettext_lazy as _
...
INSTALLED_APPS = (                                                                                                                                             
    ...
    'myapp.service',                                                                                                                                        
    ...
)                                                                                                                                                              
                                                                                                                                                               
APP_NAMES = {                                                                                                                                                  
    'service':_('Service')                                                                                                                                     
}                                                                                                                                                              

}}}

Now the ""Service"" string will appear in the django.po files for the whole project, so you can localize application names as you wish.

This patch is a minimalistic way to make a part of the job made by the patch published in the ticket #3591. Reasons why I've published the patch is - ""simpler means more stable"", and ""One patch - one job"".
"		closed	contrib.admin	1.2		duplicate			Unreviewed	1	0	0	0	0	0
