Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Blanke
AKPlanning
Commits
37e7722f
Commit
37e7722f
authored
4 years ago
by
Benjamin Hättasch
Browse files
Options
Downloads
Patches
Plain Diff
Allow usage of semicolon or comma for tag list in submission
Closes
#84
parent
1e1173fb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AKSubmission/forms.py
+6
-2
6 additions, 2 deletions
AKSubmission/forms.py
AKSubmission/locale/de_DE/LC_MESSAGES/django.po
+8
-8
8 additions, 8 deletions
AKSubmission/locale/de_DE/LC_MESSAGES/django.po
locale/de_DE/LC_MESSAGES/django.po
+4
-4
4 additions, 4 deletions
locale/de_DE/LC_MESSAGES/django.po
with
18 additions
and
14 deletions
AKSubmission/forms.py
+
6
−
2
View file @
37e7722f
import
itertools
import
re
from
django
import
forms
from
django.core.exceptions
import
ValidationError
...
...
@@ -10,6 +11,7 @@ from AKModel.models import AK, AKOwner, AKCategory, AKRequirement, AKSlot
class
AKForm
(
AvailabilitiesFormMixin
,
forms
.
ModelForm
):
required_css_class
=
'
required
'
split_string
=
re
.
compile
(
'
[,;]
'
)
class
Meta
:
model
=
AK
...
...
@@ -42,7 +44,7 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
self
.
fields
[
"
conflicts
"
].
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
self
.
fields
[
"
tags_raw
"
]
=
forms
.
CharField
(
...
...
@@ -98,7 +100,9 @@ class AKForm(AvailabilitiesFormMixin, forms.ModelForm):
cleaned_data
[
"
short_name
"
]
=
short_name
# 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
if
"
durations
"
in
cleaned_data
:
...
...
This diff is collapsed.
Click to expand it.
AKSubmission/locale/de_DE/LC_MESSAGES/django.po
+
8
−
8
View file @
37e7722f
...
...
@@ -2,13 +2,13 @@
# 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: 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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -17,20 +17,20 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: AKSubmission/forms.py:4
5
msgid "Separate multiple tags with semicolon"
msgstr "Mehrere Tags mit Semikolon trennen"
#: AKSubmission/forms.py:4
7
msgid "Separate multiple tags with
comma or
semicolon"
msgstr "Mehrere Tags mit
Komma oder
Semikolon trennen"
#: AKSubmission/forms.py:7
5
#: AKSubmission/forms.py:7
7
#, python-format
msgid "\"%(duration)s\" is not a valid duration"
msgstr "\"%(duration)s\" ist keine gültige Dauer"
#: AKSubmission/forms.py:1
18
#: AKSubmission/forms.py:1
22
msgid "Duration(s)"
msgstr "Dauer(n)"
#: AKSubmission/forms.py:12
0
#: AKSubmission/forms.py:12
4
msgid ""
"Enter at least one planned duration (in hours). If your AK should have "
"multiple slots, use multiple lines"
...
...
This diff is collapsed.
Click to expand it.
locale/de_DE/LC_MESSAGES/django.po
+
4
−
4
View file @
37e7722f
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -46,15 +46,15 @@ msgstr "Anzahl"
msgid "Event Status"
msgstr "Event-Status"
#: templates/base.html:2
8
#: templates/base.html:2
9
msgid ""
"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!"
#: templates/base.html:9
7
#: templates/base.html:9
9
msgid "Impress"
msgstr "Impressum"
#: templates/base.html:10
0
#: templates/base.html:10
2
msgid "This software is open source"
msgstr "Diese Software ist Open Source"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment