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:
parent
c19025ceb3
commit
3815ef26af
@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
|
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
|
||||||
ModelChoiceField, HiddenInput, Select, TextInput
|
ModelChoiceField, HiddenInput, Select, TextInput
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from mptt.forms import TreeNodeChoiceField
|
from mptt.forms import TreeNodeChoiceField
|
||||||
|
|
||||||
from utils.forms import CssClassMixin
|
from utils.forms import CssClassMixin
|
||||||
|
from utils.translation_ext import ugettext as _
|
||||||
|
|
||||||
from agenda.models import Item
|
from agenda.models import Item
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
from django.forms import ModelForm, Form, CharField, Textarea, TextInput, ModelMultipleChoiceField, ModelChoiceField, BooleanField, FileField, FileInput, IntegerField, ChoiceField, Select
|
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.contrib.auth.models import User
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from utils.forms import CssClassMixin
|
from utils.forms import CssClassMixin
|
||||||
|
from utils.translation_ext import ugettext as _
|
||||||
from application.models import Application
|
from application.models import Application
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from django.conf.urls.defaults import url, patterns
|
from django.conf.urls.defaults import url, patterns
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from application.views import ApplicationDelete, ViewPoll, ApplicationPDF, ApplicationPollPDF, CreateAgendaItem
|
from application.views import ApplicationDelete, ViewPoll, ApplicationPDF, ApplicationPollPDF, CreateAgendaItem
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import ModelForm, Form, ModelChoiceField, Select
|
from django.forms import ModelForm, Form, ModelChoiceField, Select
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from utils.forms import CssClassMixin
|
from utils.forms import CssClassMixin
|
||||||
|
from utils.translation_ext import ugettext as _
|
||||||
from participant.models import Profile
|
from participant.models import Profile
|
||||||
from assignment.models import Assignment
|
from assignment.models import Assignment
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from django.forms import Form, CharField, TextInput, BooleanField, IntegerField, ChoiceField, Textarea, Select
|
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 utils.forms import CssClassMixin
|
||||||
from models import config
|
from models import config
|
||||||
|
from utils.translation_ext import ugettext as _
|
||||||
|
|
||||||
|
|
||||||
class GeneralConfigForm(Form, CssClassMixin):
|
class GeneralConfigForm(Form, CssClassMixin):
|
||||||
|
@ -13,10 +13,9 @@
|
|||||||
from django.forms import Form, ModelForm, CharField, EmailField, FileField, FileInput, TextInput, Textarea, MultipleChoiceField, ModelMultipleChoiceField, ChoiceField, BooleanField
|
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.models import User, Group, Permission
|
||||||
from django.contrib.auth.forms import AdminPasswordChangeForm
|
from django.contrib.auth.forms import AdminPasswordChangeForm
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from utils.forms import CssClassMixin
|
from utils.forms import CssClassMixin
|
||||||
from utils.translation_ext import LocalizedModelMultipleChoiceField
|
from utils.translation_ext import LocalizedModelMultipleChoiceField, ugettext as _
|
||||||
|
|
||||||
# required for USER_VISIBLE_PERMISSIONS
|
# required for USER_VISIBLE_PERMISSIONS
|
||||||
from participant.models import Profile
|
from participant.models import Profile
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from utils.forms import CssClassMixin
|
from utils.forms import CssClassMixin
|
||||||
|
from utils.translation_ext import ugettext as _
|
||||||
from models import Vote
|
from models import Vote
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
|
|
||||||
from config.models import config
|
from config.models import config
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
:license: GNU GPL, see LICENSE for more details.
|
: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
|
from django.forms import ChoiceField, ModelChoiceField, ModelMultipleChoiceField
|
||||||
|
|
||||||
|
|
||||||
@ -53,4 +53,4 @@ def ugettext(msg, fixstr=False):
|
|||||||
if fixstr:
|
if fixstr:
|
||||||
return msg
|
return msg
|
||||||
else:
|
else:
|
||||||
return _ugettext(msg)
|
return ugettext_lazy(msg)
|
||||||
|
@ -23,10 +23,10 @@ from django.template.loader import render_to_string
|
|||||||
from django.core.context_processors import csrf
|
from django.core.context_processors import csrf
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.models import Permission
|
from django.contrib.auth.models import Permission
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
from django.db.models import signals
|
from django.db.models import signals
|
||||||
|
|
||||||
from openslides.utils.signals import template_manipulation
|
from openslides.utils.signals import template_manipulation
|
||||||
|
from openslides.utils.translation_ext import ugettext as _
|
||||||
|
|
||||||
from openslides import get_version
|
from openslides import get_version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user