﻿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
10582	Gettext Translation are not translated by django in the admin in a Form Override	andreac81@…	nobody	"This is the problem that i have found.
I have created a simple model like this:
{{{
from django.db import models
from django.utils.translation import ugettext_lazy as _

# Create your models here.

class Test(models.Model):
    simple_test = models.TextField(_(""simple text""))
}}}

Then, for some reasons, i want to customize the behaviour of the admin interface, so i want to define
a special form for my model.  So there is the code:

{{{
from testapp.models import Test
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django import forms

class MyTestForm(forms.ModelForm):
    simple_test = forms.CharField(_('simple text'))

    class Meta:
        model = Test

class MyTestAdmin(admin.ModelAdmin):
    form = MyTestForm

admin.site.register(Test, MyTestAdmin)
}}}

So, after giving the usual commands django-admin makemessages -l it and  django-admin compilemessages, and after writing
the translation in the  django.po file, i can't get the translation.
Instead if i change the line:

{{{
admin.site.register(Test, MyTestAdmin)
}}}

to

{{{
admin.site.register(Test)
}}}

everything works fine."		closed	contrib.admin	1.0		invalid	translation i18n admin		Unreviewed	0	0	0	0	0	0
