From f6e717783c10b0509267300e6d17de0cb84ff311 Mon Sep 17 00:00:00 2001 From: iszmais Date: Mon, 13 Apr 2026 13:20:09 +0200 Subject: [PATCH] move favourite translations to dashboard --- .../Dashboard/Block/classes/class.ilDashboardBlockGUI.php | 4 ++-- .../ILIAS/ILIASObject/classes/class.ilObjectGUI.php | 8 ++++---- .../ILIAS/ILIASObject/classes/class.ilObjectListGUI.php | 5 +++-- lang/ilias_de.lang | 7 ++++--- lang/ilias_en.lang | 7 ++++--- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php index db8d87359df4..d107b4ba70cc 100755 --- a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php +++ b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php @@ -521,14 +521,14 @@ public function getItemGroups(): array public function addToDeskObject(): void { $this->favourites_manager->add($this->user->getId(), $this->requested_item_ref_id); - $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('rep_added_to_favourites'), true); + $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('added_to_favourites'), true); $this->ctrl->redirectByClass(ilDashboardGUI::class, 'show'); } public function removeFromDeskObject(): void { $this->favourites_manager->remove($this->user->getId(), $this->requested_item_ref_id); - $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('rep_removed_from_favourites'), true); + $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('removed_from_favourites'), true); $this->ctrl->redirectByClass(ilDashboardGUI::class, 'show'); } diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php index 1a3f8aa91b2c..c6d2b8e94e12 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectGUI.php @@ -2047,17 +2047,17 @@ public function addToDeskObject(): void $this->user->getId(), $this->request_wrapper->retrieve("item_ref_id", $this->refinery->kindlyTo()->int()) ); - $this->lng->loadLanguageModule("rep"); - $this->tpl->setOnScreenMessage("success", $this->lng->txt("rep_added_to_favourites"), true); + $this->lng->loadLanguageModule("dash"); + $this->tpl->setOnScreenMessage("success", $this->lng->txt("added_to_favourites"), true); $this->ctrl->redirectToURL(ilLink::_getLink($this->requested_ref_id)); } public function removeFromDeskObject(): void { - $this->lng->loadLanguageModule("rep"); $item_ref_id = $this->request_wrapper->retrieve("item_ref_id", $this->refinery->kindlyTo()->int()); $this->favourites->remove($this->user->getId(), $item_ref_id); - $this->tpl->setOnScreenMessage("success", $this->lng->txt("rep_removed_from_favourites"), true); + $this->lng->loadLanguageModule("dash"); + $this->tpl->setOnScreenMessage("success", $this->lng->txt("removed_from_favourites"), true); $this->ctrl->redirectToURL(ilLink::_getLink($this->requested_ref_id)); } diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php index 8ea90cf10cca..566e37e5cade 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php @@ -1807,15 +1807,16 @@ public function insertSubscribeCommand(): void $this->ctrl->setParameter($this->container_obj, 'type', $type); $this->ctrl->setParameter($this->container_obj, 'item_ref_id', $this->getCommandId()); + $this->lng->loadLanguageModule('dash'); if (!$this->fav_manager->ifIsFavourite($this->user->getId(), $this->getCommandId())) { // Pass type and object ID to ilAccess to improve performance if ($this->checkCommandAccess('read', '', $this->ref_id, $this->type, $this->obj_id)) { $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'addToDesk'); - $this->insertCommand($cmd_link, $this->lng->txt('rep_add_to_favourites')); + $this->insertCommand($cmd_link, $this->lng->txt('add_to_favourites')); } } else { $cmd_link = $this->ctrl->getLinkTarget($this->container_obj, 'removeFromDesk'); - $this->insertCommand($cmd_link, $this->lng->txt('rep_remove_from_favourites')); + $this->insertCommand($cmd_link, $this->lng->txt('remove_from_favourites')); } $this->ctrl->clearParameters($this->container_obj); diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 7125cad9c97a..15c4346709c9 100644 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -8129,6 +8129,8 @@ crs#:#tutorial_support_block_title#:#Kontaktperson crs#:#user_fields#:#Angaben des Persönlichen Profils crsv#:#crsv_create#:#Kurszertifikat erstellen crsv#:#crsv_create_info#:#Wählen Sie einen Kurs, für den Sie ein Zertifikat benötigen +dash#:#add_to_favourites#:#Zu Favoriten hinzufügen +dash#:#added_to_favourites#:#Das Objekt wurde den Favoriten hinzugefügt. dash#:#dash_activation#:#Aktivierung dash#:#dash_added_to_favs#:#Der Eintrag wurde zu den persönlichen Favoriten hinzugefügt. dash#:#dash_avail_presentation#:#Verfügbare Präsentationen @@ -8166,7 +8168,6 @@ dash#:#dash_item_removed#:#Der Eintrag wurde aus der Liste entfernt. dash#:#dash_learning_sequences#:#Meine Lernsequenzen dash#:#dash_list#:#Liste dash#:#dash_main_panel#:#Hauptbereich -dash#:#dash_make_favourite#:#Zu Favoriten hinzufügen dash#:#dash_member_main_alt#:#Eine Ansicht der Mitgliedschaften kann auch direkt im Haupmenü eingebunden werden. dash#:#dash_memberships#:#Meine Kurse und Gruppen dash#:#dash_no_items_to_manage#:#Keine Objekte zum Entfernen verfügbar. @@ -8186,6 +8187,8 @@ dash#:#dash_view_courses_groups#:#Block ‘Meine Kurse und Gruppen’ dash#:#dash_view_favourites#:#Block ‘Favoriten’ dash#:#favourites_disabled_info#:#Das Setzen von Favoriten ist deaktiviert. Sie können dieses in den Magazin-Einstellungen ändern. dash#:#memberships_disabled_info#:#Das Setzen von Mitgliedschaften ist deaktiviert. Sie können dieses in den Kurs-Einstellungen ändern. +dash#:#remove_from_favourites#:#Von Favoriten entfernen +dash#:#removed_from_favourites#:#Das Objekt wurde aus den Favoriten entfernt. dash#:#topitem_block#:#Block dateplaner#:#Fr_long#:#Freitag dateplaner#:#Fr_short#:#Fr @@ -15049,7 +15052,6 @@ rep#:#rep_add_new_def_grp_organisation#:#Organisation rep#:#rep_add_new_def_grp_templates#:#Vorlagen rep#:#rep_add_to_favourites#:#Zu Favoriten hinzufügen rep#:#rep_added_rec_content#:#Empfohlener Inhalt wurde hinzugefügt. -rep#:#rep_added_to_favourites#:#Das Objekt wurde den Favoriten hinzugefügt. rep#:#rep_allowed_types#:#Allowed Types rep#:#rep_breadcr_crs#:#Brotkrumennavigation beginnt mit Kurs rep#:#rep_breadcr_crs_config#:#Konfiguration @@ -15106,7 +15108,6 @@ rep#:#rep_rec_content_removed#:#Empfohlener Inhalt wurde entfernt. rep#:#rep_recommended_content#:#Empfohlene Inhalte rep#:#rep_remove_from_favourites#:#Von Favoriten entfernen rep#:#rep_remove_rec_content#:#Sollen die folgenden Empfehlungen wirklich entfernt werden? Die entsprechenden Inhalte bleiben weiterhin erhalten. -rep#:#rep_removed_from_favourites#:#Das Objekt wurde aus den Favoriten entfernt. rep#:#rep_target_location#:#Zielort rep#:#rep_target_location_info#:#Bitte wählen sie den Zielort aus, an dem die ausgewählten Objekte wiederhergestellt werden sollen. rep#:#rep_time_based_availability#:#Zeitlich begrenzte Verfügbarkeit diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index 497c805acc91..de04e27d53a6 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -8130,6 +8130,8 @@ crs#:#tutorial_support_block_title#:#Contact Person crs#:#user_fields#:#User Fields crsv#:#crsv_create#:#Create Course Certificate crsv#:#crsv_create_info#:#Select a completed course to generate a certificate for it +dash#:#add_to_favourites#:#Add to Favourites +dash#:#added_to_favourites#:#The item has been added to your favourites. dash#:#dash_activation#:#activation dash#:#dash_added_to_favs#:#Recommendation has been added to personal favourites. dash#:#dash_avail_presentation#:#Available Presentations @@ -8167,7 +8169,6 @@ dash#:#dash_item_removed#:#Recommendation has been removed from the list. dash#:#dash_learning_sequences#:#My Learning Sequences dash#:#dash_list#:#List dash#:#dash_main_panel#:#Main Panel -dash#:#dash_make_favourite#:#Add to Favourites dash#:#dash_member_main_alt#:#Courses and groups can also be configured as a separate main menu entry. dash#:#dash_memberships#:#My Courses and Groups dash#:#dash_no_items_to_manage#:#No items available for removal. @@ -8187,6 +8188,8 @@ dash#:#dash_view_courses_groups#:#Section ‘My Courses and Groups’ dash#:#dash_view_favourites#:#Section ‘Favourites’ dash#:#favourites_disabled_info#:#Add to favorites is deactivated. You may change this inside the repository settings. dash#:#memberships_disabled_info#:#Subscriptions are deactivated. You may change this inside the course settings. +dash#:#remove_from_favourites#:#Remove from Favourites +dash#:#removed_from_favourites#:#The item has been removed from your favourites. dash#:#topitem_block#:#Block dateplaner#:#Fr_long#:#Friday dateplaner#:#Fr_short#:#Fr @@ -15050,7 +15053,6 @@ rep#:#rep_add_new_def_grp_organisation#:#Organisation rep#:#rep_add_new_def_grp_templates#:#Templates rep#:#rep_add_to_favourites#:#Add to Favourites rep#:#rep_added_rec_content#:#Recommended content has been added. -rep#:#rep_added_to_favourites#:#The item has been added to your favourites. rep#:#rep_allowed_types#:#Allowed Types rep#:#rep_breadcr_crs#:#Breadcrumb starts with course rep#:#rep_breadcr_crs_config#:#Configuration @@ -15107,7 +15109,6 @@ rep#:#rep_rec_content_removed#:#Recommended content has been removed. rep#:#rep_recommended_content#:#Recommended Content rep#:#rep_remove_from_favourites#:#Remove from Favourites rep#:#rep_remove_rec_content#:#Are you sure you want to remove the following recommended content? -rep#:#rep_removed_from_favourites#:#The item has been removed from your favourites. rep#:#rep_target_location#:#Target Location rep#:#rep_target_location_info#:#Bitte wählen Sie nun das Ziel aus, an dem die ausgewählten Objekte wiederhergestellt werden sollen. rep#:#rep_time_based_availability#:#Limited Availability Period