From b6f509c057b407bbf6427d8afd003fe9c6dea1d5 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 2 Apr 2020 16:33:26 +0200 Subject: [PATCH] Added Multilingualism to all Lehrauftraege Tablewidgets' columns fields --- .../lehrauftrag/acceptLehrauftragData.php | 49 +++++++-------- .../lehrauftrag/approveLehrauftragData.php | 61 ++++++++++--------- .../lehrauftrag/cancelledLehrauftragData.php | 15 ++--- .../lehrauftrag/orderLehrauftragData.php | 60 +++++++++--------- 4 files changed, 94 insertions(+), 91 deletions(-) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index e172cc83a..02507646f 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -297,33 +297,34 @@ $filterWidgetArray = array( 'tableUniqueId' => 'acceptLehrauftrag', 'requiredPermissions' => 'lehre/lehrauftrag_akzeptieren', 'datasetRepresentation' => 'tabulator', - 'columnsAliases' => array( // TODO: use phrasen + 'columnsAliases' => array( 'Status', // alias for row_index, because row_index is formatted to display the status icons - 'LV- / Projektbezeichnung', - 'Studiengang', - 'Gruppe', - 'Typ', - 'LV-Teil', - 'LV-ID', - 'PA-ID', - 'Studiensemester', - 'Studiengang-KZ', + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '- / '. + ucfirst($this->p->t('ui', 'projekt')). lcfirst($this->p->t('ui', 'bezeichnung')), + ucfirst($this->p->t('lehre', 'studiengang')), + ucfirst($this->p->t('lehre', 'gruppe')), + ucfirst($this->p->t('global', 'typ')), + ucfirst($this->p->t('lehre', 'lehreinheit')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '-ID', + ucfirst($this->p->t('ui', 'projektarbeit')). '-ID', + ucfirst($this->p->t('lehre', 'studiensemester')), + ucfirst($this->p->t('lehre', 'studiengang')). '-'. ucfirst($this->p->t('ui', 'kz')), 'Semester', - 'OrgForm', + ucfirst($this->p->t('lehre', 'organisationsform')), 'Person-ID', - 'Organisationseinheit', - 'Stunden', - 'Betrag', - 'Vertrag-ID', - 'Vertrag-Stunden', - 'Vertrag-Betrag', + ucfirst($this->p->t('lehre', 'organisationseinheit')), + ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'betrag')), + ucfirst($this->p->t('ui', 'vertrag')). '-ID', + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'betrag')), 'UID', - 'Bestellt', - 'Erteilt', - 'Angenommen', - 'Bestellt von', - 'Erteilt von', - 'Angenommen von' + ucfirst($this->p->t('ui', 'bestellt')), + ucfirst($this->p->t('ui', 'erteilt')), + ucfirst($this->p->t('ui', 'angenommen')), + ucfirst($this->p->t('ui', 'bestelltVon')), + ucfirst($this->p->t('ui', 'erteiltVon')), + ucfirst($this->p->t('ui', 'angenommenVon')) ), 'datasetRepOptions' => '{ height: func_height(this), @@ -363,7 +364,7 @@ $filterWidgetArray = array( row_index: {visible:false}, // necessary for row indexing auftrag: { headerFilter:"input", widthGrow: 3, - bottomCalc:"count", bottomCalcFormatter:function(cell){return "Anzahl: " + cell.getValue();} + bottomCalc:"count", bottomCalcFormatter:function(cell){return "'. ucfirst($this->p->t('global', 'anzahl')). ': " + cell.getValue();} }, stg_typ_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 0fb1bfc7e..d2a2e08fc 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -305,36 +305,37 @@ $filterWidgetArray = array( 'tableUniqueId' => 'approveLehrauftrag', 'requiredPermissions' => 'lehre/lehrauftrag_erteilen', 'datasetRepresentation' => 'tabulator', - 'columnsAliases' => array( // TODO: use phrasen + 'columnsAliases' => array( 'Status', // alias for row_index, because row_index is formatted to display the status icons - 'Personalnummer', - 'LV- / Projektbezeichnung', - 'Studiengang', - 'Gruppe', - 'Typ', - 'LV-Teil', - 'LV-ID', - 'LV', - 'PA-ID', - 'Studiensemester', - 'Studiengang-KZ', - 'Semester', - 'OrgForm', - 'Person-ID', - 'Organisationseinheit', - 'Lektor', - 'Stunden', - 'Betrag', - 'Vertrag-ID', - 'Vertrag-Stunden', - 'Vertrag-Betrag', - 'UID', - 'Bestellt', - 'Erteilt', - 'Angenommen', - 'Bestellt von', - 'Erteilt von', - 'Angenommen von' + ucfirst($this->p->t('global', 'personalnummer')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '- / '. + ucfirst($this->p->t('ui', 'projekt')). lcfirst($this->p->t('ui', 'bezeichnung')), + ucfirst($this->p->t('lehre', 'studiengang')), + ucfirst($this->p->t('lehre', 'gruppe')), + ucfirst($this->p->t('global', 'typ')), + ucfirst($this->p->t('lehre', 'lehreinheit')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '-ID', + ucfirst($this->p->t('lehre', 'lehrveranstaltung')), + ucfirst($this->p->t('ui', 'projektarbeit')). '-ID', + ucfirst($this->p->t('lehre', 'studiensemester')), + ucfirst($this->p->t('lehre', 'studiengang')). '-'. ucfirst($this->p->t('ui', 'kz')), + 'Semester', + ucfirst($this->p->t('lehre', 'organisationsform')), + 'Person-ID', + ucfirst($this->p->t('lehre', 'organisationseinheit')), + ucfirst($this->p->t('lehre', 'lektor')), + ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'betrag')), + ucfirst($this->p->t('ui', 'vertrag')). '-ID', + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'betrag')), + 'UID', + ucfirst($this->p->t('ui', 'bestellt')), + ucfirst($this->p->t('ui', 'erteilt')), + ucfirst($this->p->t('ui', 'angenommen')), + ucfirst($this->p->t('ui', 'bestelltVon')), + ucfirst($this->p->t('ui', 'erteiltVon')), + ucfirst($this->p->t('ui', 'angenommenVon')) ), 'datasetRepOptions' => '{ height: func_height(this), @@ -382,7 +383,7 @@ $filterWidgetArray = array( personalnummer: {visible: false, headerFilter:"input"}, auftrag: { headerFilter:"input", widthGrow: 2, - bottomCalc:"count", bottomCalcFormatter:function(cell){return "Anzahl: " + cell.getValue();} + bottomCalc:"count", bottomCalcFormatter:function(cell){return "'. ucfirst($this->p->t('global', 'anzahl')). ': " + cell.getValue();} }, stg_typ_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, diff --git a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php index e167941d7..54948fb26 100644 --- a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php @@ -53,14 +53,15 @@ $tableWidgetArray = array( 'tableUniqueId' => 'cancelledLehrauftrag', 'requiredPermissions' => 'lehre/lehrauftrag_akzeptieren', 'datasetRepresentation' => 'tabulator', - 'columnsAliases' => array( // TODO: use phrasen + 'columnsAliases' => array( 'Status', - 'Studiensemester', - 'Typ', - 'LV- / Projektbezeichnung', - 'Stunden', - 'Betrag', - 'Storniert am' + ucfirst($this->p->t('lehre', 'studiensemester')), + ucfirst($this->p->t('global', 'typ')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '- / '. ucfirst($this->p->t('ui', 'projekt')). lcfirst($this->p->t('ui', 'bezeichnung')), + ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'betrag')), + ucfirst($this->p->t('ui', 'storniertAm')), + ucfirst($this->p->t('ui', 'storniertVon')) ), 'datasetRepOptions' => '{ rowFormatter:function(row){ diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 4f605277b..24a86ce14 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -337,39 +337,39 @@ $filterWidgetArray = array( 'tableUniqueId' => 'orderLehrauftrag', 'requiredPermissions' => 'lehre/lehrauftrag_bestellen', 'datasetRepresentation' => 'tabulator', - 'columnsAliases' => array( // TODO: use phrasen + 'columnsAliases' => array( 'Status', // alias for row_index, because row_index is formatted to display the status icons - 'Personalnummer', - 'LV- / Projektbezeichnung', - 'Studiengang', - 'Gruppe', - 'Typ', - 'LV-Teil', - 'LV-ID', - 'LV', - 'PA-ID', - 'Studiensemester', - 'Studiengang-KZ', - + ucfirst($this->p->t('global', 'personalnummer')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '- / '. + ucfirst($this->p->t('ui', 'projekt')). lcfirst($this->p->t('ui', 'bezeichnung')), + ucfirst($this->p->t('lehre', 'studiengang')), + ucfirst($this->p->t('lehre', 'gruppe')), + ucfirst($this->p->t('global', 'typ')), + ucfirst($this->p->t('lehre', 'lehreinheit')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')). '-ID', + ucfirst($this->p->t('lehre', 'lehrveranstaltung')), + ucfirst($this->p->t('ui', 'projektarbeit')). '-ID', + ucfirst($this->p->t('lehre', 'studiensemester')), + ucfirst($this->p->t('lehre', 'studiengang')). '-'. ucfirst($this->p->t('ui', 'kz')), 'Semester', - 'Studienplan', - 'OrgForm', + ucfirst($this->p->t('lehre', 'studienplan')), + ucfirst($this->p->t('lehre', 'organisationsform')), 'Person-ID', - 'Organisationseinheit', - 'Lektor', - 'Stunden', - 'Stundensatz', - 'Betrag', - 'Vertrag-ID', - 'Vertrag-Stunden', - 'Vertrag-Betrag', + ucfirst($this->p->t('lehre', 'organisationseinheit')), + ucfirst($this->p->t('lehre', 'lektor')), + ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'stundensatz')), + ucfirst($this->p->t('ui', 'betrag')), + ucfirst($this->p->t('ui', 'vertrag')). '-ID', + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'stunden')), + ucfirst($this->p->t('ui', 'vertrag')). '-'. ucfirst($this->p->t('ui', 'betrag')), 'UID', - 'Bestellt', - 'Erteilt', - 'Angenommen', - 'Bestellt von', - 'Erteilt von', - 'Angenommen von' + ucfirst($this->p->t('ui', 'bestellt')), + ucfirst($this->p->t('ui', 'erteilt')), + ucfirst($this->p->t('ui', 'angenommen')), + ucfirst($this->p->t('ui', 'bestelltVon')), + ucfirst($this->p->t('ui', 'erteiltVon')), + ucfirst($this->p->t('ui', 'angenommenVon')) ), 'datasetRepOptions' => '{ height: func_height(this), @@ -418,7 +418,7 @@ $filterWidgetArray = array( personalnummer: {visible: false, headerFilter:"input"}, auftrag: { headerFilter:"input", widthGrow: 2, - bottomCalc:"count", bottomCalcFormatter:function(cell){return "Anzahl: " + cell.getValue();} + bottomCalc:"count", bottomCalcFormatter:function(cell){return "'. ucfirst($this->p->t('global', 'anzahl')). ': " + cell.getValue();} }, stg_typ_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"},