diff --git a/application/controllers/Documents.php b/application/controllers/Documents.php index e6a8c8f3c..47aae7ed1 100644 --- a/application/controllers/Documents.php +++ b/application/controllers/Documents.php @@ -37,6 +37,11 @@ class Documents extends Auth_Controller 'export' => self::PERM_LOGGED, 'exportSigned' => self::PERM_LOGGED ]); + + // Load Phrases + $this->loadPhrases([ + 'stv' + ]); } /** @@ -227,7 +232,7 @@ class Documents extends Auth_Controller $vorlage = current(getData($result)); if ($sign_user && !$vorlage->signierbar) - return show_error('Diese Vorlage darf nicht signiert werden'); // TODO(chris): phrase + return show_error($this->p->t("stv", "grades_error_sign")); // Filename diff --git a/application/controllers/api/frontend/v1/Documents.php b/application/controllers/api/frontend/v1/Documents.php index 7d5a50965..60010e14d 100644 --- a/application/controllers/api/frontend/v1/Documents.php +++ b/application/controllers/api/frontend/v1/Documents.php @@ -45,6 +45,11 @@ class Documents extends FHCAPI_Controller 'archive' => ['admin:rw', 'assistenz:rw'], 'archiveSigned' => ['admin:rw', 'assistenz:rw'] ]); + + // Load Phrases + $this->loadPhrases([ + 'stv' + ]); } /** @@ -177,7 +182,7 @@ class Documents extends FHCAPI_Controller $result = $this->PrestudentstatusModel->getLastStatus($student->prestudent_id, $ss); $status = current($this->getDataOrTerminateWithError($result)); if (!$status) - $this->terminateWithError('StudentIn hat keinen Status in diesem Semester'); // TODO(chris): phrase + $this->terminateWithError($this->p->t("stv", "grades_error_prestudentstatus")); $semester = $status->ausbildungssemester; $this->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel'); @@ -388,10 +393,10 @@ class Documents extends FHCAPI_Controller } if (!$vorlage->archivierbar) - $this->terminateWithError('Dieses Dokument ist nicht archivierbar'); // TODO(chris): phrase + $this->terminateWithError($this->p->t("stv", "grades_error_archive")); if ($sign_user && !$vorlage->signierbar) - $this->terminateWithError('Diese Vorlage darf nicht signiert werden'); // TODO(chris): phrase + $this->terminateWithError($this->p->t("stv", "grades_error_sign")); $this->load->library('DocumentExportLib'); diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index 848061241..c77ebc07b 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -272,8 +272,8 @@ class Config extends FHCAPI_Controller $title_ger = $this->p->t("global", "deutsch"); $title_eng = $this->p->t("global", "englisch"); - $title_ff = 'Zertifikat'; // TODO(chris): phrase - $title_lv = 'LV Zeugnis'; // TODO(chris): phrase + $title_ff = $this->p->t("stv", "document_certificate"); + $title_lv = $this->p->t("stv", "document_coursecertificate"); $link_ff = "documents/export/" . "zertifikat.rdf.php/" . @@ -298,7 +298,7 @@ class Config extends FHCAPI_Controller "&lvid={lehrveranstaltung_id}"; $archive_url = "api/frontend/v1/documents/archiveSigned"; - $archive_response = $this->p->t("stv", "document_signed_and_archived"); // TODO(chris): phrase + $archive_response = $this->p->t("stv", "document_signed_and_archived"); $archive_post_ff = [ "xml" => "zertifikat.rdf.php", "xsl" => "Zertifikat", @@ -326,7 +326,7 @@ class Config extends FHCAPI_Controller $list = [ [ - 'title' => '', // TODO(chris): phrase + 'title' => '', 'children' => [ [ 'title' => $title_ff, @@ -382,7 +382,7 @@ class Config extends FHCAPI_Controller ] ], [ - 'title' => '', // TODO(chris): phrase + 'title' => '', 'children' => [ [ 'title' => $title_ff, diff --git a/application/controllers/api/frontend/v1/stv/Grades.php b/application/controllers/api/frontend/v1/stv/Grades.php index 18524da1b..61d797495 100644 --- a/application/controllers/api/frontend/v1/stv/Grades.php +++ b/application/controllers/api/frontend/v1/stv/Grades.php @@ -44,6 +44,7 @@ class Grades extends FHCAPI_Controller // Load Phrases $this->loadPhrases([ + 'stv', 'person', 'lehre' ]); @@ -327,7 +328,7 @@ class Grades extends FHCAPI_Controller $certificateGrade = current($certificateGrade); if (!$certificateGrade->lkt_ueberschreibbar) - $this->terminateWithError("Nicht überschreibbar"); // TODO(chris): phrase + $this->terminateWithError($this->p->t("stv", "grades_error_overwrite")); // NOTE(chris): update $data['updateamum'] = $data['uebernahmedatum']; @@ -376,7 +377,7 @@ class Grades extends FHCAPI_Controller { $this->load->library('form_validation'); - $this->form_validation->set_rules("studierendenantrag_lehrveranstaltung_id", "", "required|integer"); // TODO(chris): phrase + $this->form_validation->set_rules("studierendenantrag_lehrveranstaltung_id", "studierendenantrag_lehrveranstaltung_id", "required|integer"); if (!$this->form_validation->run()) $this->terminateWithValidationErrors($this->form_validation->error_array()); @@ -454,7 +455,7 @@ class Grades extends FHCAPI_Controller $this->load->library('form_validation'); $this->form_validation->set_rules("lehrveranstaltung_id", $this->p->t('lehre', 'lehrveranstaltung'), "required|integer"); - $this->form_validation->set_rules("points", "Punkte", "required|numeric"); // TODO(chris): phrase + $this->form_validation->set_rules("points", $this->p->t("stv", "grades_points"), "required|numeric"); if (!$this->form_validation->run()) $this->terminateWithValidationErrors($this->form_validation->error_array()); @@ -496,7 +497,7 @@ class Grades extends FHCAPI_Controller if (isError($result)) return $result; if (!hasData($result)) - return error('Fehler beim Ermitteln der Lehreinheit ID'); // TODO(chris): phrase + return error($this->p->t("stv", "grades_error_lehreinheit_id")); $le = current(getData($result)); // Prepare diff --git a/application/libraries/DocumentExportLib.php b/application/libraries/DocumentExportLib.php index f0358371f..595ac461a 100644 --- a/application/libraries/DocumentExportLib.php +++ b/application/libraries/DocumentExportLib.php @@ -87,6 +87,9 @@ class DocumentExportLib // Gets CI instance $this->ci =& get_instance(); + // Load Phrases + $this->ci->load->library('PhrasesLib', ['document_export', null], 'documentExportPhrases'); + // Which document converter has to be used if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) { @@ -104,10 +107,10 @@ class DocumentExportLib $this->unoconv_version = $hlp[1]; } else - show_error('Could not get Unoconv Version'); // TODO(chris): phrase + show_error($this->ci->documentExportPhrases->t("document_export", "error_unoconv_version")); } else - show_error('Unoconv not found - Please install Unoconv'); // TODO(chris): phrase + show_error($this->ci->documentExportPhrases->t("document_export", "error_unoconv")); } } @@ -169,7 +172,11 @@ class DocumentExportLib $xml_data = new DOMDocument; if (!$xml_data->load($xml_url)) - return error('unable to load xml: ' . $xml_url . ' XML:' . $xml . ' PARAMs:' . $params); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_xml_load", [ + "url" => $xml_url, + "xml" => $xml, + "params" => $params + ])); return success($xml_data); } @@ -249,7 +256,7 @@ class DocumentExportLib $fsize = filesize($temp_filename); $handle = fopen($temp_filename, 'r'); if (!$handle) - return error('load failed'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_file_load")); $result = fread($handle, $fsize); fclose($handle); @@ -311,12 +318,12 @@ class DocumentExportLib $handle = fopen($temp_filename, 'r'); if (!$handle) { $this->close($temp_folder, $source_folder); - exit('load failed'); // TODO(chris): phrase + exit($this->ci->documentExportPhrases->t("document_export", "error_file_load")); } if (headers_sent()) { $this->close($temp_folder, $source_folder); - exit('Header wurden bereits gesendet -> Abbruch'); // TODO(chris): phrase + exit($this->ci->documentExportPhrases->t("document_export", "error_headers")); } switch ($outputformat) { @@ -339,7 +346,7 @@ class DocumentExportLib break; default: $this->close($temp_folder, $source_folder); - exit('Outputformat is not defined'); // TODO(chris): phrase + exit($this->ci->documentExportPhrases->t("document_export", "error_outputformat_missing")); } while (!feof($handle)) { @@ -386,7 +393,7 @@ class DocumentExportLib if (isError($result)) return $result; if (!hasData($result)) - return error('no vorlage found'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_template_missing")); $vorlage_stg = current(getData($result)); foreach ($vorlage_stg as $k => $v) $vorlage->$k = $v; @@ -426,7 +433,7 @@ class DocumentExportLib { $content_xsl = new DOMDocument(); if (!$content_xsl->loadXML($vorlage->text)) - return error('unable to load xsl'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_xsl_load")); $proc = new XSLTProcessor(); $proc->importStyleSheet($content_xsl); @@ -442,7 +449,7 @@ class DocumentExportLib if ($vorlage->style) { $styles_xsl = new DOMDocument(); if (!$styles_xsl->loadXML($vorlage->style)) - return error('unable to load styles xsl'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_styles_load")); $style_proc = new XSLTProcessor(); $style_proc->importStyleSheet($styles_xsl); @@ -470,7 +477,7 @@ class DocumentExportLib $tempname_zip = $temp_folder . '/out.zip'; if (!copy($zipfile, $tempname_zip)) - return error('copy failed'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_file_copy")); exec("zip $tempname_zip content.xml"); if (!is_null($styles_xsl)) @@ -490,7 +497,7 @@ class DocumentExportLib $manifest_xml = new DOMDocument; if (!$manifest_xml->loadXML($manifest)) - return error('Manifest File ungueltig'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_manifest")); //root-node holen $root = $manifest_xml->getElementsByTagName('manifest')->item(0); @@ -547,11 +554,8 @@ class DocumentExportLib exec($command, $out, $ret); } - if ($ret) { - return error('Dokumentenkonvertierung ist derzeit nicht' . - ' möglich. Bitte versuchen Sie es in einer Minute' . - ' erneut oder kontaktieren Sie einen Administrator'); // TODO(chris): phrase - } + if ($ret) + return error($this->ci->documentExportPhrases->t("document_export", "error_conv_timeout")); break; case 'odt': default: @@ -576,7 +580,7 @@ class DocumentExportLib protected function sign($temp_folder, $temp_filename, $outputformat, $user, $profile) { if ($outputformat != 'pdf') - return error('Derzeit koennen nur PDFs signiert werden'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_sign_pdf")); // Load the File $file_data = file_get_contents($temp_filename); @@ -618,7 +622,7 @@ class DocumentExportLib $result = curl_exec($ch); if (curl_errno($ch)) { curl_close($ch); - return error('Signaturserver ist derzeit nicht erreichbar'); // TODO(chris): phrase + return error($this->ci->documentExportPhrases->t("document_export", "error_sign_timeout")); } curl_close($ch); $resultdata = json_decode($result); @@ -631,7 +635,7 @@ class DocumentExportLib } // otherwise if it is an error - return error($resultdata->retval ?? 'Unknown Error:' . $result); // TODO(chris): phrase + return error($resultdata->retval ?? $this->ci->documentExportPhrases->t("global", "unknown_error", ["error" => $result])); } /** diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Noten.js b/public/js/components/Stv/Studentenverwaltung/Details/Noten.js index 498e8ea6f..1d7b41d26 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Noten.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Noten.js @@ -38,13 +38,12 @@ export default { const savedPath = window.localStorage.getItem(LOCAL_STORAGE_ID); this.stdsem = savedPath || ''; }, - // TODO(chris): phrasen template: `
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Repeater.js b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Repeater.js index 2ff92450f..a80b1e4c1 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Repeater.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Repeater.js @@ -32,19 +32,17 @@ export default { ajaxResponse: (url, params, response) => { return response.data || []; }, - // TODO(chris): phrasen columns: [ - { field: 'lv_bezeichnung', title: 'Lehrveranstaltung' }, - { field: 'note_bezeichnung', title: 'Note' }, - { field: 'insertvon', title: 'MitarbeiterInUID', visible: false }, - { field: 'benotungsdatum', title: 'Benotungsdatum', visible: false }, - { field: 'freigabedatum', title: 'Freigabedatum', visible: false }, - { field: 'studiensemester_kurzbz', title: 'Studiensemester', visible: false }, - { field: 'stg_bezeichnung', title: 'Studiengang', visible: false }, - { field: 'note', title: 'Note', visible: false }, - { field: 'prestudent_uid', title: 'PrestudentID', visible: false }, - { field: 'lehrveranstaltung_id', title: 'Lehrveranstaltung ID', visible: false }, - { field: 'studierendenantrag_lehrveranstaltung_id', title: 'StudstatusLvID', visible: false } + { field: 'lv_bezeichnung', title: this.$p.t('lehre/lehrveranstaltung') }, + { field: 'note_bezeichnung', title: this.$p.t('lehre/note') }, + { field: 'insertvon', title: this.$p.t('profil/mitarbeiterIn'), visible: false }, + { field: 'benotungsdatum', title: this.$p.t('stv/grades_gradingdate'), visible: false }, + { field: 'freigabedatum', title: this.$p.t('stv/grades_approvaldate'), visible: false }, + { field: 'studiensemester_kurzbz', title: this.$p.t('lehre/studiensemester'), visible: false }, + { field: 'stg_bezeichnung', title: this.$p.t('lehre/studiengang'), visible: false }, + { field: 'note', title: this.$p.t('stv/grades_numericgrade'), visible: false }, + { field: 'prestudent_uid', title: this.$p.t('global/prestudentID'), visible: false }, + { field: 'lehrveranstaltung_id', title: this.$p.t('lehre/lehrveranstaltung_id'), visible: false } ], layout: 'fitDataStretch', height: '100%', @@ -75,19 +73,24 @@ export default { .allSettled(promises) .then(results => { if (results.some(res => res.status == "fulfilled")) { - // TODO(chris): phrase - this.$fhcAlert.alertSuccess("updated"); + this.$fhcAlert.alertSuccess(this.$p.t('stv/grades_updated')); this.$emit('copied'); } }); } }, + created() { + this.$p.loadCategory(['global', 'stv', 'lehre', 'profil']) + .then(() => { + if (this.$refs.table.tableBuilt) + this.$refs.table.tabulator.columnManager.setColumns(this.tabulatorOptions.columns); + }); + }, template: `
- diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Teacher.js b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Teacher.js index c15381f88..c9ad0cb2f 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Teacher.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Teacher.js @@ -32,18 +32,17 @@ export default { ajaxResponse: (url, params, response) => { return response.data || []; }, - // TODO(chris): phrasen columns: [ - { field: 'lehrveranstaltung_bezeichnung', title: 'Lehrveranstaltung' }, - { field: 'note_bezeichnung', title: 'Note' }, - { field: 'mitarbeiter_uid', title: 'MitarbeiterInUID', visible: false }, - { field: 'benotungsdatum', title: 'Benotungsdatum', visible: false }, - { field: 'freigabedatum', title: 'Freigabedatum', visible: false }, - { field: 'studiensemester_kurzbz', title: 'Studiensemester', visible: false }, - { field: 'note', title: 'Note', visible: false }, - { field: 'student_uid', title: 'StudentInUID', visible: false }, - { field: 'lehrveranstaltung_id', title: 'Lehrveranstaltung ID', visible: false }, - { field: 'punkte', title: 'Punkte', visible: false } + { field: 'lehrveranstaltung_bezeichnung', title: this.$p.t('lehre/lehrveranstaltung') }, + { field: 'note_bezeichnung', title: this.$p.t('lehre/note') }, + { field: 'mitarbeiter_uid', title: this.$p.t('profil/mitarbeiterIn'), visible: false }, + { field: 'benotungsdatum', title: this.$p.t('stv/grades_gradingdate'), visible: false }, + { field: 'freigabedatum', title: this.$p.t('stv/grades_approvaldate'), visible: false }, + { field: 'studiensemester_kurzbz', title: this.$p.t('lehre/studiensemester'), visible: false }, + { field: 'note', title: this.$p.t('stv/grades_numericgrade'), visible: false }, + { field: 'student_uid', title: this.$p.t('profil/studentIn'), visible: false }, + { field: 'lehrveranstaltung_id', title: this.$p.t('lehre/lehrveranstaltung_id'), visible: false }, + { field: 'punkte', title: this.$p.t('stv/grades_points'), visible: false } ], layout: 'fitDataStretch', height: '100%', @@ -74,19 +73,24 @@ export default { .allSettled(promises) .then(results => { if (results.some(res => res.status == "fulfilled")) { - // TODO(chris): phrase - this.$fhcAlert.alertSuccess("updated"); + this.$fhcAlert.alertSuccess(this.$p.t('stv/grades_updated')); this.$emit('copied'); } }); } }, + created() { + this.$p.loadCategory(['stv', 'lehre', 'profil']) + .then(() => { + if (this.$refs.table.tableBuilt) + this.$refs.table.tabulator.columnManager.setColumns(this.tabulatorOptions.columns); + }); + }, template: `
- diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis.js b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis.js index 6ff286199..6e2038193 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis.js @@ -48,7 +48,7 @@ export default { let gradeField = { field: 'note', - title: 'Note', + title: this.$p.t('lehre/note'), formatter: cell => cell.getData().note_bezeichnung, tooltip: (evt, cell) => cell.getData().note_bezeichnung }; @@ -66,7 +66,7 @@ export default { listPromise // get bezeichnung .then(list => list.find(el => el.value == note)) - .then(found => found ? found.label : Promise.reject({message: 'not found'})) + .then(found => found ? found.label : Promise.reject({message: 'grade ' + note + ' not found in list'})) // prepare data object .then(note_bezeichnung => ({ lehrveranstaltung_id, @@ -80,13 +80,13 @@ export default { // get bezeichnung again .then(() => listPromise) .then(list => list.find(el => el.value == note)) - .then(found => found ? found.label : Promise.reject({message: 'not found'})) + .then(found => found?.label) // update other fields in row .then(note_bezeichnung => cell.getRow().update({note_bezeichnung})) .then(() => cell.getRow().reformat()) // cleanup .then(cell.clearEdited) - .then(() => this.$fhcAlert.alertSuccess('updated')) // TODO(chris): phrase + .then(() => this.$fhcAlert.alertSuccess(this.$p.t('stv/grades_updated'))) .catch(err => { cell.restoreOldValue(); cell.clearEdited(); @@ -120,29 +120,32 @@ export default { valuesLookup: (cell, filterTerm) => listPromise }; } - gradeField.editorParams.placeholderLoading = "Loading Remote Data..." // TODO(chris): phrase + const node = document.createElement('span'); + this.$p.loadCategory('stv') + .then(() => node.innerText = this.$p.t('ui/loading')) + .catch(this.$fhcAlert.handleSystemError); + gradeField.editorParams.placeholderLoading = node; } const columns = [ - { field: 'zeugnis', title: 'Zeugnis', formatter: 'tickCross' }, - { field: 'lehrveranstaltung_bezeichnung', title: 'Lehrveranstaltung' }, + { field: 'zeugnis', title: this.$p.t('stv/grades_zeugnis'), formatter: 'tickCross' }, + { field: 'lehrveranstaltung_bezeichnung', title: this.$p.t('lehre/lehrveranstaltung') }, gradeField, - { field: 'uebernahmedatum', title: 'Übernahmedatum', visible: false }, - { field: 'benotungsdatum', title: 'Benotungsdatum', visible: false }, - { field: 'benotungsdatum-iso', title: 'Benotungsdatum ISO', visible: false }, - { field: 'studiensemester_kurzbz', title: 'Studiensemester', visible: false }, - { field: 'note_number', title: 'Note Numerisch', visible: false, formatter: cell => cell.getData().note, tooltip: (evt, cell) => cell.getData().note }, - { field: 'lehrveranstaltung_id', title: 'Lehrveranstaltung ID', visible: false }, - { field: 'studiengang', title: 'Studiengang', visible: false }, - { field: 'studiengang_kz', title: 'Studiengang Kennzahl', visible: false }, - { field: 'studiengang_lv', title: 'StudiengangLV', visible: false }, - { field: 'studiengang_kz_lv', title: 'Studiengang_kzLV', visible: false }, - { field: 'semester_lv', title: 'SemesterLV', visible: false }, - { field: 'ects_lv', title: 'ECTS', visible: false }, - { field: 'lehrform', title: 'Lehrform', visible: false }, - { field: 'kurzbz', title: 'Kurzbz', visible: false }, - { field: 'punkte', title: 'Punkte', visible: false }, - { field: 'lehrveranstaltung_bezeichnung_english', title: 'Englisch', visible: false } + { field: 'uebernahmedatum', title: this.$p.t('stv/grades_takeoverdate'), visible: false }, + { field: 'benotungsdatum', title: this.$p.t('stv/grades_gradingdate'), visible: false }, + { field: 'studiensemester_kurzbz', title: this.$p.t('lehre/studiensemester'), visible: false }, + { field: 'note_number', title: this.$p.t('stv/grades_numericgrade'), visible: false, formatter: cell => cell.getData().note, tooltip: (evt, cell) => cell.getData().note }, + { field: 'lehrveranstaltung_id', title: this.$p.t('lehre/lehrveranstaltung_id'), visible: false }, + { field: 'studiengang', title: this.$p.t('lehre/studiengang'), visible: false }, + { field: 'studiengang_kz', title: this.$p.t('lehre/studiengangskennzahlLehre'), visible: false }, + { field: 'studiengang_lv', title: this.$p.t('stv/grades_studiengang_lv'), visible: false }, + { field: 'studiengang_kz_lv', title: this.$p.t('stv/grades_studiengang_kz_lv'), visible: false }, + { field: 'semester_lv', title: this.$p.t('stv/grades_semester_lv'), visible: false }, + { field: 'ects_lv', title: this.$p.t('lehre/ects'), visible: false }, + { field: 'lehrform', title: this.$p.t('lehre/lehrform'), visible: false }, + { field: 'kurzbz', title: this.$p.t('lehre/kurzbz'), visible: false }, + { field: 'punkte', title: this.$p.t('stv/grades_points'), visible: false }, + { field: 'lehrveranstaltung_bezeichnung_english', title: this.$p.t('stv/grades_lehrveranstaltung_bezeichnung_english'), visible: false } ]; const hasDocuments = ['both', 'inline'].includes(this.config.documents); @@ -151,7 +154,7 @@ export default { if (hasDocuments || hasDelete) { columns.push({ field: 'actions', - title: 'Actions', + title: this.$p.t('global/actions'), cssClass: "overflow-visible", headerSort: false, formatter: cell => { @@ -221,7 +224,7 @@ export default { this.$fhcApi.factory .stv.grades.updateCertificate(data) .then(this.$refs.table.reloadTable) - .then(() => this.$fhcAlert.alertSuccess('updated')) // TODO(chris): phrase + .then(() => this.$fhcAlert.alertSuccess(this.$p.t('stv/grades_updated'))) .catch(this.$fhcAlert.handleFormValidation); }, deleteGrade(data) { @@ -235,12 +238,18 @@ export default { .catch(this.$fhcAlert.handleSystemError); } }, - // TODO(chris): phrasen (title) + created() { + this.$p.loadCategory(['global', 'stv', 'lehre']) + .then(() => { + if (this.$refs.table.tableBuilt) + this.$refs.table.tabulator.columnManager.setColumns(this.tabulatorOptions.columns); + }); + }, template: `
grade.note === this.current)?.bezeichnung || ''; } }, @@ -91,7 +91,6 @@ export default { }) .catch(this.$fhcAlert.handleSystemError); }, - // TODO(chris): phrases (option"") template: `
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis/Documents.js b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis/Documents.js index 22aa28761..4a02e9dfa 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis/Documents.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Noten/Zeugnis/Documents.js @@ -85,7 +85,6 @@ export default {