in modells we use lazy translation
This commit is contained in:
parent
82dd63a1b5
commit
1cb419f73f
|
@ -1,5 +1,6 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from multiselectfield import MultiSelectField
|
from multiselectfield import MultiSelectField
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
# ATTENTION!!!
|
# ATTENTION!!!
|
||||||
# No key should be used twice in any of these dicts because of the
|
# No key should be used twice in any of these dicts because of the
|
||||||
|
@ -46,7 +47,7 @@ class Employee(models.Model):
|
||||||
# usermail = models.EmailField(max_length=50, verbose_name="Deine Mailadresse (Ansprechpartner_in)", default='bestechefin@wikimedia.de')
|
# usermail = models.EmailField(max_length=50, verbose_name="Deine Mailadresse (Ansprechpartner_in)", default='bestechefin@wikimedia.de')
|
||||||
|
|
||||||
# personal data
|
# personal data
|
||||||
firstname = models.CharField(max_length=50, verbose_name="Vorname")
|
firstname = models.CharField(max_length=50, verbose_name=_("Vorname"))
|
||||||
lastname = models.CharField(max_length=50, verbose_name="Nachname")
|
lastname = models.CharField(max_length=50, verbose_name="Nachname")
|
||||||
# intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
|
# intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
|
||||||
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name='Bereich')
|
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name='Bereich')
|
||||||
|
|
|
@ -25,6 +25,7 @@ class LoginTestCase(TestCase):
|
||||||
print (response_en.content)
|
print (response_en.content)
|
||||||
print('END')
|
print('END')
|
||||||
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
|
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
|
||||||
|
self.assertContains(response_en, 'Firstname', status_code=200)
|
||||||
|
|
||||||
def testDebugWarning(self):
|
def testDebugWarning(self):
|
||||||
with self.settings(DEBUG=True):
|
with self.settings(DEBUG=True):
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-01-26 13:11+0100\n"
|
"POT-Creation-Date: 2022-01-26 15:52+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -18,6 +18,10 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: evapp/models.py:50
|
||||||
|
msgid "Vorname"
|
||||||
|
msgstr "Firstname"
|
||||||
|
|
||||||
#: evapp/templates/evapp/employee_form.html:36
|
#: evapp/templates/evapp/employee_form.html:36
|
||||||
msgid "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!"
|
msgid "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!"
|
||||||
msgstr "ATTENTION! Test mode activated. No mails will be send."
|
msgstr "ATTENTION! Test mode activated. No mails will be send."
|
||||||
|
|
Loading…
Reference in New Issue