Browse Source

add translations

subDesTagesMitExtraKaese 2 years ago
parent
commit
3c3d531289

+ 82 - 8
locale/de/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-12-18 13:06+0000\n"
+"POT-Creation-Date: 2022-12-18 15:35+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,24 +18,98 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr "Ereignisname"
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr "Ereignisdatum"
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr "Startzeit"
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr "Endzeit"
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr "Zeitslot-Intervall"
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr "Die Startzeit muss sich von der Endzeit unterscheiden"
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr "Benutzername"
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr "Passwort"
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr "Zeitslots"
+
+#: zitap/helpers.py:21
+#, fuzzy, python-brace-format
+#| msgid "Invalid string length"
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr "Ungültige Länge der Zeichenkette: {0} (erwartet: {1})"
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr "Impressum"
+
 #: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
 #: zitap/templates/zitap/event-not-found.html:10
 #: zitap/templates/zitap/index.html:25
 msgid "Create Event"
+msgstr "Ereignis erstellen"
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
 msgstr ""
 
 #: zitap/templates/zitap/event-not-found.html:8
 msgid "Event not found"
-msgstr ""
+msgstr "Ereignis nicht gefunden"
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr "Ereignis"
 
-#: zitap/templates/zitap/event.html:38
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr "Zeitslot aktualisieren"
+
+#: zitap/templates/zitap/event.html:52
 msgid "Logout"
-msgstr ""
+msgstr "Abmelden"
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr "Anmelden, um Zeitslots zu aktualisieren"
 
 #: zitap/templates/zitap/index.html:18
 msgid "Home"
-msgstr ""
+msgstr "Startseite"
 
-#: zitap/templates/zitap/index.html:19
-msgid "About"
-msgstr ""
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr "Konnte Ereignis nicht erstellen. Bitte versuchen Sie es erneut."
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr "Benutzername existiert bereits"
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr "Anmeldung fehlgeschlagen"

+ 113 - 0
locale/de_AT/LC_MESSAGES/django.po

@@ -0,0 +1,113 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:37+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr ""
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr ""
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr ""
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr ""
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr ""
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr ""
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr ""
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr ""
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr ""
+
+#: zitap/helpers.py:21
+#, python-brace-format
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr ""
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr ""
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr ""
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr ""
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr ""
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr ""

+ 116 - 0
locale/de_CH/LC_MESSAGES/django.po

@@ -0,0 +1,116 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:27+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr ""
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr ""
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr ""
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr ""
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr ""
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr ""
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr ""
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr ""
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr ""
+
+#: zitap/helpers.py:21
+msgid "Invalid string length"
+msgstr ""
+
+#: zitap/helpers.py:21
+msgid "expected"
+msgstr ""
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr ""
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr ""
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr ""
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr ""
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr ""

+ 113 - 0
locale/en_GB/LC_MESSAGES/django.po

@@ -0,0 +1,113 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:36+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr ""
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr ""
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr ""
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr ""
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr ""
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr ""
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr ""
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr ""
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr ""
+
+#: zitap/helpers.py:21
+#, python-brace-format
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr ""
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr ""
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr ""
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr ""
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr ""
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr ""
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr ""
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr ""

+ 114 - 0
locale/fr/LC_MESSAGES/django.po

@@ -0,0 +1,114 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:36+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr "Nom de l'événement"
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr "Date de l'événement"
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr "Heure de début"
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr "Heure de fin"
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr "Intervalle de créneau horaire"
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr "L'heure de début doit être différente de l'heure de fin"
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr "Nom d'utilisateur"
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr "Mot de passe"
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr "Fentes"
+
+#: zitap/helpers.py:21
+#, python-brace-format
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr "Longueur de chaîne non valide : {0} (attendu : {1})"
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr "À propos"
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr "Créer un événement"
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr "Zip"
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr "Événement introuvable"
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr "Événement"
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr "Mettre à jour les emplacements"
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr "Déconnexion"
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr "Connectez-vous pour mettre à jour les emplacements"
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr "Home"
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr "Impossible de créer l'événement. "
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr "Le nom d'utilisateur existe déjà"
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr "Échec de la connexion"
+

+ 114 - 0
locale/nl/LC_MESSAGES/django.po

@@ -0,0 +1,114 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:36+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr "Naam evenement"
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr "Datum evenement"
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr "Starttijd"
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr "Eindtijd"
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr "Tijdslotinterval"
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr "Starttijd moet anders zijn dan eindtijd"
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr "Gebruikersnaam"
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr "Wachtwoord"
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr ""
+
+#: zitap/helpers.py:21
+#, python-brace-format
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr "Ongeldige tekenreekslengte: {0} (verwacht: {1})"
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr "Over"
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr "Maak evenement"
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr ""
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr "Gebeurtenis niet gevonden"
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr "Evenement"
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr "Slots bijwerken"
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr "Uitloggen"
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr "Log in om slots bij te werken"
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr "Thuis"
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr "Kan evenement niet maken. "
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr "Gebruikersnaam bestaat al"
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr "Aanmelden mislukt"
+

+ 116 - 0
locale/ru/LC_MESSAGES/django.po

@@ -0,0 +1,116 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-12-18 15:38+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
+"%100>=11 && n%100<=14)? 2 : 3);\n"
+#: zitap/forms.py:14
+msgid "Event name"
+msgstr "Название события"
+
+#: zitap/forms.py:15
+msgid "Event date"
+msgstr "Дата события"
+
+#: zitap/forms.py:16
+msgid "Start time"
+msgstr "время начала"
+
+#: zitap/forms.py:17
+msgid "End time"
+msgstr "Конец времени"
+
+#: zitap/forms.py:18
+msgid "Time slot interval"
+msgstr "Интервал временного интервала"
+
+#: zitap/forms.py:26
+msgid "Start time must be different from end time"
+msgstr "Время начала должно отличаться от времени окончания."
+
+#: zitap/forms.py:31
+msgid "Username"
+msgstr "имя пользователя"
+
+#: zitap/forms.py:32
+msgid "Password"
+msgstr "Пароль"
+
+#: zitap/forms.py:35
+msgid "Slots"
+msgstr "Слоты"
+
+#: zitap/helpers.py:21
+#, python-brace-format
+msgid "Invalid string length: {0} (expected: {1})"
+msgstr "Недопустимая длина строки: {0} (ожидаемая: {1})"
+
+#: zitap/templates/zitap/about.html:5 zitap/templates/zitap/index.html:19
+msgid "About"
+msgstr "О"
+
+#: zitap/templates/zitap/create-event.html:5
+#: zitap/templates/zitap/create-event.html:9
+#: zitap/templates/zitap/create-event.html:29
+#: zitap/templates/zitap/event-not-found.html:10
+#: zitap/templates/zitap/index.html:25
+msgid "Create Event"
+msgstr "Создать событие"
+
+#: zitap/templates/zitap/event-not-found.html:5
+#: zitap/templates/zitap/event.html:5 zitap/templates/zitap/index.html:6
+#: zitap/templates/zitap/index.html:15
+msgid "Zitap"
+msgstr "Зитап"
+
+#: zitap/templates/zitap/event-not-found.html:8
+msgid "Event not found"
+msgstr "Событие не найдено"
+
+#: zitap/templates/zitap/event.html:13
+msgid "Event"
+msgstr "Событие"
+
+#: zitap/templates/zitap/event.html:49
+msgid "Update Slots"
+msgstr "Обновить слоты"
+
+#: zitap/templates/zitap/event.html:52
+msgid "Logout"
+msgstr "Выйти"
+
+#: zitap/templates/zitap/event.html:75
+msgid "Login to Update Slots"
+msgstr "Войдите, чтобы обновить слоты"
+
+#: zitap/templates/zitap/index.html:18
+msgid "Home"
+msgstr "Дом"
+
+#: zitap/views.py:41
+msgid "Could not create event. Please try again."
+msgstr "Не удалось создать событие. "
+
+#: zitap/views.py:83
+msgid "Username already exists"
+msgstr "Имя пользователя уже существует"
+
+#: zitap/views.py:95
+msgid "Login failed"
+msgstr "Ошибка входа"
+

+ 1 - 0
project/settings.py

@@ -53,6 +53,7 @@ MIDDLEWARE = [
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.middleware.locale.LocaleMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
 ]

+ 10 - 9
zitap/forms.py

@@ -1,6 +1,7 @@
 import datetime
 
 from django import forms
+from django.utils.translation import gettext_lazy as _
 
 from .widgets import DatePickerWidget, SlotPickerWidget
 
@@ -10,11 +11,11 @@ def get_interval():
     return [(x, datetime.timedelta(minutes=x)) for x in [15, 30, 60]]
 
 class CreateEventForm(forms.Form):
-    event_name = forms.CharField(label='Event name', max_length=100)
-    event_date = forms.Field(label='Event date', widget=DatePickerWidget)
-    start_time = forms.ChoiceField(label='Start time', initial=9, choices=get_hours)
-    end_time = forms.ChoiceField(label='End time', initial=20, choices=get_hours)
-    slot_interval = forms.ChoiceField(label='Time slot interval', initial=15, choices=get_interval)
+    event_name = forms.CharField(label=_('Event name'), max_length=100)
+    event_date = forms.Field(label=_('Event date'), widget=DatePickerWidget)
+    start_time = forms.ChoiceField(label=_('Start time'), initial=9, choices=get_hours)
+    end_time = forms.ChoiceField(label=_('End time'), initial=20, choices=get_hours)
+    slot_interval = forms.ChoiceField(label=_('Time slot interval'), initial=15, choices=get_interval)
 
     def clean(self) -> dict:
         cleaned_data = super().clean()
@@ -22,16 +23,16 @@ class CreateEventForm(forms.Form):
             return cleaned_data
 
         if cleaned_data['start_time'] == cleaned_data['end_time']:
-            self.add_error('start_time', 'Start time must be different from end time')
+            self.add_error('start_time', _('Start time must be different from end time'))
         
         return cleaned_data
 
 class LoginForm(forms.Form):
-    username = forms.CharField(label='Username', max_length=100)
-    password = forms.CharField(label='Password', max_length=100, widget=forms.PasswordInput, required=False)
+    username = forms.CharField(label=_('Username'), max_length=100)
+    password = forms.CharField(label=_('Password'), max_length=100, widget=forms.PasswordInput, required=False)
 
 class UpdateSlotsForm(forms.Form):
-    slots = forms.Field(label='Slots')
+    slots = forms.Field(label=_('Slots'))
 
     def __init__(self, *args, participant, **kwargs):
         super().__init__(*args, **kwargs)

+ 3 - 2
zitap/helpers.py

@@ -1,6 +1,7 @@
 import datetime
-from .models import Participant, Date, Event
+from django.utils.translation import gettext as _
 
+from .models import Participant, Date, Event
 
 def slots2string( participant : Participant, n_slots : int ) -> str :
     """ Convert the slots of a participant to a string. """
@@ -17,7 +18,7 @@ def slots2string( participant : Participant, n_slots : int ) -> str :
 def string2slots( string : str, n_slots : int ) -> bytes :
     """ Convert a string to a byte array. """
     if len(string) != n_slots:
-        raise ValueError(f"Invalid string length: {len(string)} (expected {n_slots})")
+        raise ValueError(_("Invalid string length: {0} (expected: {1})").format(len(string), n_slots))
 
     # Convert the string to a byte array
     return int(string, 2).to_bytes((n_slots + 7) // 8, byteorder='big')

+ 1 - 0
zitap/models.py

@@ -2,6 +2,7 @@ from datetime import timedelta
 import random
 from django.db import models
 from django.contrib.auth.models import User
+from django.utils.translation import gettext as _
 
 def generate_random_url():
     # a-z, A-Z, 0-9, -, _

+ 2 - 2
zitap/templates/zitap/about.html

@@ -2,8 +2,8 @@
 {% load static %}
 {% load i18n %}
 
-{% block title %}About{% endblock %}
+{% block title %}{% trans 'About' %}{% endblock %}
 
 {% block content %}
-About page
+tbd
 {% endblock %}

+ 2 - 2
zitap/templates/zitap/create-event.html

@@ -6,7 +6,7 @@
 
 {% block content %}
 <div class="outline">
-    <h1>Create Event</h1>
+    <h1>{% trans 'Create Event' %}</h1>
     <form action="{% url 'create-event' %}" method="post">
         {% csrf_token %}
         <div class="grid-container">
@@ -26,7 +26,7 @@
         {% endfor %}
         </div>
         {{ form.non_field_errors }}
-        <input type="submit" value="Create Event">
+        <input type="submit" value="{% trans 'Create Event' %}">
     </form>
 </div>
 <script type="text/javascript" src="{% static 'zitap/js/mouse-drag.js' %}"></script>

+ 1 - 1
zitap/templates/zitap/event-not-found.html

@@ -2,7 +2,7 @@
 {% load static %}
 {% load i18n %}
 
-{% block title %}Zitap{% endblock %}
+{% block title %}{% trans "Zitap" %}{% endblock %}
 
 {% block content %}
 <h1 class="error">{% trans "Event not found" %}</h1>

+ 38 - 10
zitap/templates/zitap/event.html

@@ -2,7 +2,7 @@
 {% load static %}
 {% load i18n %}
 
-{% block title %}{{ event.name }}{% endblock %}
+{% block title %}{% trans "Zitap" %}: {{ event.name }}{% endblock %}
 
 {% block head %}
     <link rel="stylesheet" href="{% static 'zitap/css/event.css' %}">
@@ -10,7 +10,7 @@
 {% endblock %}
 
 {% block content %}
-<h1>{{ event.name }}</h1>
+<h1>{% trans "Event" %}: {{ event.name }}</h1>
 
 <div class="occupancy-grid" style="--color-count:{{ grid.colors }}">
     {% for day in grid.days %}
@@ -29,10 +29,24 @@
 {% if update_form %}
     <form action="{% url 'update-slots' url=event.url %}" method="post" id="update-form">
         {% csrf_token %}
-        <table>
-            {{ update_form.as_table }}
-        </table>
-        <input type="submit" value="Update Slots" id="update-button">
+        <div class="grid-container">
+            {% for field in update_form %}
+            <div class="{{ field.name }}">
+                <p>
+                {{ field.label_tag }}<br>
+                {{ field }}
+                {% if field.help_text %}
+                <small>{{ field.help_text }}</small>
+                {% endif %}
+                {% if field.errors %}
+                <small>{{ field.errors }}</small>
+                {% endif %}
+                </p>
+            </div>
+            {% endfor %}
+            </div>
+            {{ form.non_field_errors }}
+        <input type="submit" value="{% trans 'Update Slots' %}" id="update-button">
     </form>
     <button class="logout" onclick="location.href='{% url 'logout' url=event.url %}'">
         {% trans "Logout" %}
@@ -41,10 +55,24 @@
     {% else %}
     <form action="{% url 'login' url=event.url %}" method="post" id="login-form">
         {% csrf_token %}
-        <table>
-            {{ login_form.as_table }}
-        </table>
-        <input type="submit" value="Login to Update Slots" id="login-button">
+        <div class="grid-container">
+        {% for field in login_form %}
+        <div class="{{ field.name }}">
+            <p>
+            {{ field.label_tag }}<br>
+            {{ field }}
+            {% if field.help_text %}
+            <small>{{ field.help_text }}</small>
+            {% endif %}
+            {% if field.errors %}
+            <small>{{ field.errors }}</small>
+            {% endif %}
+            </p>
+        </div>
+        {% endfor %}
+        </div>
+        {{ form.non_field_errors }}
+        <input type="submit" value="{% trans 'Login to Update Slots' %}" id="login-button">
     </form>
     {% endif %}
     <script type="text/javascript" src="{% static 'zitap/js/live-updates.js' %}"></script>

+ 2 - 2
zitap/templates/zitap/index.html

@@ -3,7 +3,7 @@
 <!DOCTYPE html>
 <html lang="en">
   <head>
-    <title>{% block title %}Zitap{% endblock %}</title>
+    <title>{% block title %}{% trans "Zitap" %}{% endblock %}</title>
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="stylesheet" href="{% static 'zitap/css/style.css' %}">
     <link rel="stylesheet" href="{% static 'zitap/css/date-picker.css' %}">
@@ -12,7 +12,7 @@
   </head>
   <body>
     <div class="container">
-      <header class="main-head">Zitap</header>
+      <header class="main-head">{% trans "Zitap" %}</header>
       <nav class="main-nav">
         <ul>
           <li><a href="{% url 'index' %}">{% trans "Home" %}</a></li>

+ 9 - 3
zitap/views.py

@@ -4,6 +4,7 @@ from django.http import HttpResponseNotFound, HttpResponseRedirect, JsonResponse
 from django.shortcuts import render
 from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout
 from django.views.decorators.csrf import csrf_exempt
+from django.utils.translation import gettext as _
 from django.contrib.auth.models import User
 
 from .forms import CreateEventForm, LoginForm, UpdateSlotsForm
@@ -37,7 +38,7 @@ def create_event(request):
                     return HttpResponseRedirect(f'/{event.url}')
                 except IntegrityError:
                     n += 1
-            form.add_error(None, 'Could not create event. Please try again.')
+            form.add_error(None, _('Could not create event. Please try again.'))
     else:
         form = CreateEventForm()
     return render(request, 'zitap/create-event.html', {'form': form})
@@ -79,7 +80,7 @@ def login(request, url):
             try:
                 user = User.objects.create_user(data['username'], password=data.get('password'))
             except IntegrityError:
-                form.add_error('username', 'Username already exists')
+                form.add_error('username', _('Username already exists'))
                 return render(
                     request, 
                     'zitap/event.html', 
@@ -91,6 +92,12 @@ def login(request, url):
         participant.save()
         request.session['user_id'] = user.id
         return HttpResponseRedirect(f'/{event.url}')
+    form.add_error(None, _('Login failed'))
+    return render(
+        request, 
+        'zitap/event.html', 
+        {'event': event, 'grid': slots2grid(event, event.participant_set.all()), 'login_form': form, 'update_form': None}
+    )
 
 def logout(request, url):
     try:
@@ -136,7 +143,6 @@ def slots_api(request, url):
             form = UpdateSlotsForm(request.POST, participant=participant)
             if form.is_valid():
                 data = form.cleaned_data
-                print(data['slots'])
                 participant.slots = string2slots(data['slots'], slot_count)
                 participant.save()
 

+ 3 - 2
zitap/widgets.py

@@ -4,6 +4,7 @@ import ctypes
 from django.forms.widgets import Widget
 from .models import Participant, Date, Event
 from .helpers import string2slots, get_slot_count, slots2string, slots2grid
+from django.utils.translation import gettext as _
 
 class DatePickerWidget(Widget):
     template_name = 'widgets/date-picker.html'
@@ -21,7 +22,7 @@ class DatePickerWidget(Widget):
         # get the weekdays
         weekdays = []
         for i in range(7):
-            weekdays.append((first_day_of_week + datetime.timedelta(days=i)).strftime('%A')[0])
+            weekdays.append(_((first_day_of_week + datetime.timedelta(days=i)).strftime('%a')))
         context['widget']['weekdays'] = weekdays
 
         # for the next weeks
@@ -30,7 +31,7 @@ class DatePickerWidget(Widget):
                 date = first_day_of_week + datetime.timedelta(days=i*7)
                 week = {
                     'days': [],
-                    'month': date.strftime('%b'),
+                    'month': _(date.strftime('%b')),
                     'year': date.strftime('%Y'),
                 }
                 for j in range(7):