diff --git a/administrator/components/com_patchtester/language/en-GB/com_patchtester.sys.ini b/administrator/components/com_patchtester/language/en-GB/com_patchtester.sys.ini index e418c57..5f75221 100644 --- a/administrator/components/com_patchtester/language/en-GB/com_patchtester.sys.ini +++ b/administrator/components/com_patchtester/language/en-GB/com_patchtester.sys.ini @@ -7,3 +7,7 @@ COM_PATCHTESTER="Joomla! Patch Tester" COM_PATCHTESTER_COULD_NOT_INSTALL_OVERRIDES="Could not install the template overrides for the following templates: %s" COM_PATCHTESTER_COULD_NOT_REMOVE_OVERRIDES="Could not remove the template overrides for the following templates: %s" COM_PATCHTESTER_XML_DESCRIPTION="Component for pull request management testing" +COM_PATCHTESTER_UPDATE_TEXT="Patch Tester Update script. Patch Tester now updated to version %s." +COM_PATCHTESTER_INSTALL_INSTRUCTIONS="

Thank you for installing the Joomla! Patch Tester.

To use the Joomla! Patch Tester you first need to setup your GitHub credentials in the Joomla! Patch Tester Options. Go to the Joomla! Patch Tester Options to setup your credentials. After clicking on Save & Close you will be taken to the Joomla! Patch Tester where you can start using the Patch Tester." +COM_PATCHTESTER_UPDATE_INSTRUCTIONS="

Thank you for updating the Joomla! Patch Tester.

Go to the Joomla! Patch Tester

" +COM_PATCHTESTER_UNINSTALL_THANK_YOU="Thank you for using the Joomla! Patch Tester for testing patches for the latest version of Joomla!" diff --git a/administrator/components/com_patchtester/script.php b/administrator/components/com_patchtester/script.php index 33946a4..d8cfba7 100644 --- a/administrator/components/com_patchtester/script.php +++ b/administrator/components/com_patchtester/script.php @@ -6,8 +6,11 @@ * @license GNU General Public License version 2 or later */ +use Joomla\CMS\Factory; +use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Installer\Adapter\ComponentAdapter; use Joomla\CMS\Installer\InstallerScript; +use Joomla\CMS\Language\Text; /** * Installation class to perform additional changes during install/uninstall/update @@ -16,6 +19,7 @@ use Joomla\CMS\Installer\InstallerScript; */ class Com_PatchtesterInstallerScript extends InstallerScript { + /** * Extension script constructor. * @@ -34,6 +38,70 @@ class Com_PatchtesterInstallerScript extends InstallerScript '/administrator/components/com_patchtester/PatchTester/Table', '/components/com_patchtester', ); + + Factory::getApplication() + ->getLanguage() + ->load('com_patchtester.sys', JPATH_ADMINISTRATOR, null, true); + } + + /** + * Show the message on install. + * + * @param ComponentAdapter $parent The class calling this method + * + * @return void + * + * @since 4.0.0 + */ + public function install(ComponentAdapter $parent): void + { + ?> +

+ + +

+

+ +

+ + +

+

+ +

+ +

+

+ removeFiles(); }