Skip to content
Snippets Groups Projects
Verified Commit db1fd49d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Replace every occurence of UNTIS by Untis

parent 2715d0b7
No related branches found
No related tags found
1 merge request!101Resolve "Replace every occurrence of UNTIS by Untis"
Pipeline #46212 passed
Showing
with 95 additions and 95 deletions
......@@ -3,7 +3,7 @@ from aleksis.core.util.apps import AppConfig
class UntisConfig(AppConfig):
name = "aleksis.apps.untis"
verbose_name = "AlekSIS — UNTIS interface"
verbose_name = "AlekSIS — Untis interface"
urls = {
"Repository": "https://edugit.org/AlekSIS/official/AlekSIS-App-Untis/",
......
......@@ -12,7 +12,7 @@ from .util.mysql.main import untis_import_mysql as _untis_import_mysql
class ImportCommand:
"""A generic UNTIS import command."""
"""A generic Untis import command."""
name = None
......@@ -39,7 +39,7 @@ class ImportCommand:
class CurrentImportCommand(ImportCommand):
"""Import data of current term from UNTIS."""
"""Import data of current term from Untis."""
name = "current"
......@@ -49,7 +49,7 @@ class CurrentImportCommand(ImportCommand):
class FutureImportCommand(ImportCommand):
"""Import data of future terms from UNTIS."""
"""Import data of future terms from Untis."""
name = "future"
......@@ -63,7 +63,7 @@ class AllImportCommand(ImportCommand):
class CurrentNextImportCommand(ImportCommand):
"""Import data of the current and next term from UNTIS."""
"""Import data of the current and next term from Untis."""
name = "current_next"
......@@ -77,7 +77,7 @@ class CurrentNextImportCommand(ImportCommand):
class CurrentFutureImportCommand(ImportCommand):
"""Import data of the current and future terms from UNTIS."""
"""Import data of the current and future terms from Untis."""
name = "current_future"
......
......@@ -19,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:9
......@@ -36,28 +36,28 @@ msgstr ""
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgid "Untis import reference"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:23
msgid "UNTIS school year ID"
msgid "Untis school year ID"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:26
msgid "UNTIS school id"
msgid "Untis school id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:29
msgid "UNTIS version id"
msgid "Untis version id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:41
msgid "Lesson id in UNTIS"
msgid "Lesson id in Untis"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:45
#: aleksis/apps/untis/model_extensions.py:50
msgid "Number of lesson element in UNTIS"
msgid "Number of lesson element in Untis"
msgstr ""
#: aleksis/apps/untis/models.py:4221
......@@ -65,7 +65,7 @@ msgid "Can assign subjects to groups"
msgstr ""
#: aleksis/apps/untis/preferences.py:8
msgid "UNTIS: MySQL"
msgid "Untis: MySQL"
msgstr ""
#: aleksis/apps/untis/preferences.py:16
......@@ -121,5 +121,5 @@ msgid " Skip because missing subject"
msgstr ""
#: aleksis/apps/untis/util/mysql/importers/lessons.py:266
msgid "Deleted by UNTIS import"
msgid "Deleted by Untis import"
msgstr ""
......@@ -19,8 +19,8 @@ msgstr ""
"X-Generator: Weblate 4.3.2\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgstr "Fächer mit Gruppen verknüpfen (für UNTIS-MySQL-Import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr "Fächer mit Gruppen verknüpfen (für Untis-MySQL-Import)"
#: aleksis/apps/untis/model_extensions.py:9
#: aleksis/apps/untis/model_extensions.py:12
......@@ -36,37 +36,37 @@ msgstr "Fächer mit Gruppen verknüpfen (für UNTIS-MySQL-Import)"
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgstr "UNTIS-Importreferenz"
msgid "Untis import reference"
msgstr "Untis-Importreferenz"
#: aleksis/apps/untis/model_extensions.py:23
msgid "UNTIS school year ID"
msgstr "UNTIS-Schuljahr-ID"
msgid "Untis school year ID"
msgstr "Untis-Schuljahr-ID"
#: aleksis/apps/untis/model_extensions.py:26
msgid "UNTIS school id"
msgstr "UNTIS-Schul-ID"
msgid "Untis school id"
msgstr "Untis-Schul-ID"
#: aleksis/apps/untis/model_extensions.py:29
msgid "UNTIS version id"
msgstr "UNTIS-Versions-ID"
msgid "Untis version id"
msgstr "Untis-Versions-ID"
#: aleksis/apps/untis/model_extensions.py:41
msgid "Lesson id in UNTIS"
msgstr "Unterrichtsnummer in UNTIS"
msgid "Lesson id in Untis"
msgstr "Unterrichtsnummer in Untis"
#: aleksis/apps/untis/model_extensions.py:45
#: aleksis/apps/untis/model_extensions.py:50
msgid "Number of lesson element in UNTIS"
msgstr "Nummer des Unterrichtselement in UNTIS"
msgid "Number of lesson element in Untis"
msgstr "Nummer des Unterrichtselement in Untis"
#: aleksis/apps/untis/models.py:4221
msgid "Can assign subjects to groups"
msgstr "Kann Fächer zu Gruppen zuzuordnen"
#: aleksis/apps/untis/preferences.py:8
msgid "UNTIS: MySQL"
msgstr "UNTIS: MySQL"
msgid "Untis: MySQL"
msgstr "Untis: MySQL"
#: aleksis/apps/untis/preferences.py:16
msgid "Update values of existing subjects"
......@@ -121,8 +121,8 @@ msgid " Skip because missing subject"
msgstr " Wird wegen fehlendem Fach übersprungen"
#: aleksis/apps/untis/util/mysql/importers/lessons.py:266
msgid "Deleted by UNTIS import"
msgstr "Gelöscht durch UNTIS-Import"
msgid "Deleted by Untis import"
msgstr "Gelöscht durch Untis-Import"
#~ msgid "Untis XML export"
#~ msgstr "Untis-XML-Export"
......@@ -131,7 +131,7 @@ msgstr "Gelöscht durch UNTIS-Import"
#~ msgstr "Pfad zur Untis-XML-Exportdatei"
#~ msgid "Untis XML import"
#~ msgstr "UNTIS-XML-Import"
#~ msgstr "Untis-XML-Import"
#~ msgid "Can do XML import"
#~ msgstr "Kann XML-Import durchführen"
......@@ -207,14 +207,14 @@ msgstr "Gelöscht durch UNTIS-Import"
#~ msgid "Failed to import lesson: Teacher %s does not exist."
#~ msgstr "Fehler beim Importieren der Stunde: Lehrer %s existiert nicht."
#~ msgid "UNTIS subject"
#~ msgstr "UNTIS-Fach"
#~ msgid "Untis subject"
#~ msgstr "Untis-Fach"
#~ msgid "The UNTIS import will use this for matching course groups(along with parent groups)."
#~ msgstr "Der UNTIS-Importer nutzt diese Angaben (gemeinsam mit Elterngruppen), um Kursgruppen zuzuordnen."
#~ msgid "The Untis import will use this for matching course groups(along with parent groups)."
#~ msgstr "Der Untis-Importer nutzt diese Angaben (gemeinsam mit Elterngruppen), um Kursgruppen zuzuordnen."
#~ msgid "Term id in UNTIS"
#~ msgstr "ID der Periode in UNTIS"
#~ msgid "Term id in Untis"
#~ msgstr "ID der Periode in Untis"
#~ msgid "Assign subjects to groups"
#~ msgstr "Fächer zu Gruppen zuordnen"
......@@ -222,11 +222,11 @@ msgstr "Gelöscht durch UNTIS-Import"
#~ msgid ""
#~ "\n"
#~ " You can use this form to assign subjects to groups. Please enter the exact names of the subjects as they are\n"
#~ " saved in UNTIS (case-insensitive). These values are only used to match course groups while importing from MySQL.\n"
#~ " saved in Untis (case-insensitive). These values are only used to match course groups while importing from MySQL.\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " Sie können diese Seite nutzen, um Fächer zu Gruppen zuzuordnen. Bitte geben Sie die exakten Namen der Fächer ein, so, wie sie in UNTIS\n"
#~ " Sie können diese Seite nutzen, um Fächer zu Gruppen zuzuordnen. Bitte geben Sie die exakten Namen der Fächer ein, so, wie sie in Untis\n"
#~ "gespeichert sind (Groß- und Kleinschreibung wird ignoriert). Diese Werte werden nur benutzt, um Kursgruppen im MySQL-Import zuzuordnen.\n"
#~ " "
......
......@@ -19,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:9
......@@ -36,7 +36,7 @@ msgstr ""
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgid "Untis import reference"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:23
......
......@@ -19,7 +19,7 @@ msgstr ""
"X-Generator: Weblate 4.1.1\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:9
......@@ -36,28 +36,28 @@ msgstr ""
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgid "Untis import reference"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:23
msgid "UNTIS school year ID"
msgid "Untis school year ID"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:26
msgid "UNTIS school id"
msgid "Untis school id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:29
msgid "UNTIS version id"
msgid "Untis version id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:41
msgid "Lesson id in UNTIS"
msgid "Lesson id in Untis"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:45
#: aleksis/apps/untis/model_extensions.py:50
msgid "Number of lesson element in UNTIS"
msgid "Number of lesson element in Untis"
msgstr ""
#: aleksis/apps/untis/models.py:4221
......@@ -65,7 +65,7 @@ msgid "Can assign subjects to groups"
msgstr ""
#: aleksis/apps/untis/preferences.py:8
msgid "UNTIS: MySQL"
msgid "Untis: MySQL"
msgstr ""
#: aleksis/apps/untis/preferences.py:16
......@@ -121,7 +121,7 @@ msgid " Skip because missing subject"
msgstr ""
#: aleksis/apps/untis/util/mysql/importers/lessons.py:266
msgid "Deleted by UNTIS import"
msgid "Deleted by Untis import"
msgstr ""
#~ msgid "Group"
......
......@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:9
......@@ -35,28 +35,28 @@ msgstr ""
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgid "Untis import reference"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:23
msgid "UNTIS school year ID"
msgid "Untis school year ID"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:26
msgid "UNTIS school id"
msgid "Untis school id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:29
msgid "UNTIS version id"
msgid "Untis version id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:41
msgid "Lesson id in UNTIS"
msgid "Lesson id in Untis"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:45
#: aleksis/apps/untis/model_extensions.py:50
msgid "Number of lesson element in UNTIS"
msgid "Number of lesson element in Untis"
msgstr ""
#: aleksis/apps/untis/models.py:4221
......@@ -64,7 +64,7 @@ msgid "Can assign subjects to groups"
msgstr ""
#: aleksis/apps/untis/preferences.py:8
msgid "UNTIS: MySQL"
msgid "Untis: MySQL"
msgstr ""
#: aleksis/apps/untis/preferences.py:16
......@@ -120,5 +120,5 @@ msgid " Skip because missing subject"
msgstr ""
#: aleksis/apps/untis/util/mysql/importers/lessons.py:266
msgid "Deleted by UNTIS import"
msgid "Deleted by Untis import"
msgstr ""
......@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: aleksis/apps/untis/menus.py:6
msgid "Link subjects to groups (for UNTIS MySQL import)"
msgid "Link subjects to groups (for Untis MySQL import)"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:9
......@@ -35,28 +35,28 @@ msgstr ""
#: aleksis/apps/untis/model_extensions.py:66
#: aleksis/apps/untis/model_extensions.py:69
#: aleksis/apps/untis/model_extensions.py:72
msgid "UNTIS import reference"
msgid "Untis import reference"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:23
msgid "UNTIS school year ID"
msgid "Untis school year ID"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:26
msgid "UNTIS school id"
msgid "Untis school id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:29
msgid "UNTIS version id"
msgid "Untis version id"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:41
msgid "Lesson id in UNTIS"
msgid "Lesson id in Untis"
msgstr ""
#: aleksis/apps/untis/model_extensions.py:45
#: aleksis/apps/untis/model_extensions.py:50
msgid "Number of lesson element in UNTIS"
msgid "Number of lesson element in Untis"
msgstr ""
#: aleksis/apps/untis/models.py:4221
......@@ -64,7 +64,7 @@ msgid "Can assign subjects to groups"
msgstr ""
#: aleksis/apps/untis/preferences.py:8
msgid "UNTIS: MySQL"
msgid "Untis: MySQL"
msgstr ""
#: aleksis/apps/untis/preferences.py:16
......@@ -120,5 +120,5 @@ msgid " Skip because missing subject"
msgstr ""
#: aleksis/apps/untis/util/mysql/importers/lessons.py:266
msgid "Deleted by UNTIS import"
msgid "Deleted by Untis import"
msgstr ""
......@@ -3,7 +3,7 @@ from django.utils.translation import gettext_lazy as _
MENUS = {
"DATA_MANAGEMENT_MENU": [
{
"name": _("Link subjects to groups (for UNTIS MySQL import)"),
"name": _("Link subjects to groups (for Untis MySQL import)"),
"url": "untis_groups_subjects",
"validators": [
(
......
......@@ -6,61 +6,61 @@ from aleksis.apps.chronos import models as chronos_models
from aleksis.core import models as core_models
core_models.SchoolTerm.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
core_models.Person.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
core_models.Group.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
# Chronos models
chronos_models.ValidityRange.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.ValidityRange.field(
school_year_untis=IntegerField(verbose_name=_("UNTIS school year ID"), null=True, blank=True)
school_year_untis=IntegerField(verbose_name=_("Untis school year ID"), null=True, blank=True)
)
chronos_models.ValidityRange.field(
school_id_untis=IntegerField(verbose_name=_("UNTIS school id"), null=True, blank=True)
school_id_untis=IntegerField(verbose_name=_("Untis school id"), null=True, blank=True)
)
chronos_models.ValidityRange.field(
version_id_untis=IntegerField(verbose_name=_("UNTIS version id"), null=True, blank=True)
version_id_untis=IntegerField(verbose_name=_("Untis version id"), null=True, blank=True)
)
chronos_models.Subject.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.Room.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.SupervisionArea.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.Lesson.field(
lesson_id_untis=IntegerField(verbose_name=_("Lesson id in UNTIS"), null=True, blank=True)
lesson_id_untis=IntegerField(verbose_name=_("Lesson id in Untis"), null=True, blank=True)
)
chronos_models.Lesson.field(
element_id_untis=IntegerField(
verbose_name=_("Number of lesson element in UNTIS"), null=True, blank=True
verbose_name=_("Number of lesson element in Untis"), null=True, blank=True
)
)
chronos_models.LessonPeriod.field(
element_id_untis=IntegerField(
verbose_name=_("Number of lesson element in UNTIS"), null=True, blank=True
verbose_name=_("Number of lesson element in Untis"), null=True, blank=True
)
)
chronos_models.LessonSubstitution.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.SupervisionSubstitution.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.AbsenceReason.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.Absence.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
import_ref_untis=IntegerField(verbose_name=_("Untis import reference"), null=True, blank=True)
)
chronos_models.Event.field(
import_ref_untis=IntegerField(verbose_name=_("UNTIS import reference"), null=True, blank=True)
......
......@@ -5,7 +5,7 @@ from dynamic_preferences.types import BooleanPreference
from aleksis.core.registries import site_preferences_registry
untis_mysql = Section("untis_mysql", verbose_name=_("UNTIS: MySQL"))
untis_mysql = Section("untis_mysql", verbose_name=_("Untis: MySQL"))
@site_preferences_registry.register
......
......@@ -277,6 +277,6 @@ def import_lessons(
if lesson.lesson_id_untis and lesson.lesson_id_untis not in existing_lessons:
logger.info("Lesson {} deleted".format(lesson.id))
with reversion.create_revision():
set_comment(_("Deleted by UNTIS import"))
set_comment(_("Deleted by Untis import"))
lesson.save()
lesson.delete()
......@@ -33,7 +33,7 @@ def untis_import_mysql(terms: Optional[QuerySet] = None):
validity_ref.values(), desc="Import data for terms", **TQDM_DEFAULTS
):
with reversion.create_revision(atomic=True):
reversion.set_comment(f"UNTIS import for validity range {validity_range}")
reversion.set_comment(f"Untis import for validity range {validity_range}")
# Common data for Chronos
subjects_ref = import_subjects(validity_range)
......
......@@ -82,18 +82,18 @@ def untis_split_third(s: str, conv: Callable[[Any], Any] = lambda el: el) -> Seq
def untis_date_to_date(untis: int) -> date:
"""Convert a UNTIS date to a python date."""
"""Convert a Untis date to a python date."""
return datetime.strptime(str(untis), UNTIS_DATE_FORMAT).date()
def date_to_untis_date(from_date: date) -> int:
"""Convert a python date to a UNTIS date."""
"""Convert a python date to a Untis date."""
return int(from_date.strftime(UNTIS_DATE_FORMAT))
def untis_colour_to_hex(colour: int) -> str:
"""Convert a numerical colour in BGR order to a standard hex RGB string."""
# Convert UNTIS number to HEX
# Convert Untis number to HEX
hex_bgr = str(hex(colour))[2:].zfill(6)
# Change BGR to RGB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment