Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • konstantin/akplanning
  • matedealer/akplanning
  • kif/akplanning
  • mirco/akplanning
  • lordofthevoid/akplanning
  • voidptr/akplanning
  • xayomer/akplanning-fork
  • mollux/akplanning
  • neumantm/akplanning
  • mmarx/akplanning
  • nerf/akplanning
  • felix_bonn/akplanning
  • sebastian.uschmann/akplanning
13 results
Show changes
Commits on Source (2)
import itertools import itertools
import re
from django import forms from django import forms
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
...@@ -10,6 +11,7 @@ from AKModel.models import AK, AKOwner, AKCategory, AKRequirement, AKSlot ...@@ -10,6 +11,7 @@ from AKModel.models import AK, AKOwner, AKCategory, AKRequirement, AKSlot
class AKForm(AvailabilitiesFormMixin, forms.ModelForm): class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
required_css_class = 'required' required_css_class = 'required'
split_string = re.compile('[,;]')
class Meta: class Meta:
model = AK model = AK
...@@ -42,7 +44,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -42,7 +44,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
self.fields["conflicts"].widget.attrs = {'class': 'chosen-select'} self.fields["conflicts"].widget.attrs = {'class': 'chosen-select'}
self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'} self.fields["prerequisites"].widget.attrs = {'class': 'chosen-select'}
help_tags_addition = _('Separate multiple tags with semicolon') help_tags_addition = _('Separate multiple tags with comma or semicolon')
# Add text fields for tags # Add text fields for tags
self.fields["tags_raw"] = forms.CharField( self.fields["tags_raw"] = forms.CharField(
...@@ -98,7 +100,9 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm): ...@@ -98,7 +100,9 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
cleaned_data["short_name"] = short_name cleaned_data["short_name"] = short_name
# Get tag names from raw tags # Get tag names from raw tags
cleaned_data["tag_names"] = [name.strip().lower() for name in cleaned_data["tags_raw"].split(";")] cleaned_data["tag_names"] = [name.strip().lower() for name
in self.split_string.split(cleaned_data["tags_raw"])
if name.strip() != '']
# Get durations from raw durations field # Get durations from raw durations field
if "durations" in cleaned_data: if "durations" in cleaned_data:
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
msgid "" 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: 2020-05-19 20:46+0000\n" "POT-Creation-Date: 2020-05-20 12:18+0000\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"
...@@ -17,20 +17,20 @@ msgstr "" ...@@ -17,20 +17,20 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: AKSubmission/forms.py:45 #: AKSubmission/forms.py:47
msgid "Separate multiple tags with semicolon" msgid "Separate multiple tags with comma or semicolon"
msgstr "Mehrere Tags mit Semikolon trennen" msgstr "Mehrere Tags mit Komma oder Semikolon trennen"
#: AKSubmission/forms.py:75 #: AKSubmission/forms.py:77
#, python-format #, python-format
msgid "\"%(duration)s\" is not a valid duration" msgid "\"%(duration)s\" is not a valid duration"
msgstr "\"%(duration)s\" ist keine gültige Dauer" msgstr "\"%(duration)s\" ist keine gültige Dauer"
#: AKSubmission/forms.py:118 #: AKSubmission/forms.py:122
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKSubmission/forms.py:120 #: AKSubmission/forms.py:124
msgid "" msgid ""
"Enter at least one planned duration (in hours). If your AK should have " "Enter at least one planned duration (in hours). If your AK should have "
"multiple slots, use multiple lines" "multiple slots, use multiple lines"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -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: 2020-05-19 21:50+0000\n" "POT-Creation-Date: 2020-05-20 12:18+0000\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"
...@@ -46,15 +46,15 @@ msgstr "Anzahl" ...@@ -46,15 +46,15 @@ msgstr "Anzahl"
msgid "Event Status" msgid "Event Status"
msgstr "Event-Status" msgstr "Event-Status"
#: templates/base.html:28 #: templates/base.html:29
msgid "" msgid ""
"Are you sure you want to change the language now? This will clear the form!" "Are you sure you want to change the language now? This will clear the form!"
msgstr "Wirklich jetzt die Sprache ändern? Das wird das Formular zurücksetzen!" msgstr "Wirklich jetzt die Sprache ändern? Das wird das Formular zurücksetzen!"
#: templates/base.html:97 #: templates/base.html:99
msgid "Impress" msgid "Impress"
msgstr "Impressum" msgstr "Impressum"
#: templates/base.html:100 #: templates/base.html:102
msgid "This software is open source" msgid "This software is open source"
msgstr "Diese Software ist Open Source" msgstr "Diese Software ist Open Source"