function preflight(string $type, InstallerAdapter $parent): bool {
// Check for Joomla compatibility
if(version_compare(JVERSION, '4', '<')) {
Factory::getApplication()->enqueueMessage (Text::sprintf('COM_GPTRANSLATE_INSTALLING_VERSION_NOTCOMPATIBLE', JVERSION), 'error');
if(version_compare(JVERSION, '3.10', '<')) {
Factory::getApplication()->enqueueMessage (Text::sprintf('Error, installation aborted. Pay attention! You are attempting to install a component package for Joomla 4 that does not match your actual Joomla version. Download and install the correct package for your Joomla %s version.', JVERSION), 'error');
}
return false;
}
return true;
}