From 40bcae239abf51cdc9dc2cbecd6ad340ed61ab1e Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Thu, 27 Jan 2022 13:36:01 +0100 Subject: [PATCH] some more translation work --- evapp/models.py | 26 ++++++++-------- evapp/views.py | 8 ++--- locale/en/LC_MESSAGES/django.po | 54 ++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 18 deletions(-) diff --git a/evapp/models.py b/evapp/models.py index ccf6548..a04f68b 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -7,19 +7,19 @@ from django.utils.translation import gettext_lazy as _ # suboptimal implementation in views.EvaFormView.beautify_data() # -DEPARTMENT_CHOICES = {'PROG': 'Programme', - 'SOFT': 'Softwareentwicklung', +DEPARTMENT_CHOICES = {'PROG': _('Programme'), + 'SOFT': _('Softwareentwicklung'), 'CENT': 'Central', - 'KOMEV': 'Kommunikation und Events', - 'VOR': 'Vorstand',} + 'KOMEV': _('Kommunikation und Events'), + 'VOR': _('Vorstand'),} VENDOR_CHOICES = {'STANDARD': 'Dell Latitude', 'LENOVO': 'Lenovo Thinkpad', - 'MAC': 'Mac (nur für Grafiker_innen)'} + 'MAC': _('Mac (nur für Grafiker_innen)')} OS_CHOICES = {'UBU': 'Ubuntu (Standard)', - 'WIN': 'Windows (bitte Begründung angeben)', - 'MOS': 'Mac OS (nur wenn Mac gewählt)'} + 'WIN': _('Windows (bitte Begründung angeben)'), + 'MOS': _('Mac OS (nur wenn Mac gewählt)')} LANG_CHOICES = {'GER': 'Deutsch', @@ -27,19 +27,19 @@ LANG_CHOICES = {'GER': 'Deutsch', KEYBOARD_CHOICES = {'DE': 'Deutsch', 'US': 'USA', - 'OT': 'Anderes (Bitte unten angeben)'} + 'OT': _('Anderes (Bitte unten angeben)')} ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem', - 'CIVIC1': 'Civic CRM (allgemein)', - 'CIVIC2': "Civic CRM (Mailings, impliziert allgemein)", + 'CIVIC1': _('Civic CRM (allgemein)'), + 'CIVIC2': _("Civic CRM (Mailings, impliziert allgemein)"), 'WEB': 'www.wikimedia.de (edit)', 'BLOG': 'blog.wikimedia.de (edit)', 'FORUM': 'forum.wikimedia.de', } -TRANSPONDER_CHOICES = {'NORM': 'Allgemeiner Transponder', - 'SPECIAL': 'Besondere Schließungen (bitte angeben)', - 'NOTRANS': 'Kein Transponder',} +TRANSPONDER_CHOICES = {'NORM': _('Allgemeiner Transponder'), + 'SPECIAL': _('Besondere Schließungen (bitte angeben)'), + 'NOTRANS': _('Kein Transponder'),} class Employee(models.Model): diff --git a/evapp/views.py b/evapp/views.py index 6002514..6a502a7 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -28,19 +28,19 @@ def long_process(wizard): return True else: data = wizard.get_cleaned_data_for_step('0') or {} - print(data) + # print(data) if data.get('choice') != 'CHANGE': wizard.set_choice('IN') - print('PROZESS IN') + # print('PROZESS IN') return True else: wizard.set_choice('CHANGE') - print('PROZESS NOT IN') + # print('PROZESS NOT IN') return False def change_process(wizard): ''' this method is called via urls.py to determine if the form is part of the change process''' - print('CHANGE PROZESS') + # print('CHANGE PROZESS') return not long_process(wizard) diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 4527503..8699257 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-26 15:52+0100\n" +"POT-Creation-Date: 2022-01-27 13:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,58 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: evapp/models.py:10 +msgid "Programme" +msgstr "" + +#: evapp/models.py:11 +msgid "Softwareentwicklung" +msgstr "Software Development" + +#: evapp/models.py:13 +msgid "Kommunikation und Events" +msgstr "" + +#: evapp/models.py:14 +msgid "Vorstand" +msgstr "" + +#: evapp/models.py:18 +msgid "Mac (nur für Grafiker_innen)" +msgstr "" + +#: evapp/models.py:21 +msgid "Windows (bitte Begründung angeben)" +msgstr "" + +#: evapp/models.py:22 +msgid "Mac OS (nur wenn Mac gewählt)" +msgstr "" + +#: evapp/models.py:30 +msgid "Anderes (Bitte unten angeben)" +msgstr "" + +#: evapp/models.py:33 +msgid "Civic CRM (allgemein)" +msgstr "" + +#: evapp/models.py:34 +msgid "Civic CRM (Mailings, impliziert allgemein)" +msgstr "" + +#: evapp/models.py:40 +msgid "Allgemeiner Transponder" +msgstr "" + +#: evapp/models.py:41 +msgid "Besondere Schließungen (bitte angeben)" +msgstr "" + +#: evapp/models.py:42 +msgid "Kein Transponder" +msgstr "" + #: evapp/models.py:50 msgid "Vorname" msgstr "Firstname"