Skip to content

[6.1] Meaningful uninstall message #3650

@jgerman-bot

Description

@jgerman-bot

New language relevant PR in upstream repo: joomla/joomla-cms#46277 Here are the upstream changes:

Click to expand the diff!
diff --git a/administrator/components/com_installer/src/Model/ManageModel.php b/administrator/components/com_installer/src/Model/ManageModel.php
index 1a4ef51a165a7..8ac385f59e02e 100644
--- a/administrator/components/com_installer/src/Model/ManageModel.php
+++ b/administrator/components/com_installer/src/Model/ManageModel.php
@@ -263,20 +263,20 @@ public function remove($eid = [])
                 // Build an array of extensions that failed to uninstall
                 if ($result === false) {
                     // There was an error in uninstalling the package
-                    $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_ERROR', $rowtype);
+                    $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_ERROR', $rowtype, $row->name);
 
                     continue;
                 }
 
                 // Package uninstalled successfully
-                $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_SUCCESS', $rowtype);
+                $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_SUCCESS', $rowtype, $row->name);
                 $result = true;
 
                 continue;
             }
 
             // There was an error in uninstalling the package
-            $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_ERROR', $rowtype);
+            $msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_ERROR', $rowtype, $row->name);
         }
 
         $msg = implode('<br>', $msgs);
diff --git a/administrator/language/en-GB/com_installer.ini b/administrator/language/en-GB/com_installer.ini
index f93f2d1d4e51f..de93ad0714eae 100644
--- a/administrator/language/en-GB/com_installer.ini
+++ b/administrator/language/en-GB/com_installer.ini
@@ -254,9 +254,9 @@ COM_INSTALLER_TYPE_TYPE_PLUGIN="plugin"
 COM_INSTALLER_TYPE_TYPE_TEMPLATE="template"
 COM_INSTALLER_UNABLE_TO_FIND_INSTALL_PACKAGE="Unable to find install package."
 COM_INSTALLER_UNABLE_TO_INSTALL_JOOMLA_PACKAGE="The Joomla package cannot be installed through the Extension Manager. Please use the <a href='%s'>Joomla! Update</a> component to update Joomla."
-COM_INSTALLER_UNINSTALL_ERROR="Error uninstalling %s."
+COM_INSTALLER_UNINSTALL_ERROR="Error uninstalling %1$s %2$s."
 COM_INSTALLER_UNINSTALL_ERROR_LOCKED_EXTENSION="The extension \"%1$s\" (ID %2$s) is locked and cannot be uninstalled."
-COM_INSTALLER_UNINSTALL_SUCCESS="Uninstalling the %s was successful."
+COM_INSTALLER_UNINSTALL_SUCCESS="Uninstalling the %1$s %2$s was successful."
 COM_INSTALLER_UNPACK_ERROR="Failed to extract file: %s"
 COM_INSTALLER_UPDATE_ERROR="Error updating: %1$s<br>%2$s<br>%3$s<br>"
 COM_INSTALLER_UPDATE_FILTER_SEARCH_DESC="Search in extension name. Prefix with ID:, UID: or EID: to search for an update ID, update site ID or extension ID."
diff --git a/tests/System/integration/administrator/components/com_installer/FromUrl.cy.js b/tests/System/integration/administrator/components/com_installer/FromUrl.cy.js
index 7a8a4e1e9c825..f32088dcb4390 100644
--- a/tests/System/integration/administrator/components/com_installer/FromUrl.cy.js
+++ b/tests/System/integration/administrator/components/com_installer/FromUrl.cy.js
@@ -25,6 +25,6 @@ describe('Test in backend that the Installer', () => {
     cy.contains('Uninstall').click();
     cy.clickDialogConfirm(true);
     // Check if the uninstallation was successful
-    cy.contains('Uninstalling the component was successful');
+    cy.contains('Uninstalling the component com_patchtester was successful.');
   });
 });

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions