Fix wrong translations in forms/ models

Converted utils.translation_ex.ugettext to use ugettext_lazy and changed
forms modules to import ugettext from there (models where already importing
it from there)
This commit is contained in:
Andy Kittner 2012-05-15 01:08:08 +02:00
parent c19025ceb3
commit 3815ef26af
10 changed files with 10 additions and 13 deletions

View File

@ -12,11 +12,11 @@
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
ModelChoiceField, HiddenInput, Select, TextInput
from django.utils.translation import ugettext as _
from mptt.forms import TreeNodeChoiceField
from utils.forms import CssClassMixin
from utils.translation_ext import ugettext as _
from agenda.models import Item

View File

@ -12,9 +12,9 @@
from django.forms import ModelForm, Form, CharField, Textarea, TextInput, ModelMultipleChoiceField, ModelChoiceField, BooleanField, FileField, FileInput, IntegerField, ChoiceField, Select
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin
from utils.translation_ext import ugettext as _
from application.models import Application

View File

@ -11,7 +11,6 @@
"""
from django.conf.urls.defaults import url, patterns
from django.utils.translation import ugettext as _
from application.views import ApplicationDelete, ViewPoll, ApplicationPDF, ApplicationPollPDF, CreateAgendaItem

View File

@ -12,9 +12,9 @@
from django import forms
from django.forms import ModelForm, Form, ModelChoiceField, Select
from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin
from utils.translation_ext import ugettext as _
from participant.models import Profile
from assignment.models import Assignment

View File

@ -11,10 +11,10 @@
"""
from django.forms import Form, CharField, TextInput, BooleanField, IntegerField, ChoiceField, Textarea, Select
from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin
from models import config
from utils.translation_ext import ugettext as _
class GeneralConfigForm(Form, CssClassMixin):

View File

@ -13,10 +13,9 @@
from django.forms import Form, ModelForm, CharField, EmailField, FileField, FileInput, TextInput, Textarea, MultipleChoiceField, ModelMultipleChoiceField, ChoiceField, BooleanField
from django.contrib.auth.models import User, Group, Permission
from django.contrib.auth.forms import AdminPasswordChangeForm
from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin
from utils.translation_ext import LocalizedModelMultipleChoiceField
from utils.translation_ext import LocalizedModelMultipleChoiceField, ugettext as _
# required for USER_VISIBLE_PERMISSIONS
from participant.models import Profile

View File

@ -11,9 +11,9 @@
"""
from django import forms
from django.utils.translation import ugettext as _
from utils.forms import CssClassMixin
from utils.translation_ext import ugettext as _
from models import Vote

View File

@ -13,7 +13,6 @@
from time import time
from django.dispatch import receiver
from django.utils.translation import ugettext as _
from config.models import config

View File

@ -10,7 +10,7 @@
:license: GNU GPL, see LICENSE for more details.
"""
from django.utils.translation import ugettext as _ugettext
from django.utils.translation import ugettext_lazy
from django.forms import ChoiceField, ModelChoiceField, ModelMultipleChoiceField
@ -53,4 +53,4 @@ def ugettext(msg, fixstr=False):
if fixstr:
return msg
else:
return _ugettext(msg)
return ugettext_lazy(msg)

View File

@ -23,10 +23,10 @@ from django.template.loader import render_to_string
from django.core.context_processors import csrf
from django.contrib import messages
from django.contrib.auth.models import Permission
from django.utils.translation import ugettext as _
from django.db.models import signals
from openslides.utils.signals import template_manipulation
from openslides.utils.translation_ext import ugettext as _
from openslides import get_version