diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b518e3e Binary files /dev/null and b/.gitattributes differ diff --git a/README.md b/README.md index 799d4f5..a127460 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# D³ Ãœbersetzungsassistent für OXID eShop -flexible Textbausteinverwaltung direkt im Adminbereich des Shops - -## Systemanforderungen: -- installierter OXID eShop -- PHP-Version, für die Installationspakete verfügbar sind -- Installation via Composer -- ionCubeLoader -- D3 Modul Connector - -Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes. - -## Installation: - +# D³ Ãœbersetzungsassistent für OXID eShop +flexible Textbausteinverwaltung direkt im Adminbereich des Shops + +## Systemanforderungen: +- installierter OXID eShop +- PHP-Version, für die Installationspakete verfügbar sind +- Installation via Composer +- ionCubeLoader +- D3 Modul Connector + +Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes. + +## Installation: + Eine detaillierte Installationsanleitung finden Sie im docs-Verzeichnis dieses Pakets. \ No newline at end of file diff --git a/composer.json b/composer.json index c6276bf..a3e30bd 100644 --- a/composer.json +++ b/composer.json @@ -1,43 +1,43 @@ -{ - "name": "d3/multilang", - "description": "Text item handler module for OXID eShop.", - "type": "oxideshop-module", - "keywords": [ - "oxid", - "modules", - "eShop", - "d3", - "test items" - ], - "authors": [ - { - "name": "D3 Data Development (Inh. Thomas Dartsch)", - "email": "info@shopmodule.com", - "homepage": "http://www.d3data.de", - "role": "Owner" - } - ], - "support": { - "email": "support@shopmodule.com" - }, - "homepage": "https://www.oxidmodule.com/", - "license": [ - "proprietary" - ], - "extra": { - "oxideshop": { - "source-directory": "/src", - "target-directory": "d3/multilang" - } - }, - "require": { - "php": "7.1 - 7.2", "ext-ionCube-Loader": "*", - "oxid-esales/oxideshop-metapackage-ce": "~6.0.2 || ~6.1.0", - "d3/modcfg": "^5.1.1.400" - }, - "autoload": { - "psr-4": { - "D3\\Multilang\\": "../../../source/modules/d3/multilang" - } - } -} +{ + "name": "d3/multilang", + "description": "Text item handler module for OXID eShop.", + "type": "oxideshop-module", + "keywords": [ + "oxid", + "modules", + "eShop", + "d3", + "test items" + ], + "authors": [ + { + "name": "D3 Data Development (Inh. Thomas Dartsch)", + "email": "info@shopmodule.com", + "homepage": "http://www.d3data.de", + "role": "Owner" + } + ], + "support": { + "email": "support@shopmodule.com" + }, + "homepage": "https://www.oxidmodule.com/", + "license": [ + "proprietary" + ], + "extra": { + "oxideshop": { + "source-directory": "/src", + "target-directory": "d3/multilang" + } + }, + "require": { + "php": "7.1 - 7.2", "ext-ionCube-Loader": "*", + "oxid-esales/oxideshop-metapackage-ce": "~6.0.2 || ~6.1.0", + "d3/modcfg": "^5.1.1.400" + }, + "autoload": { + "psr-4": { + "D3\\Multilang\\": "../../../source/modules/d3/multilang" + } + } +} diff --git a/docs/Features.txt b/docs/Features.txt index 569f0e7..b6cfe25 100644 --- a/docs/Features.txt +++ b/docs/Features.txt @@ -1,6 +1,6 @@ -Diese Modulversion stellt folgende Funktionen zur Verfügung: - -- datenbankbasierte Textbausteinverwaltung -- Pflege komfortabel über Adminbereich des Shops -- Export in CSV- und Oxid-Format +Diese Modulversion stellt folgende Funktionen zur Verfügung: + +- datenbankbasierte Textbausteinverwaltung +- Pflege komfortabel über Adminbereich des Shops +- Export in CSV- und Oxid-Format - Einbindung über Modul-Erweiterung \ No newline at end of file diff --git a/src/Application/Controller/Admin/d3_cfg_multilang.php b/src/Application/Controller/Admin/d3_cfg_multilang.php index 04e0cb1..230c75b 100644 --- a/src/Application/Controller/Admin/d3_cfg_multilang.php +++ b/src/Application/Controller/Admin/d3_cfg_multilang.php @@ -1,33 +1,33 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_cfg_multilang extends d3_cfg_mod_ -{ - - /** - * @return string - */ - public function render() - { - $this->addTplParam('sListClass', d3_cfg_multilang_list::class); - $this->addTplParam('sMainClass', d3_cfg_multilang_imex::class); - - return parent::render(); - } -} + + * @link http://www.oxidmodule.com + */ + +class d3_cfg_multilang extends d3_cfg_mod_ +{ + + /** + * @return string + */ + public function render() + { + $this->addTplParam('sListClass', d3_cfg_multilang_list::class); + $this->addTplParam('sMainClass', d3_cfg_multilang_imex::class); + + return parent::render(); + } +} diff --git a/src/Application/Controller/Admin/d3_cfg_multilang_imex.php b/src/Application/Controller/Admin/d3_cfg_multilang_imex.php index b36671f..9448dd1 100644 --- a/src/Application/Controller/Admin/d3_cfg_multilang_imex.php +++ b/src/Application/Controller/Admin/d3_cfg_multilang_imex.php @@ -1,226 +1,226 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_cfg_multilang_imex extends d3_cfg_mod_main -{ - protected $_sThisTemplate = 'd3_cfg_multilang_imex.tpl'; - protected $_sExportDir = 'export'; - protected $_sModId = 'd3_multilang'; - protected $_sExportType = ''; - protected $_sImportType = ''; - protected $_sMimeType = ''; - protected $_aImportStatusMessage = array(); - protected $_sMenuItemTitle = 'd3mxmultilang'; - protected $_sMenuSubItemTitle = 'd3tbclmultilang_imex'; - public $aMessages = array(); - - /** - * @return string - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - */ - public function render() - { - $this->setImportStatusMessages(); - - $this->addTplParam('readonly', !$this->d3getSet()->isActive()); - - $oLang = Registry::getLang(); - $aLangList = Registry::getRequest()->getRequestEscapedParameter('lang'); - if (isset($aLangList) && is_array($aLangList) && isset($aLangList['oxid'])) { - $iLangNr = $aLangList['oxid']; - } else { - $iLangNr = 0; - } - $this->_aViewData['aImportLanguages'] = $oLang->getLanguageArray($iLangNr); - - return parent::render(); - } - - /** - * @param $sMessage - */ - public function addStatusMessage($sMessage) - { - $this->aMessages[] = $sMessage; - } - - /** - * @return array - */ - public function getStatusMessages() - { - return $this->aMessages; - } - - /** - * @param $sIdent - * - * @return mixed - */ - public function getRequParam($sIdent) - { - return Registry::getRequest()->getRequestEscapedParameter($sIdent); - } - - public function setImportStatusMessages() - { - $this->_aImportStatusMessage = array( - 'csv' => array( - 0 => 'D3_MULTILANG_NOT_SUCC', - 1 => 'D3_MULTILANG_SUCC_CSV', - ), - 'xls' => array( - 0 => 'D3_MULTILANG_NOT_SUCC', - 1 => 'D3_MULTILANG_SUCC_XLS', - ), - 'oxid' => array( - 0 => 'D3_MULTILANG_NOT_SUCC', - 1 => 'D3_MULTILANG_SUCC_OXID', - ), - ); - } - - /** - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - */ - public function export() - { - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - - $this->_sExportType = Registry::getRequest()->getRequestEscapedParameter('exporttype'); - - if ($this->getExportType() == 'csv') { - $oTranslation->exportCSV(); - } elseif ($this->getExportType() == 'oxid') { - $oTranslation->exportOxid(); - } - } - - /** - * @return string - */ - public function getExportType() - { - return $this->_sExportType; - } - - /** - * @throws DBALException - */ - public function import() - { - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $oTranslation->setController($this); - - header("Content-Type: text/html; charset=UTF-8"); - - $this->_sImportType = Registry::getRequest()->getRequestEscapedParameter('type'); - - try { - if ($this->getImportType() == 'csv') { - $this->_sMimeType = $_FILES['file']['type']['csv']; - $iImport = $oTranslation->importCSV(); - $this->addTplParam('clrTmp', $iImport); - } elseif ($this->getImportType() == 'oxid') { - $this->_sMimeType = $_FILES['file']['type']['oxid']; - $iImport = $oTranslation->importOxid(); - $this->addTplParam('clrTmp', $iImport); - } elseif ($this->getImportType() == 'installed') { - $iImport = $oTranslation->importInstalled(); - $this->addTplParam('clrTmp', $iImport); - } - } catch (StandardException $e) { - Registry::getUtilsView()->addErrorToDisplay($e->getMessage()); - } - } - - /** - * @return string - */ - public function getImportType() - { - return $this->_sImportType; - } - - /** - * @return null|string - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function getMimeType() - { - if ($this->_sMimeType && $this->d3getSet()->getValue('blMultilang_OutputMimeType')) { - return $this->_sMimeType; - } - - return null; - } - - /** - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - * @throws StandardException - */ - public function clearLangCache() - { - /** @var d3clrtmp $oClrTmp */ - $oClrTmp = oxNew(d3clrtmp::class); - - if ($oClrTmp->clearLangCache()) { - $this->addStatusMessage(Registry::getLang()->translateString('D3_CFG_CLRTMP_SUCCESS')); - } - } - - /** - * @return d3_cfg_mod - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function d3getSet() - { - return d3_cfg_mod::get($this->_sModId); - } -} + + * @link http://www.oxidmodule.com + */ + +class d3_cfg_multilang_imex extends d3_cfg_mod_main +{ + protected $_sThisTemplate = 'd3_cfg_multilang_imex.tpl'; + protected $_sExportDir = 'export'; + protected $_sModId = 'd3_multilang'; + protected $_sExportType = ''; + protected $_sImportType = ''; + protected $_sMimeType = ''; + protected $_aImportStatusMessage = array(); + protected $_sMenuItemTitle = 'd3mxmultilang'; + protected $_sMenuSubItemTitle = 'd3tbclmultilang_imex'; + public $aMessages = array(); + + /** + * @return string + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + */ + public function render() + { + $this->setImportStatusMessages(); + + $this->addTplParam('readonly', !$this->d3getSet()->isActive()); + + $oLang = Registry::getLang(); + $aLangList = Registry::getRequest()->getRequestEscapedParameter('lang'); + if (isset($aLangList) && is_array($aLangList) && isset($aLangList['oxid'])) { + $iLangNr = $aLangList['oxid']; + } else { + $iLangNr = 0; + } + $this->_aViewData['aImportLanguages'] = $oLang->getLanguageArray($iLangNr); + + return parent::render(); + } + + /** + * @param $sMessage + */ + public function addStatusMessage($sMessage) + { + $this->aMessages[] = $sMessage; + } + + /** + * @return array + */ + public function getStatusMessages() + { + return $this->aMessages; + } + + /** + * @param $sIdent + * + * @return mixed + */ + public function getRequParam($sIdent) + { + return Registry::getRequest()->getRequestEscapedParameter($sIdent); + } + + public function setImportStatusMessages() + { + $this->_aImportStatusMessage = array( + 'csv' => array( + 0 => 'D3_MULTILANG_NOT_SUCC', + 1 => 'D3_MULTILANG_SUCC_CSV', + ), + 'xls' => array( + 0 => 'D3_MULTILANG_NOT_SUCC', + 1 => 'D3_MULTILANG_SUCC_XLS', + ), + 'oxid' => array( + 0 => 'D3_MULTILANG_NOT_SUCC', + 1 => 'D3_MULTILANG_SUCC_OXID', + ), + ); + } + + /** + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + */ + public function export() + { + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + + $this->_sExportType = Registry::getRequest()->getRequestEscapedParameter('exporttype'); + + if ($this->getExportType() == 'csv') { + $oTranslation->exportCSV(); + } elseif ($this->getExportType() == 'oxid') { + $oTranslation->exportOxid(); + } + } + + /** + * @return string + */ + public function getExportType() + { + return $this->_sExportType; + } + + /** + * @throws DBALException + */ + public function import() + { + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $oTranslation->setController($this); + + header("Content-Type: text/html; charset=UTF-8"); + + $this->_sImportType = Registry::getRequest()->getRequestEscapedParameter('type'); + + try { + if ($this->getImportType() == 'csv') { + $this->_sMimeType = $_FILES['file']['type']['csv']; + $iImport = $oTranslation->importCSV(); + $this->addTplParam('clrTmp', $iImport); + } elseif ($this->getImportType() == 'oxid') { + $this->_sMimeType = $_FILES['file']['type']['oxid']; + $iImport = $oTranslation->importOxid(); + $this->addTplParam('clrTmp', $iImport); + } elseif ($this->getImportType() == 'installed') { + $iImport = $oTranslation->importInstalled(); + $this->addTplParam('clrTmp', $iImport); + } + } catch (StandardException $e) { + Registry::getUtilsView()->addErrorToDisplay($e->getMessage()); + } + } + + /** + * @return string + */ + public function getImportType() + { + return $this->_sImportType; + } + + /** + * @return null|string + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function getMimeType() + { + if ($this->_sMimeType && $this->d3getSet()->getValue('blMultilang_OutputMimeType')) { + return $this->_sMimeType; + } + + return null; + } + + /** + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + * @throws StandardException + */ + public function clearLangCache() + { + /** @var d3clrtmp $oClrTmp */ + $oClrTmp = oxNew(d3clrtmp::class); + + if ($oClrTmp->clearLangCache()) { + $this->addStatusMessage(Registry::getLang()->translateString('D3_CFG_CLRTMP_SUCCESS')); + } + } + + /** + * @return d3_cfg_mod + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function d3getSet() + { + return d3_cfg_mod::get($this->_sModId); + } +} diff --git a/src/Application/Controller/Admin/d3_cfg_multilang_licence.php b/src/Application/Controller/Admin/d3_cfg_multilang_licence.php index d9f8259..17cb4ee 100644 --- a/src/Application/Controller/Admin/d3_cfg_multilang_licence.php +++ b/src/Application/Controller/Admin/d3_cfg_multilang_licence.php @@ -1,31 +1,31 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_cfg_multilang_licence extends d3_cfg_mod_licence -{ - protected $_sModId = 'd3_multilang'; - - protected $_hasNewsletterForm = false; - - protected $_sLogType = d3log::ERROR; - - protected $_sMenuItemTitle = 'd3mxmultilang'; - protected $_sMenuSubItemTitle = 'd3tbcllib_support'; -} + + * @link http://www.oxidmodule.com + */ + +class d3_cfg_multilang_licence extends d3_cfg_mod_licence +{ + protected $_sModId = 'd3_multilang'; + + protected $_hasNewsletterForm = false; + + protected $_sLogType = d3log::ERROR; + + protected $_sMenuItemTitle = 'd3mxmultilang'; + protected $_sMenuSubItemTitle = 'd3tbcllib_support'; +} diff --git a/src/Application/Controller/Admin/d3_cfg_multilang_list.php b/src/Application/Controller/Admin/d3_cfg_multilang_list.php index bdcc8f4..8bf67d7 100644 --- a/src/Application/Controller/Admin/d3_cfg_multilang_list.php +++ b/src/Application/Controller/Admin/d3_cfg_multilang_list.php @@ -1,39 +1,39 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_cfg_multilang_list extends d3_cfg_mod_list -{ - protected $_blD3ShowLangSwitch = false; - - protected $_sMenuItemTitle = 'd3mxmultilang'; - - protected $_sMenuSubItemTitle = 'd3mxmultilang_settings'; - - /** - * @return null - */ - public function render() - { - $sRet = parent::render(); - - $this->addTplParam("default_edit", "d3_cfg_multilang_imex"); - - return $sRet; - } + + * @link http://www.oxidmodule.com + */ + +class d3_cfg_multilang_list extends d3_cfg_mod_list +{ + protected $_blD3ShowLangSwitch = false; + + protected $_sMenuItemTitle = 'd3mxmultilang'; + + protected $_sMenuSubItemTitle = 'd3mxmultilang_settings'; + + /** + * @return null + */ + public function render() + { + $sRet = parent::render(); + + $this->addTplParam("default_edit", "d3_cfg_multilang_imex"); + + return $sRet; + } } \ No newline at end of file diff --git a/src/Application/Controller/Admin/d3_cfg_multilang_main.php b/src/Application/Controller/Admin/d3_cfg_multilang_main.php index 52842f5..d2f83fc 100644 --- a/src/Application/Controller/Admin/d3_cfg_multilang_main.php +++ b/src/Application/Controller/Admin/d3_cfg_multilang_main.php @@ -1,217 +1,217 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_cfg_multilang_main extends d3_cfg_mod_main -{ - protected $_sThisTemplate = 'd3_cfg_multilang_main.tpl'; - protected $_iListSize = 0; - protected $_iCurrListPos = 0; - /** @var d3pagenavigation $_oPageNavigation */ - protected $_oPageNavigation; - protected $_sModId = 'd3_multilang'; - public $iAdminListSize = 20; - public $sSearchText; - public $sSearchType; - public $sItemType; - public $iLangsel_left; - public $iLangsel_right; - public $aLangSel = array(); - protected $_sMenuItemTitle = 'd3mxmultilang'; - protected $_sMenuSubItemTitle = 'd3tbclmultilang_translations'; - - /** - * @return string - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - */ - public function render() - { - $sRet = parent::render(); - - $this->addTplParam('readonly', !$this->d3getSet()->isActive()); - - DatabaseProvider::getDb()->Execute("SET NAMES 'utf8'"); - - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $this->iAdminListSize = 20; - $iLangOk = 0; - - $this->sSearchText = Registry::getRequest()->getRequestEscapedParameter('sSearchText'); - $this->sSearchType = Registry::getRequest()->getRequestEscapedParameter('sSearchType'); - $this->sItemType = Registry::getRequest()->getRequestEscapedParameter('itemtype'); - $this->addTplParam('sItemtype', $this->sItemType); - - if ($this->sSearchText) { - $this->addTplParam('sSearchText', $this->sSearchText); - $this->addTplParam('sSearchType', $this->sSearchType); - $this->addTplParam('whereparam', "&sSearchText=" . $this->sSearchText); - } - - if (Registry::getSession()->getVariable('langsel_left') !== false - && Registry::getSession()->getVariable('langsel_left') != '' - ) { - $this->iLangsel_left = Registry::getSession()->getVariable('langsel_left'); - $this->addTplParam('langsel_left', $this->iLangsel_left); - $iLangOk++; - } elseif ($this->iLangsel_left !== false && $this->iLangsel_left != '') { - $this->addTplParam('langsel_left', $this->iLangsel_left); - $iLangOk++; - } else { - $this->addTplParam('langsel_left', 'none'); - } - - if (Registry::getSession()->getVariable('langsel_right') !== false - && Registry::getSession()->getVariable('langsel_right') != '' - ) { - $this->iLangsel_right = Registry::getSession()->getVariable('langsel_right'); - $this->addTplParam('langsel_right', $this->iLangsel_right); - $iLangOk++; - } elseif ($this->iLangsel_right !== false && $this->iLangsel_right != '') { - $this->addTplParam('langsel_right', $this->iLangsel_right); - $iLangOk++; - } else { - $this->addTplParam('langsel_right', 'none'); - } - - // ToDo: Suche mit in Anzahl aufnehmen - $oTranslation->setSearchFilter( - $this->iLangsel_left, - $this->iLangsel_right, - $this->sSearchText, - $this->sSearchType, - $this->sItemType - ); - $this->_iListSize = $oTranslation->getItemCount(); - - /** @var d3pagenavigation _oPageNavigation */ - $this->_oPageNavigation = oxNew(d3pagenavigation::class, $this->_iListSize, $this->iAdminListSize); - $this->_oPageNavigation->addUrlParam('sSearchText', $this->sSearchText); - $this->_oPageNavigation->addUrlParam('sSearchType', $this->sSearchType); - $this->_oPageNavigation->generate(); - $this->_iCurrListPos = $this->_oPageNavigation->getCurrentItem(); - - $this->addTplParam('d3pagenavi', $this->_oPageNavigation); - $this->addTplParam('iPage', $this->_oPageNavigation->getCurrentPage()); - $this->addTplParam('aLanguages', Registry::getLang()->getlanguageArray()); - - if ($iLangOk == 2) { - $aTranslList = $oTranslation->getTranslationArray( - false, - true, - true, - $this->_iCurrListPos - 1, - $this->iAdminListSize - ); - - $aTranslations = array(); - - if (is_array($aTranslList[$this->iLangsel_left]) && count($aTranslList[$this->iLangsel_left])) { - foreach ($aTranslList[$this->iLangsel_left] as $sIdent => $sTranslation) { - $oTranslation = new stdClass; - $oTranslation->key = $aTranslList['OXID'][$sIdent]; - $oTranslation->left = htmlentities($sTranslation, ENT_COMPAT, 'UTF-8'); - $oTranslation->right = htmlentities($aTranslList[$this->iLangsel_right][$sIdent], ENT_COMPAT, 'UTF-8'); - $oTranslation->original_left = $aTranslList['orig_'.$this->iLangsel_left][$sIdent]; - $oTranslation->original_right = $aTranslList['orig_'.$this->iLangsel_right][$sIdent]; - $aTranslations[$sIdent] = $oTranslation; - } - } - - $this->addTplParam('aTranslations', $aTranslations); - } - - $this->addTplParam('listsize', $this->_iListSize); - - return $sRet; - } - - public function languageselect() - { - $this->aLangSel = Registry::getRequest()->getRequestEscapedParameter('langsel'); - - if ($this->aLangSel['left'] !== false && $this->aLangSel['left'] != '') { - Registry::getSession()->setVariable('langsel_left', $this->aLangSel['left']); - } - - if ($this->aLangSel['right'] !== false && $this->aLangSel['right'] != '') { - Registry::getSession()->setVariable('langsel_right', $this->aLangSel['right']); - } - } - - public function save() - { - $this->addTplParam('msg', 'success'); - - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $oTranslation->saveItemList(); - } - - /** - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - */ - public function clearLangCache() - { - /** @var d3clrtmp $oClrTmp */ - $oClrTmp = oxNew(d3clrtmp::class); - - if ($oClrTmp->clearLangCache()) { - Registry::get(UtilsView::class)->addErrorToDisplay('D3_CFG_CLRTMP_SUCCESS'); - } - } - - /** - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - */ - public function deleteentry() - { - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $sIdent = Registry::getRequest()->getRequestEscapedParameter('deloxid'); - $oTranslation->delete($sIdent); - } -} + + * @link http://www.oxidmodule.com + */ + +class d3_cfg_multilang_main extends d3_cfg_mod_main +{ + protected $_sThisTemplate = 'd3_cfg_multilang_main.tpl'; + protected $_iListSize = 0; + protected $_iCurrListPos = 0; + /** @var d3pagenavigation $_oPageNavigation */ + protected $_oPageNavigation; + protected $_sModId = 'd3_multilang'; + public $iAdminListSize = 20; + public $sSearchText; + public $sSearchType; + public $sItemType; + public $iLangsel_left; + public $iLangsel_right; + public $aLangSel = array(); + protected $_sMenuItemTitle = 'd3mxmultilang'; + protected $_sMenuSubItemTitle = 'd3tbclmultilang_translations'; + + /** + * @return string + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + */ + public function render() + { + $sRet = parent::render(); + + $this->addTplParam('readonly', !$this->d3getSet()->isActive()); + + DatabaseProvider::getDb()->Execute("SET NAMES 'utf8'"); + + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $this->iAdminListSize = 20; + $iLangOk = 0; + + $this->sSearchText = Registry::getRequest()->getRequestEscapedParameter('sSearchText'); + $this->sSearchType = Registry::getRequest()->getRequestEscapedParameter('sSearchType'); + $this->sItemType = Registry::getRequest()->getRequestEscapedParameter('itemtype'); + $this->addTplParam('sItemtype', $this->sItemType); + + if ($this->sSearchText) { + $this->addTplParam('sSearchText', $this->sSearchText); + $this->addTplParam('sSearchType', $this->sSearchType); + $this->addTplParam('whereparam', "&sSearchText=" . $this->sSearchText); + } + + if (Registry::getSession()->getVariable('langsel_left') !== false + && Registry::getSession()->getVariable('langsel_left') != '' + ) { + $this->iLangsel_left = Registry::getSession()->getVariable('langsel_left'); + $this->addTplParam('langsel_left', $this->iLangsel_left); + $iLangOk++; + } elseif ($this->iLangsel_left !== false && $this->iLangsel_left != '') { + $this->addTplParam('langsel_left', $this->iLangsel_left); + $iLangOk++; + } else { + $this->addTplParam('langsel_left', 'none'); + } + + if (Registry::getSession()->getVariable('langsel_right') !== false + && Registry::getSession()->getVariable('langsel_right') != '' + ) { + $this->iLangsel_right = Registry::getSession()->getVariable('langsel_right'); + $this->addTplParam('langsel_right', $this->iLangsel_right); + $iLangOk++; + } elseif ($this->iLangsel_right !== false && $this->iLangsel_right != '') { + $this->addTplParam('langsel_right', $this->iLangsel_right); + $iLangOk++; + } else { + $this->addTplParam('langsel_right', 'none'); + } + + // ToDo: Suche mit in Anzahl aufnehmen + $oTranslation->setSearchFilter( + $this->iLangsel_left, + $this->iLangsel_right, + $this->sSearchText, + $this->sSearchType, + $this->sItemType + ); + $this->_iListSize = $oTranslation->getItemCount(); + + /** @var d3pagenavigation _oPageNavigation */ + $this->_oPageNavigation = oxNew(d3pagenavigation::class, $this->_iListSize, $this->iAdminListSize); + $this->_oPageNavigation->addUrlParam('sSearchText', $this->sSearchText); + $this->_oPageNavigation->addUrlParam('sSearchType', $this->sSearchType); + $this->_oPageNavigation->generate(); + $this->_iCurrListPos = $this->_oPageNavigation->getCurrentItem(); + + $this->addTplParam('d3pagenavi', $this->_oPageNavigation); + $this->addTplParam('iPage', $this->_oPageNavigation->getCurrentPage()); + $this->addTplParam('aLanguages', Registry::getLang()->getlanguageArray()); + + if ($iLangOk == 2) { + $aTranslList = $oTranslation->getTranslationArray( + false, + true, + true, + $this->_iCurrListPos - 1, + $this->iAdminListSize + ); + + $aTranslations = array(); + + if (is_array($aTranslList[$this->iLangsel_left]) && count($aTranslList[$this->iLangsel_left])) { + foreach ($aTranslList[$this->iLangsel_left] as $sIdent => $sTranslation) { + $oTranslation = new stdClass; + $oTranslation->key = $aTranslList['OXID'][$sIdent]; + $oTranslation->left = htmlentities($sTranslation, ENT_COMPAT, 'UTF-8'); + $oTranslation->right = htmlentities($aTranslList[$this->iLangsel_right][$sIdent], ENT_COMPAT, 'UTF-8'); + $oTranslation->original_left = $aTranslList['orig_'.$this->iLangsel_left][$sIdent]; + $oTranslation->original_right = $aTranslList['orig_'.$this->iLangsel_right][$sIdent]; + $aTranslations[$sIdent] = $oTranslation; + } + } + + $this->addTplParam('aTranslations', $aTranslations); + } + + $this->addTplParam('listsize', $this->_iListSize); + + return $sRet; + } + + public function languageselect() + { + $this->aLangSel = Registry::getRequest()->getRequestEscapedParameter('langsel'); + + if ($this->aLangSel['left'] !== false && $this->aLangSel['left'] != '') { + Registry::getSession()->setVariable('langsel_left', $this->aLangSel['left']); + } + + if ($this->aLangSel['right'] !== false && $this->aLangSel['right'] != '') { + Registry::getSession()->setVariable('langsel_right', $this->aLangSel['right']); + } + } + + public function save() + { + $this->addTplParam('msg', 'success'); + + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $oTranslation->saveItemList(); + } + + /** + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + */ + public function clearLangCache() + { + /** @var d3clrtmp $oClrTmp */ + $oClrTmp = oxNew(d3clrtmp::class); + + if ($oClrTmp->clearLangCache()) { + Registry::get(UtilsView::class)->addErrorToDisplay('D3_CFG_CLRTMP_SUCCESS'); + } + } + + /** + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + */ + public function deleteentry() + { + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $sIdent = Registry::getRequest()->getRequestEscapedParameter('deloxid'); + $oTranslation->delete($sIdent); + } +} diff --git a/src/Application/views/admin/blocks/d3cleartmp_multilang.tpl b/src/Application/views/admin/blocks/d3cleartmp_multilang.tpl index 08f38c4..55ca96f 100644 --- a/src/Application/views/admin/blocks/d3cleartmp_multilang.tpl +++ b/src/Application/views/admin/blocks/d3cleartmp_multilang.tpl @@ -1,11 +1,11 @@ -[{$smarty.block.parent}] - - - - - - - - - +[{$smarty.block.parent}] + + + + + + + + + \ No newline at end of file diff --git a/src/Application/views/admin/blocks/d3cleartmp_multilang_js.tpl b/src/Application/views/admin/blocks/d3cleartmp_multilang_js.tpl index 0ad93df..957e2fb 100644 --- a/src/Application/views/admin/blocks/d3cleartmp_multilang_js.tpl +++ b/src/Application/views/admin/blocks/d3cleartmp_multilang_js.tpl @@ -1,2 +1,2 @@ -[{$smarty.block.parent}] +[{$smarty.block.parent}] document.getElementById('importmultilang').checked = false; \ No newline at end of file diff --git a/src/Application/views/admin/de/d3_multilang_lang.php b/src/Application/views/admin/de/d3_multilang_lang.php index de83df0..017181e 100644 --- a/src/Application/views/admin/de/d3_multilang_lang.php +++ b/src/Application/views/admin/de/d3_multilang_lang.php @@ -1,94 +1,94 @@ - - * @link http://www.oxidmodule.com - */ - -$sLangName = 'Deutsch'; - -// ------------------------------- -// RESOURCE IDENTITFIER = STRING -// ------------------------------- -$aLang = array( - 'charset' => 'UTF-8', - - 'd3mxmultilang' => ' Ãœbersetzungsassistent', - 'd3mxmultilang_settings' => 'Einstellungen', - 'd3tbclmultilang_translations' => 'Ãœbersetzungen', - 'd3tbclmultilang_imex' => 'Import / Export', - - 'D3_MULTILANG_TRANSL' => 'Ãœbersetzungsassistent', - 'D3_MULTILANG_METADATA_TITLE' => 'D³ Ãœbersetzungsassistent', - 'D3_MULTILANG_METADATA_DESC' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich', - - 'D3_MULTILANG_SEARCH' => 'Suche', - 'D3_MULTILANG_SEARCH_FURTHER' => 'weitere Suchoptionen', - 'D3_MULTILANG_CHOOSELANGFIRST' => 'Bitte wählen Sie zuerst die beiden Sprachen.', - 'D3_MULTILANG_SEARCHDESC' => 'Suche in den gewählten Sprachen
und den Idents:', - 'D3_MULTILANG_SEARCHSTART' => 'Suche starten', - 'D3_MULTILANG_SEARCHEMPTYSTART' => 'suche leere Einträge', - 'D3_MULTILANG_SEARCHIDENTICALSTART' => 'suche identische Einträge', - 'D3_MULTILANG_SEARCHORIGINALSTART' => 'suche originale Einträge', - 'D3_MULTILANG_SEARCHALL' => 'alle Einträge anzeigen', - 'D3_MULTILANG_SEARCHFRONTEND' => 'nur Frontend-Einträge', - 'D3_MULTILANG_SEARCHBACKEND' => 'nur Backend-Einträge', - 'D3_MULTILANG_LANGSELECT' => 'Sprachwahl', - 'D3_MULTILANG_SELECTLANGUAGE' => 'Sprache wählen', - 'D3_MULTILANG_NEWITEM' => 'Neueinträge', - 'D3_MULTILANG_SAVE' => 'Speichern', - 'D3_MULTILANG_EXPORT' => 'Export', - 'D3_MULTILANG_FILETYPECSV' => 'CSV-Datei', - 'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format', - 'D3_MULTILANG_FILETYPEINSTALLED' => 'installierte Sprachbausteindateien', - 'D3_MULTILANG_STARTEXPORT' => 'Export starten', - 'D3_MULTILANG_IMPORT' => 'Import', - 'D3_MULTILANG_IMPORTSTARTCSV' => 'CSV-Datei importieren', - 'D3_MULTILANG_IMPORTSTARTOXID' => 'Oxid-Datei importieren', - 'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'installierte Dateien importieren', - 'D3_MULTILANG_IMPORTOXIDLANG' => 'einfügen in Sprache', - 'D3_MULTILANG_IMPORTOVERWRITE' => 'Alteinträge überschreiben', - 'D3_MULTILANG_SETORIGINAL' => 'Importe sind Originaleinträge', - 'D3_MULTILANG_IGNOREMIME' => 'Dateiformatprüfung ignorieren', - 'D3_MULTILANG_IGNOREMIME_DESC' => 'Um Importfehler zu vermeiden, wird das Format der Importdatei überprüft. In manchen Fällen kann es vorkommen, dass das Format passt, jedoch nicht geprüft werden kann. Stellen Sie dann sicher, dass Ihre Importdatei passend ist und aktivieren Sie diese Option.', - 'D3_MULTILANG_ISADMIN' => 'Importe sind Einträge des Adminbereichs', - 'D3_MULTILANG_SUCC_CSV' => '%d Einträge aus CSV-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.', - 'D3_MULTILANG_ERR_CSV_MIME' => '%d Einträge aus CSV-Datei importiert. Dateiformat kann nicht geprüft werden.', - 'D3_MULTILANG_SUCC_OXID' => '%d Einträge aus Oxid-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.', - 'D3_MULTILANG_ERR_OXID_MIME' => '%d Einträge aus Oxid-Datei importiert. Dateiformat kann nicht geprüft werden.', - 'D3_MULTILANG_SUCC_INSTALLED' => '%d Einträge aus installierten Dateien importiert. Bitte leeren Sie das TMP-Verzeichnis.', - 'D3_MULTILANG_SUCCEXP' => 'exportiert nach: %s', - 'D3_MULTILANG_DEMOEXP' => 'Im Demomodus des Moduls steht der Export leider nicht zur Verfügung.', - 'D3_MULTILANG_MODCFG_SAVEMISS' => 'fehlende Sprachbausteine werden automatisch angelegt', - 'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'entferne Leerzeichen am Anfang und Ende der Sprachbausteine', - 'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS' => 'Mapping-Einträge als eigenständige Sprachbausteine importieren', - 'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC' => 'Die bisherigen weitergeleiteten Spracheinträge werden als eigenständige Übersetzungen in die Datenbank aufgenommen. Diese können nun (unabhängig von Ihrem Elterneintrag) geändert werden. Ohne diese Option werden diese Mapping-Einträge ignoriert.', - 'D3_MULTILANG_MODCFG_MIME' => 'Import: erkannten Dateityp ausgeben (debug)', - 'D3_MULTILANG_MODCFG_SEPARATOR' => 'zu verwendender CSV-Feldtrenner', - 'D3_MULTILANG_MODCFG_ENCLOSER' => 'zu verwendendes Textbegrenzungszeichen', - 'D3_MULTILANG_SETTINGS' => 'Grundeinstellungen', - 'D3_MULTILANG_CLEARLANGCACHE' => 'Zum Aktivieren der neuen Sprachvariablen ist ist das Leeren des Sprach-Caches nötig. Soll dies jetzt durchgeführt werden?', - 'D3_MULTILANG_NEWFIELDERROR' => 'Die markierten Einträge konnten nicht eingefügt werden, da der Ident schon verwendet wird.', - 'D3_MULTILANG_SUCC_COUNT' => ' Einträge - ', - - 'D3_MULTILANG_XLS_CREATOR' => 'D³ Übersetzungsassistent Modul für Oxid eShop', - 'D3_MULTILANG_XLS_TITLE' => 'Übersetzungen', - 'D3_MULTILANG_XLS_LOCALEERR' => 'Kann Spracheinstellungen "%s" nicht setzen - Einstellung ist "en_us"', - 'D3_MULTILANG_XLS_LANG' => 'Sprache', - - 'D3_MULTILANG_CLEARTMP_IMPORT' => 'D³ Übersetzungsassistent: Sprachbausteine vorher importieren', - - 'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Vor der Verwendung des Moduls ist es erforderlich, die verwendeten Sprachbausteine zu importieren. Lassen Sie dies im Installationsprozess automatisch durchführen oder starten Sie den Import vor der Modulaktivierung im Adminbereich Ihres Shops.', - 'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i Sprachbausteine aus vorhandenen Dateien importiert', - 'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'Die Datenbank stellt keine case-sensitive Kollation für das Feld %1$s der Tabelle %2$s bereit. Bitte stellen Sie eine passende Kollation bereit und passen das Datenbankfeld darauf hin an. Bis dahin können keine gleichnamigen Idents mit unterschiedlicher Groß- und Kleinschreibung verwendet werden.', - - 'D3_MULTILANG_EXC_NOIMPORTFILE' => 'Es wurde keine Importdatei aufgeladen.' -); + + * @link http://www.oxidmodule.com + */ + +$sLangName = 'Deutsch'; + +// ------------------------------- +// RESOURCE IDENTITFIER = STRING +// ------------------------------- +$aLang = array( + 'charset' => 'UTF-8', + + 'd3mxmultilang' => ' Übersetzungsassistent', + 'd3mxmultilang_settings' => 'Einstellungen', + 'd3tbclmultilang_translations' => 'Übersetzungen', + 'd3tbclmultilang_imex' => 'Import / Export', + + 'D3_MULTILANG_TRANSL' => 'Übersetzungsassistent', + 'D3_MULTILANG_METADATA_TITLE' => 'D³ Übersetzungsassistent', + 'D3_MULTILANG_METADATA_DESC' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich', + + 'D3_MULTILANG_SEARCH' => 'Suche', + 'D3_MULTILANG_SEARCH_FURTHER' => 'weitere Suchoptionen', + 'D3_MULTILANG_CHOOSELANGFIRST' => 'Bitte wählen Sie zuerst die beiden Sprachen.', + 'D3_MULTILANG_SEARCHDESC' => 'Suche in den gewählten Sprachen
und den Idents:', + 'D3_MULTILANG_SEARCHSTART' => 'Suche starten', + 'D3_MULTILANG_SEARCHEMPTYSTART' => 'suche leere Einträge', + 'D3_MULTILANG_SEARCHIDENTICALSTART' => 'suche identische Einträge', + 'D3_MULTILANG_SEARCHORIGINALSTART' => 'suche originale Einträge', + 'D3_MULTILANG_SEARCHALL' => 'alle Einträge anzeigen', + 'D3_MULTILANG_SEARCHFRONTEND' => 'nur Frontend-Einträge', + 'D3_MULTILANG_SEARCHBACKEND' => 'nur Backend-Einträge', + 'D3_MULTILANG_LANGSELECT' => 'Sprachwahl', + 'D3_MULTILANG_SELECTLANGUAGE' => 'Sprache wählen', + 'D3_MULTILANG_NEWITEM' => 'Neueinträge', + 'D3_MULTILANG_SAVE' => 'Speichern', + 'D3_MULTILANG_EXPORT' => 'Export', + 'D3_MULTILANG_FILETYPECSV' => 'CSV-Datei', + 'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format', + 'D3_MULTILANG_FILETYPEINSTALLED' => 'installierte Sprachbausteindateien', + 'D3_MULTILANG_STARTEXPORT' => 'Export starten', + 'D3_MULTILANG_IMPORT' => 'Import', + 'D3_MULTILANG_IMPORTSTARTCSV' => 'CSV-Datei importieren', + 'D3_MULTILANG_IMPORTSTARTOXID' => 'Oxid-Datei importieren', + 'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'installierte Dateien importieren', + 'D3_MULTILANG_IMPORTOXIDLANG' => 'einfügen in Sprache', + 'D3_MULTILANG_IMPORTOVERWRITE' => 'Alteinträge überschreiben', + 'D3_MULTILANG_SETORIGINAL' => 'Importe sind Originaleinträge', + 'D3_MULTILANG_IGNOREMIME' => 'Dateiformatprüfung ignorieren', + 'D3_MULTILANG_IGNOREMIME_DESC' => 'Um Importfehler zu vermeiden, wird das Format der Importdatei überprüft. In manchen Fällen kann es vorkommen, dass das Format passt, jedoch nicht geprüft werden kann. Stellen Sie dann sicher, dass Ihre Importdatei passend ist und aktivieren Sie diese Option.', + 'D3_MULTILANG_ISADMIN' => 'Importe sind Einträge des Adminbereichs', + 'D3_MULTILANG_SUCC_CSV' => '%d Einträge aus CSV-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.', + 'D3_MULTILANG_ERR_CSV_MIME' => '%d Einträge aus CSV-Datei importiert. Dateiformat kann nicht geprüft werden.', + 'D3_MULTILANG_SUCC_OXID' => '%d Einträge aus Oxid-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.', + 'D3_MULTILANG_ERR_OXID_MIME' => '%d Einträge aus Oxid-Datei importiert. Dateiformat kann nicht geprüft werden.', + 'D3_MULTILANG_SUCC_INSTALLED' => '%d Einträge aus installierten Dateien importiert. Bitte leeren Sie das TMP-Verzeichnis.', + 'D3_MULTILANG_SUCCEXP' => 'exportiert nach: %s', + 'D3_MULTILANG_DEMOEXP' => 'Im Demomodus des Moduls steht der Export leider nicht zur Verfügung.', + 'D3_MULTILANG_MODCFG_SAVEMISS' => 'fehlende Sprachbausteine werden automatisch angelegt', + 'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'entferne Leerzeichen am Anfang und Ende der Sprachbausteine', + 'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS' => 'Mapping-Einträge als eigenständige Sprachbausteine importieren', + 'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC' => 'Die bisherigen weitergeleiteten Spracheinträge werden als eigenständige Übersetzungen in die Datenbank aufgenommen. Diese können nun (unabhängig von Ihrem Elterneintrag) geändert werden. Ohne diese Option werden diese Mapping-Einträge ignoriert.', + 'D3_MULTILANG_MODCFG_MIME' => 'Import: erkannten Dateityp ausgeben (debug)', + 'D3_MULTILANG_MODCFG_SEPARATOR' => 'zu verwendender CSV-Feldtrenner', + 'D3_MULTILANG_MODCFG_ENCLOSER' => 'zu verwendendes Textbegrenzungszeichen', + 'D3_MULTILANG_SETTINGS' => 'Grundeinstellungen', + 'D3_MULTILANG_CLEARLANGCACHE' => 'Zum Aktivieren der neuen Sprachvariablen ist ist das Leeren des Sprach-Caches nötig. Soll dies jetzt durchgeführt werden?', + 'D3_MULTILANG_NEWFIELDERROR' => 'Die markierten Einträge konnten nicht eingefügt werden, da der Ident schon verwendet wird.', + 'D3_MULTILANG_SUCC_COUNT' => ' Einträge - ', + + 'D3_MULTILANG_XLS_CREATOR' => 'D³ Übersetzungsassistent Modul für Oxid eShop', + 'D3_MULTILANG_XLS_TITLE' => 'Übersetzungen', + 'D3_MULTILANG_XLS_LOCALEERR' => 'Kann Spracheinstellungen "%s" nicht setzen - Einstellung ist "en_us"', + 'D3_MULTILANG_XLS_LANG' => 'Sprache', + + 'D3_MULTILANG_CLEARTMP_IMPORT' => 'D³ Übersetzungsassistent: Sprachbausteine vorher importieren', + + 'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Vor der Verwendung des Moduls ist es erforderlich, die verwendeten Sprachbausteine zu importieren. Lassen Sie dies im Installationsprozess automatisch durchführen oder starten Sie den Import vor der Modulaktivierung im Adminbereich Ihres Shops.', + 'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i Sprachbausteine aus vorhandenen Dateien importiert', + 'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'Die Datenbank stellt keine case-sensitive Kollation für das Feld %1$s der Tabelle %2$s bereit. Bitte stellen Sie eine passende Kollation bereit und passen das Datenbankfeld darauf hin an. Bis dahin können keine gleichnamigen Idents mit unterschiedlicher Groß- und Kleinschreibung verwendet werden.', + + 'D3_MULTILANG_EXC_NOIMPORTFILE' => 'Es wurde keine Importdatei aufgeladen.' +); diff --git a/src/Application/views/admin/en/d3_multilang_lang.php b/src/Application/views/admin/en/d3_multilang_lang.php index 751cc52..71e2d03 100644 --- a/src/Application/views/admin/en/d3_multilang_lang.php +++ b/src/Application/views/admin/en/d3_multilang_lang.php @@ -1,91 +1,91 @@ - - * @link http://www.oxidmodule.com - */ - -$sLangName = 'Deutsch'; - -// ------------------------------- -// RESOURCE IDENTITFIER = STRING -// ------------------------------- -$aLang = array( - 'charset' => 'UTF-8', - - 'd3mxmultilang' => ' Translation Wizzard', - 'd3mxmultilang_settings' => 'Settings', - 'd3tbclmultilang_translations' => 'Translations', - 'd3tbclmultilang_imex' => 'Import / Export', - - 'D3_MULTILANG_TRANSL' => 'Translation Wizzard', - 'D3_MULTILANG_METADATA_TITLE' => 'D³ Translation Wizzard', - 'D3_MULTILANG_METADATA_DESC' => 'Manage all shop multilang items comfortable in admin panel.', - - 'D3_MULTILANG_SEARCH' => 'search', - 'D3_MULTILANG_CHOOSELANGFIRST' => 'Please choose both languages first.', - 'D3_MULTILANG_SEARCHDESC' => 'Search in selected languages
and in idents:', - 'D3_MULTILANG_SEARCHSTART' => 'start search', - 'D3_MULTILANG_SEARCHEMPTYSTART' => 'search empty items', - 'D3_MULTILANG_SEARCHIDENTICALSTART' => 'search identical items', - 'D3_MULTILANG_SEARCHALL' => 'show all items', - 'D3_MULTILANG_SEARCHFRONTEND' => 'show frontend items only', - 'D3_MULTILANG_SEARCHBACKEND' => 'show backend items only', - 'D3_MULTILANG_LANGSELECT' => 'language selection', - 'D3_MULTILANG_SELECTLANGUAGE' => 'choose language', - 'D3_MULTILANG_NEWITEM' => 'new items', - 'D3_MULTILANG_SAVE' => 'save', - 'D3_MULTILANG_EXPORT' => 'export', - 'D3_MULTILANG_FILETYPECSV' => 'CSV file', - 'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format', - 'D3_MULTILANG_FILETYPEINSTALLED' => 'installed language item files', - 'D3_MULTILANG_STARTEXPORT' => 'start export', - 'D3_MULTILANG_IMPORT' => 'import', - 'D3_MULTILANG_IMPORTSTARTCSV' => 'import CSV file', - 'D3_MULTILANG_IMPORTSTARTOXID' => 'import Oxid file', - 'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'import installed language item files', - 'D3_MULTILANG_IMPORTOXIDLANG' => 'insert in language', - 'D3_MULTILANG_IMPORTOVERWRITE' => 'overwrite existing items', - 'D3_MULTILANG_SETORIGINAL' => 'imported items are originals', - 'D3_MULTILANG_IGNOREMIME' => 'ignore file format', - 'D3_MULTILANG_IGNOREMIME_DESC' => 'To avoid import errors, the format of the import file is checked. In some cases, the format may fit, but it can not be verified. Then make sure that your import file is suitable and activate this option.', - 'D3_MULTILANG_ISADMIN' => 'imported items are admin panel translations', - 'D3_MULTILANG_SUCC_CSV' => '%d items from CSV file imported. Please clear the TMP folder.', - 'D3_MULTILANG_ERR_CSV_MIME' => '%d items from CSV file imported. Can\'t check file format.', - 'D3_MULTILANG_SUCC_OXID' => '%d items from OXID file imported. Please clear the TMP folder.', - 'D3_MULTILANG_ERR_OXID_MIME' => '%d items from OXID file imported. Can\'t check file format.', - 'D3_MULTILANG_SUCC_INSTALLED' => '%d items from installed language files imported. Please clear the TMP folder.', - 'D3_MULTILANG_NOT_SUCC' => 'Wrong file format, import canceled. Please check the file.', - 'D3_MULTILANG_SUCCEXP' => 'exported to: %s', - 'D3_MULTILANG_DEMOEXP' => 'In the demo mode of the module, the export is unfortunately not available.', - 'D3_MULTILANG_MODCFG_SAVEMISS' => 'missing language items were created automatically', - 'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'remove whitespaces at the beginning and the end of translated text', - 'D3_MULTILANG_MODCFG_MIME' => 'Import: display found filetype (debug)', - 'D3_MULTILANG_MODCFG_SEPARATOR' => 'CSV field separator', - 'D3_MULTILANG_MODCFG_ENCLOSER' => 'text enclosure', - 'D3_MULTILANG_SETTINGS' => 'base settings', - 'D3_MULTILANG_CLEARLANGCACHE' => "To activate your new language items it's required, to clear the language cache in TMP folder. Do you want do this now?", - 'D3_MULTILANG_NEWFIELDERROR' => "The marked items can't inserted, because the ident still exists.", - 'D3_MULTILANG_SUCC_COUNT' => ' items - ', - - 'D3_MULTILANG_XLS_CREATOR' => 'D³ Translation Wizzard Module for Oxid eShop', - 'D3_MULTILANG_XLS_TITLE' => 'translations', - 'D3_MULTILANG_XLS_LOCALEERR' => 'Unable to set language setting "%s" - setting is "en_us"', - 'D3_MULTILANG_XLS_LANG' => 'language', - - 'D3_MULTILANG_CLEARTMP_IMPORT' => 'D³ Translation Wizzard: import text items first', - - 'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Before using the module, it is necessary to import the used test items. Have this done automatically in the installation process or start the import before activating the module in the admin area of your shop.', - 'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i text items imported from existing files', - 'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'The database does not provide a case-sensitive collation for the %1$s field of the %2$s table. Please provide a suitable collation and adjust the database field accordingly. Until then, you can not use identically named identifiers with different capitalization.', - - 'D3_MULTILANG_EXC_NOIMPORTFILE' => 'No import file was loaded.' + + * @link http://www.oxidmodule.com + */ + +$sLangName = 'Deutsch'; + +// ------------------------------- +// RESOURCE IDENTITFIER = STRING +// ------------------------------- +$aLang = array( + 'charset' => 'UTF-8', + + 'd3mxmultilang' => ' Translation Wizzard', + 'd3mxmultilang_settings' => 'Settings', + 'd3tbclmultilang_translations' => 'Translations', + 'd3tbclmultilang_imex' => 'Import / Export', + + 'D3_MULTILANG_TRANSL' => 'Translation Wizzard', + 'D3_MULTILANG_METADATA_TITLE' => 'D³ Translation Wizzard', + 'D3_MULTILANG_METADATA_DESC' => 'Manage all shop multilang items comfortable in admin panel.', + + 'D3_MULTILANG_SEARCH' => 'search', + 'D3_MULTILANG_CHOOSELANGFIRST' => 'Please choose both languages first.', + 'D3_MULTILANG_SEARCHDESC' => 'Search in selected languages
and in idents:', + 'D3_MULTILANG_SEARCHSTART' => 'start search', + 'D3_MULTILANG_SEARCHEMPTYSTART' => 'search empty items', + 'D3_MULTILANG_SEARCHIDENTICALSTART' => 'search identical items', + 'D3_MULTILANG_SEARCHALL' => 'show all items', + 'D3_MULTILANG_SEARCHFRONTEND' => 'show frontend items only', + 'D3_MULTILANG_SEARCHBACKEND' => 'show backend items only', + 'D3_MULTILANG_LANGSELECT' => 'language selection', + 'D3_MULTILANG_SELECTLANGUAGE' => 'choose language', + 'D3_MULTILANG_NEWITEM' => 'new items', + 'D3_MULTILANG_SAVE' => 'save', + 'D3_MULTILANG_EXPORT' => 'export', + 'D3_MULTILANG_FILETYPECSV' => 'CSV file', + 'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format', + 'D3_MULTILANG_FILETYPEINSTALLED' => 'installed language item files', + 'D3_MULTILANG_STARTEXPORT' => 'start export', + 'D3_MULTILANG_IMPORT' => 'import', + 'D3_MULTILANG_IMPORTSTARTCSV' => 'import CSV file', + 'D3_MULTILANG_IMPORTSTARTOXID' => 'import Oxid file', + 'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'import installed language item files', + 'D3_MULTILANG_IMPORTOXIDLANG' => 'insert in language', + 'D3_MULTILANG_IMPORTOVERWRITE' => 'overwrite existing items', + 'D3_MULTILANG_SETORIGINAL' => 'imported items are originals', + 'D3_MULTILANG_IGNOREMIME' => 'ignore file format', + 'D3_MULTILANG_IGNOREMIME_DESC' => 'To avoid import errors, the format of the import file is checked. In some cases, the format may fit, but it can not be verified. Then make sure that your import file is suitable and activate this option.', + 'D3_MULTILANG_ISADMIN' => 'imported items are admin panel translations', + 'D3_MULTILANG_SUCC_CSV' => '%d items from CSV file imported. Please clear the TMP folder.', + 'D3_MULTILANG_ERR_CSV_MIME' => '%d items from CSV file imported. Can\'t check file format.', + 'D3_MULTILANG_SUCC_OXID' => '%d items from OXID file imported. Please clear the TMP folder.', + 'D3_MULTILANG_ERR_OXID_MIME' => '%d items from OXID file imported. Can\'t check file format.', + 'D3_MULTILANG_SUCC_INSTALLED' => '%d items from installed language files imported. Please clear the TMP folder.', + 'D3_MULTILANG_NOT_SUCC' => 'Wrong file format, import canceled. Please check the file.', + 'D3_MULTILANG_SUCCEXP' => 'exported to: %s', + 'D3_MULTILANG_DEMOEXP' => 'In the demo mode of the module, the export is unfortunately not available.', + 'D3_MULTILANG_MODCFG_SAVEMISS' => 'missing language items were created automatically', + 'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'remove whitespaces at the beginning and the end of translated text', + 'D3_MULTILANG_MODCFG_MIME' => 'Import: display found filetype (debug)', + 'D3_MULTILANG_MODCFG_SEPARATOR' => 'CSV field separator', + 'D3_MULTILANG_MODCFG_ENCLOSER' => 'text enclosure', + 'D3_MULTILANG_SETTINGS' => 'base settings', + 'D3_MULTILANG_CLEARLANGCACHE' => "To activate your new language items it's required, to clear the language cache in TMP folder. Do you want do this now?", + 'D3_MULTILANG_NEWFIELDERROR' => "The marked items can't inserted, because the ident still exists.", + 'D3_MULTILANG_SUCC_COUNT' => ' items - ', + + 'D3_MULTILANG_XLS_CREATOR' => 'D³ Translation Wizzard Module for Oxid eShop', + 'D3_MULTILANG_XLS_TITLE' => 'translations', + 'D3_MULTILANG_XLS_LOCALEERR' => 'Unable to set language setting "%s" - setting is "en_us"', + 'D3_MULTILANG_XLS_LANG' => 'language', + + 'D3_MULTILANG_CLEARTMP_IMPORT' => 'D³ Translation Wizzard: import text items first', + + 'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Before using the module, it is necessary to import the used test items. Have this done automatically in the installation process or start the import before activating the module in the admin area of your shop.', + 'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i text items imported from existing files', + 'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'The database does not provide a case-sensitive collation for the %1$s field of the %2$s table. Please provide a suitable collation and adjust the database field accordingly. Until then, you can not use identically named identifiers with different capitalization.', + + 'D3_MULTILANG_EXC_NOIMPORTFILE' => 'No import file was loaded.' ); \ No newline at end of file diff --git a/src/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl b/src/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl index e7ab35b..5846f8e 100644 --- a/src/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl +++ b/src/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl @@ -1,387 +1,387 @@ -[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] - - - - - -[{if $oView->getStatusMessages()}] -
- [{foreach from=$oView->getStatusMessages() item="sMessage"}] -

[{$sMessage}]

- [{/foreach}] -
-[{/if}] - -[{if $readonly}] - [{assign var="readonly" value="readonly disabled"}] -[{else}] - [{assign var="readonly" value=""}] -[{/if}] - -
- [{$oViewConf->getHiddenSid()}] - - - - - -
- - - - - -
- - [{block name="d3_cfg_multilang_imex__setform"}] -
- [{$oViewConf->getHiddenSid()}] - - - - - - [{if $oView->getValueStatus() == 'error'}] -
- [{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}] -
-
- - - - -
- [{else}] - [{block name="d3_cfg_multilang_imex__settings"}] - [{include file="d3_cfg_mod_active.tpl"}] - -
-
- - - [{oxmultilang ident="D3_MULTILANG_SETTINGS"}] - - -
-
- -
-
- - getValue('blMultilang_SaveMissingItems') == 1}]checked[{/if}]> -
-
-
-
- -
-
- getValue('sMultilang_Separator')}][{else}]|[{/if}]'> -
-
-
-
- -
-
- getValue('sMultilang_Encloser')}][{else}]"[{/if}]'> -
-
-
-
- -
-
- - getValue('blMultilang_trimWhiteSpaces') == 1}]checked[{/if}]> -
-
-
-
- -
-
- - getValue('blMultilang_addMappedTranslations') == 1}]checked[{/if}]> - [{oxinputhelp ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC"}] -
-
-
-
- -
-
- - getValue('blMultilang_OutputMimeType') == 1}]checked[{/if}]> -
-
-
-
- [{/block}] - - - - [{/if}] - -
-

- [{/block}] - - [{block name="d3_cfg_multilang_imex__mime"}] - [{if $oView->getMimeType()}] - Mime-Type: [{$oView->getMimeType()}]

- [{/if}] - [{/block}] - - [{block name="d3_cfg_multilang_imex__export"}] - [{if $oView->getValueStatus() != 'error'}] -
- [{oxmultilang ident="D3_MULTILANG_EXPORT"}] - - - - -
-
- [{$oViewConf->getHiddenSid()}] - - - - - - - [{block name="d3_cfg_multilang_imex__exporttype"}] -
- getExportType() == 'oxid'}]checked[{/if}] [{$readonly}]>
- [{/block}] -
- - - -
-
-
- [{/if}] - [{/block}] - -
- - [{block name="d3_cfg_multilang_imex__import"}] - [{if $oView->getValueStatus() != 'error'}] -
- [{oxmultilang ident="D3_MULTILANG_IMPORT"}] - - - - - - - [{block name="d3_cfg_multilang_imex__importinstalled"}] - - - - - [{/block}] - - [{block name="d3_cfg_multilang_imex__importcsv"}] - - - - - - - - - [{/block}] - - [{block name="d3_cfg_multilang_imex__importoxid"}] - - - - - - - - - [{/block}] - -
- [{oxmultilang ident="D3_MULTILANG_FILETYPEINSTALLED"}]: - -
- [{$oViewConf->getHiddenSid()}] - - - - - - - - - - -
-
-
-
- [{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]: - -
-
- - [{$oViewConf->getHiddenSid()}] - - - - - - - -
- - - -
-
- - getRequParam('overwrite_csv') == "1"}]checked[{/if}] [{$readonly}]>
- - getRequParam('original_csv') == "1"}]checked[{/if}] [{$readonly}]>
- - getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> -
-
-
-
-
- [{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}] (PHP): - -
-
- - [{$oViewConf->getHiddenSid()}] - - - - - - - -
- - -
- - - - -
-
- - getRequParam('overwrite_oxid') == "1"}]checked[{/if}] [{$readonly}]>
- - getRequParam('original_oxid') == "1"}]checked[{/if}] [{$readonly}]>
- - getRequParam('admin_oxid') == "1"}]checked[{/if}] [{$readonly}]>
- - getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> -
-
-
-
- [{/if}] - [{/block}] -
- -[{include file="d3_cfg_mod_inc.tpl"}] - -[{block name="d3_cfg_multilang_imex__clrtmp"}] - [{if $clrTmp}] - - [{/if}] +[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] + + + + + +[{if $oView->getStatusMessages()}] +
+ [{foreach from=$oView->getStatusMessages() item="sMessage"}] +

[{$sMessage}]

+ [{/foreach}] +
+[{/if}] + +[{if $readonly}] + [{assign var="readonly" value="readonly disabled"}] +[{else}] + [{assign var="readonly" value=""}] +[{/if}] + +
+ [{$oViewConf->getHiddenSid()}] + + + + + +
+ + + + + +
+ + [{block name="d3_cfg_multilang_imex__setform"}] +
+ [{$oViewConf->getHiddenSid()}] + + + + + + [{if $oView->getValueStatus() == 'error'}] +
+ [{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}] +
+
+ + + + +
+ [{else}] + [{block name="d3_cfg_multilang_imex__settings"}] + [{include file="d3_cfg_mod_active.tpl"}] + +
+
+ + + [{oxmultilang ident="D3_MULTILANG_SETTINGS"}] + + +
+
+ +
+
+ + getValue('blMultilang_SaveMissingItems') == 1}]checked[{/if}]> +
+
+
+
+ +
+
+ getValue('sMultilang_Separator')}][{else}]|[{/if}]'> +
+
+
+
+ +
+
+ getValue('sMultilang_Encloser')}][{else}]"[{/if}]'> +
+
+
+
+ +
+
+ + getValue('blMultilang_trimWhiteSpaces') == 1}]checked[{/if}]> +
+
+
+
+ +
+
+ + getValue('blMultilang_addMappedTranslations') == 1}]checked[{/if}]> + [{oxinputhelp ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC"}] +
+
+
+
+ +
+
+ + getValue('blMultilang_OutputMimeType') == 1}]checked[{/if}]> +
+
+
+
+ [{/block}] + + + + [{/if}] + +
+

+ [{/block}] + + [{block name="d3_cfg_multilang_imex__mime"}] + [{if $oView->getMimeType()}] + Mime-Type: [{$oView->getMimeType()}]

+ [{/if}] + [{/block}] + + [{block name="d3_cfg_multilang_imex__export"}] + [{if $oView->getValueStatus() != 'error'}] +
+ [{oxmultilang ident="D3_MULTILANG_EXPORT"}] + + + + +
+
+ [{$oViewConf->getHiddenSid()}] + + + + + + + [{block name="d3_cfg_multilang_imex__exporttype"}] +
+ getExportType() == 'oxid'}]checked[{/if}] [{$readonly}]>
+ [{/block}] +
+ + + +
+
+
+ [{/if}] + [{/block}] + +
+ + [{block name="d3_cfg_multilang_imex__import"}] + [{if $oView->getValueStatus() != 'error'}] +
+ [{oxmultilang ident="D3_MULTILANG_IMPORT"}] + + + + + + + [{block name="d3_cfg_multilang_imex__importinstalled"}] + + + + + [{/block}] + + [{block name="d3_cfg_multilang_imex__importcsv"}] + + + + + + + + + [{/block}] + + [{block name="d3_cfg_multilang_imex__importoxid"}] + + + + + + + + + [{/block}] + +
+ [{oxmultilang ident="D3_MULTILANG_FILETYPEINSTALLED"}]: + +
+ [{$oViewConf->getHiddenSid()}] + + + + + + + + + + +
+
+
+
+ [{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]: + +
+
+ + [{$oViewConf->getHiddenSid()}] + + + + + + + +
+ + + +
+
+ + getRequParam('overwrite_csv') == "1"}]checked[{/if}] [{$readonly}]>
+ + getRequParam('original_csv') == "1"}]checked[{/if}] [{$readonly}]>
+ + getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> +
+
+
+
+
+ [{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}] (PHP): + +
+
+ + [{$oViewConf->getHiddenSid()}] + + + + + + + +
+ + +
+ + + + +
+
+ + getRequParam('overwrite_oxid') == "1"}]checked[{/if}] [{$readonly}]>
+ + getRequParam('original_oxid') == "1"}]checked[{/if}] [{$readonly}]>
+ + getRequParam('admin_oxid') == "1"}]checked[{/if}] [{$readonly}]>
+ + getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> +
+
+
+
+ [{/if}] + [{/block}] +
+ +[{include file="d3_cfg_mod_inc.tpl"}] + +[{block name="d3_cfg_multilang_imex__clrtmp"}] + [{if $clrTmp}] + + [{/if}] [{/block}] \ No newline at end of file diff --git a/src/Application/views/admin/tpl/d3_cfg_multilang_main.tpl b/src/Application/views/admin/tpl/d3_cfg_multilang_main.tpl index eb8c6c5..c4fac7d 100644 --- a/src/Application/views/admin/tpl/d3_cfg_multilang_main.tpl +++ b/src/Application/views/admin/tpl/d3_cfg_multilang_main.tpl @@ -1,422 +1,422 @@ -[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] - - - - - -[{if $readonly}] - [{assign var="readonly" value="readonly disabled"}] -[{else}] - [{assign var="readonly" value=""}] -[{/if}] - -
- [{$oViewConf->getHiddenSid()}] - - - - - - - - -
- - - - [{if $langsel_right != 'none' && $langsel_left != 'none'}] - [{* Suche *}] - - - - [{/if}] - - [{* Sprachwahl *}] - - - -
- - [{block name="d3_cfg_multilang_main__searchform"}] -
- [{$oViewConf->getHiddenSid()}] - - - - - - -
- [{oxmultilang ident="D3_MULTILANG_SEARCH"}] - - - [{block name="d3_cfg_multilang_main__searchformelements"}] - - - - - - [{/block}] - -
- - - - - - -
-
-
- - - [{oxmultilang ident="D3_MULTILANG_SEARCH_FURTHER"}] - - -
-
-
-
- - - - - - - - - - - - - -
-
-
-
-
-
-
- [{/block}] -
- [{block name="d3_cfg_multilang_main__langselection"}] -
- [{$oViewConf->getHiddenSid()}] - - - - - -
- [{oxmultilang ident="D3_MULTILANG_LANGSELECT"}] - - - - - - - - - - - - - - - - - -
-   - - -   - -   
-
-
- [{/block}] -
- -[{if $langsel_right != 'none' && $langsel_left != 'none'}] - - [{* Neueinträge *}] - [{block name="d3_cfg_multilang_main__newitems"}] -
- [{$oViewConf->getHiddenSid()}] - - - - - - - - - - - - - - - [{* Alteinträge *}] - - - - - [{* Speichern *}] - - - -
-
- [{oxmultilang ident="D3_MULTILANG_NEWITEM"}] - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -  
- - - - - - - - - -  
-
-
-
- - - - - - - - - - [{foreach from=$aTranslations item=translation}] - - - - - - - - - [{/foreach}] -
- - - - - - original_left}]checked[{/if}] title="Original Oxid" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]> - - - - - original_right}]checked[{/if}] title="Original Oxid" [{$readonly}]> - - -
-
-
- - - - -

- - - -
-
-
- [{/block}] - - - - - -
- [{include file="d3pagenavigation.tpl"}] -
-[{else}] - [{* vorher Sprachwahl *}] - - - - -
- - - - -

- [{oxmultilang ident="D3_MULTILANG_CHOOSELANGFIRST"}] -
-
-[{/if}] - -[{include file="d3_cfg_mod_inc.tpl"}] - -[{block name="d3_cfg_multilang_main__clrtmp"}] - [{if $msg == 'success'}] - - [{elseif $msg == 'newFieldError'}] - - [{/if}] +[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] + + + + + +[{if $readonly}] + [{assign var="readonly" value="readonly disabled"}] +[{else}] + [{assign var="readonly" value=""}] +[{/if}] + +
+ [{$oViewConf->getHiddenSid()}] + + + + + + + + +
+ + + + [{if $langsel_right != 'none' && $langsel_left != 'none'}] + [{* Suche *}] + + + + [{/if}] + + [{* Sprachwahl *}] + + + +
+ + [{block name="d3_cfg_multilang_main__searchform"}] +
+ [{$oViewConf->getHiddenSid()}] + + + + + + +
+ [{oxmultilang ident="D3_MULTILANG_SEARCH"}] + + + [{block name="d3_cfg_multilang_main__searchformelements"}] + + + + + + [{/block}] + +
+ + + + + + +
+
+
+ + + [{oxmultilang ident="D3_MULTILANG_SEARCH_FURTHER"}] + + +
+
+
+
+ + + + + + + + + + + + + +
+
+
+
+
+
+
+ [{/block}] +
+ [{block name="d3_cfg_multilang_main__langselection"}] +
+ [{$oViewConf->getHiddenSid()}] + + + + + +
+ [{oxmultilang ident="D3_MULTILANG_LANGSELECT"}] + + + + + + + + + + + + + + + + + +
+   + + +   + +   
+
+
+ [{/block}] +
+ +[{if $langsel_right != 'none' && $langsel_left != 'none'}] + + [{* Neueinträge *}] + [{block name="d3_cfg_multilang_main__newitems"}] +
+ [{$oViewConf->getHiddenSid()}] + + + + + + + + + + + + + + + [{* Alteinträge *}] + + + + + [{* Speichern *}] + + + +
+
+ [{oxmultilang ident="D3_MULTILANG_NEWITEM"}] + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +  
+ + + + + + + + + +  
+
+
+
+ + + + + + + + + + [{foreach from=$aTranslations item=translation}] + + + + + + + + + [{/foreach}] +
+ + + + + + original_left}]checked[{/if}] title="Original Oxid" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]> + + + + + original_right}]checked[{/if}] title="Original Oxid" [{$readonly}]> + + +
+
+
+ + + + +

+ + + +
+
+
+ [{/block}] + + + + + +
+ [{include file="d3pagenavigation.tpl"}] +
+[{else}] + [{* vorher Sprachwahl *}] + + + + +
+ + + + +

+ [{oxmultilang ident="D3_MULTILANG_CHOOSELANGFIRST"}] +
+
+[{/if}] + +[{include file="d3_cfg_mod_inc.tpl"}] + +[{block name="d3_cfg_multilang_main__clrtmp"}] + [{if $msg == 'success'}] + + [{elseif $msg == 'newFieldError'}] + + [{/if}] [{/block}] \ No newline at end of file diff --git a/src/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl b/src/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl index 3b8731a..ee75ff0 100644 --- a/src/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl +++ b/src/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl @@ -1,17 +1,17 @@ - [{$encloser}][{$translation}][{$encloser}], -[{/strip}] -[{/foreach}] -); + [{$encloser}][{$translation}][{$encloser}], +[{/strip}] +[{/foreach}] +); diff --git a/src/IntelliSenseHelper.php b/src/IntelliSenseHelper.php index 6ab8514..5581324 100644 --- a/src/IntelliSenseHelper.php +++ b/src/IntelliSenseHelper.php @@ -1,37 +1,37 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\Multilang\Modules\Application\Controller\Admin -{ - class d3_navigation_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\NavigationController {} - - class d3_sysreq_main_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain {} - - class d3cleartmp_multilang_parent extends \D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp {} -} - -namespace D3\Multilang\Modules\Application\Model\Maintenance -{ - class d3clrtmp_multilang_parent extends \D3\ModCfg\Application\Model\Maintenance\d3clrtmp {} -} - -namespace D3\Multilang\Modules\Core -{ - class d3_oxlang_multilang_parent extends \OxidEsales\Eshop\Core\Language {} - - class d3_oxsysrequirements_multilang_parent extends \OxidEsales\Eshop\Core\SystemRequirements {} + + * @link http://www.oxidmodule.com + */ + +namespace D3\Multilang\Modules\Application\Controller\Admin +{ + class d3_navigation_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\NavigationController {} + + class d3_sysreq_main_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain {} + + class d3cleartmp_multilang_parent extends \D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp {} +} + +namespace D3\Multilang\Modules\Application\Model\Maintenance +{ + class d3clrtmp_multilang_parent extends \D3\ModCfg\Application\Model\Maintenance\d3clrtmp {} +} + +namespace D3\Multilang\Modules\Core +{ + class d3_oxlang_multilang_parent extends \OxidEsales\Eshop\Core\Language {} + + class d3_oxsysrequirements_multilang_parent extends \OxidEsales\Eshop\Core\SystemRequirements {} } \ No newline at end of file diff --git a/src/Modules/Application/Controller/Admin/d3_sysreq_main_multilang.php b/src/Modules/Application/Controller/Admin/d3_sysreq_main_multilang.php index 21d95dd..8bf3cfa 100644 --- a/src/Modules/Application/Controller/Admin/d3_sysreq_main_multilang.php +++ b/src/Modules/Application/Controller/Admin/d3_sysreq_main_multilang.php @@ -1,30 +1,30 @@ - - * @link http://www.oxidmodule.com - */ - -class d3_sysreq_main_multilang extends d3_sysreq_main_multilang_parent -{ - public function render() - { - $sRet = parent::render(); - - $aCollations = $this->_aViewData['aCollations']; - unset($aCollations['d3_translations']); - $this->_aViewData['aCollations'] = $aCollations; - - return $sRet; - } + + * @link http://www.oxidmodule.com + */ + +class d3_sysreq_main_multilang extends d3_sysreq_main_multilang_parent +{ + public function render() + { + $sRet = parent::render(); + + $aCollations = $this->_aViewData['aCollations']; + unset($aCollations['d3_translations']); + $this->_aViewData['aCollations'] = $aCollations; + + return $sRet; + } } \ No newline at end of file diff --git a/src/Modules/Application/Controller/Admin/d3cleartmp_multilang.php b/src/Modules/Application/Controller/Admin/d3cleartmp_multilang.php index 81db9fe..76411bf 100644 --- a/src/Modules/Application/Controller/Admin/d3cleartmp_multilang.php +++ b/src/Modules/Application/Controller/Admin/d3cleartmp_multilang.php @@ -1,71 +1,71 @@ - - * @link http://www.oxidmodule.com - */ - -class d3cleartmp_multilang extends d3cleartmp_multilang_parent -{ - protected $_sMultiLangModId = 'd3_multilang'; - - /** - * @return string - */ - protected function _d3GetMultiLangModId() - { - return $this->_sMultiLangModId; - } - - /** - * @return bool|d3_cfg_mod|false - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function d3GetMultiLangSet() - { - return d3_cfg_mod::get($this->_d3GetMultiLangModId()); - } - - public function clearTmp() - { - $blReturn = false; - - if ($this->d3GetMultiLangSet()->isActive()) { - if (!Registry::getRequest()->getRequestEscapedParameter('clearall')) { - if (Registry::getRequest()->getRequestEscapedParameter('importmultilang')) { - $this->addTplParam('importMultilang', true); - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $oTranslation->importInstalled(); - } - } - - if ($blReturn) { - Registry::get(UtilsView::class)->addErrorToDisplay(new StandardException('D3_CFG_CLRTMP_SUCCESS')); - } - } - - parent::clearTmp(); - } -} + + * @link http://www.oxidmodule.com + */ + +class d3cleartmp_multilang extends d3cleartmp_multilang_parent +{ + protected $_sMultiLangModId = 'd3_multilang'; + + /** + * @return string + */ + protected function _d3GetMultiLangModId() + { + return $this->_sMultiLangModId; + } + + /** + * @return bool|d3_cfg_mod|false + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function d3GetMultiLangSet() + { + return d3_cfg_mod::get($this->_d3GetMultiLangModId()); + } + + public function clearTmp() + { + $blReturn = false; + + if ($this->d3GetMultiLangSet()->isActive()) { + if (!Registry::getRequest()->getRequestEscapedParameter('clearall')) { + if (Registry::getRequest()->getRequestEscapedParameter('importmultilang')) { + $this->addTplParam('importMultilang', true); + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $oTranslation->importInstalled(); + } + } + + if ($blReturn) { + Registry::get(UtilsView::class)->addErrorToDisplay(new StandardException('D3_CFG_CLRTMP_SUCCESS')); + } + } + + parent::clearTmp(); + } +} diff --git a/src/Setup/Events.php b/src/Setup/Events.php index 645adbe..a7a9661 100644 --- a/src/Setup/Events.php +++ b/src/Setup/Events.php @@ -1,46 +1,46 @@ - - * @link http://www.oxidmodule.com - */ - -namespace D3\Multilang\Setup; - -use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException; -use D3\ModCfg\Application\Model\Install\d3install; -use Doctrine\DBAL\DBALException; -use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; -use OxidEsales\Eshop\Core\Exception\DatabaseErrorException; -use OxidEsales\Eshop\Core\Exception\StandardException; -use OxidEsales\Eshop\Core\Exception\SystemComponentException; - -class Events -{ - /** - * @throws d3ShopCompatibilityAdapterException - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws StandardException - * @throws SystemComponentException - */ - public static function onActivate() - { - d3install::checkUpdateStart(); - } - - public static function onDeactivate() - { - } + + * @link http://www.oxidmodule.com + */ + +namespace D3\Multilang\Setup; + +use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException; +use D3\ModCfg\Application\Model\Install\d3install; +use Doctrine\DBAL\DBALException; +use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; +use OxidEsales\Eshop\Core\Exception\DatabaseErrorException; +use OxidEsales\Eshop\Core\Exception\StandardException; +use OxidEsales\Eshop\Core\Exception\SystemComponentException; + +class Events +{ + /** + * @throws d3ShopCompatibilityAdapterException + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws StandardException + * @throws SystemComponentException + */ + public static function onActivate() + { + d3install::checkUpdateStart(); + } + + public static function onDeactivate() + { + } } \ No newline at end of file diff --git a/src/Setup/d3multilang_update.php b/src/Setup/d3multilang_update.php index 926ebd9..c0e1fe9 100644 --- a/src/Setup/d3multilang_update.php +++ b/src/Setup/d3multilang_update.php @@ -1,472 +1,472 @@ - - * @link http://www.oxidmodule.com - */ - -class d3multilang_update extends d3install_updatebase -{ - public $sModKey = 'd3_multilang'; - public $sModName = 'Übersetzungsassistent'; - public $sModVersion = '4.0.0.1'; - public $sModRevision = '4001'; - public $sBaseConf = 'b1av2==aGNOa0hIWDFTaGVGdUhSdysxSjB6SVowWUdyWFhWMGFXS2NpYktnKzlkN2ZnNG03MndET2RuW -nNPVnFudmFUU2d1WnNTV1hCNk5odUg5S1FXdnZIS3IvWTgvVnpOZVhmSzcyZW1JMHVJa0JJNkZEbjJCT -EY1RmEzaG5TUGNiSkRCTVVVK2kya2d5SDl4aTQ4R28waHlxUFBPVzhkQnM4Y0k3alZtYTVaTlFlYXVFV -0NxSGI5a2pnRTdzc2NFMEF2T3pSOW9zbG5EV01TLzU3UGEvZGRRcEZLeXNhNDMvQVV4YnVpN1c2czFad -VRmcHU5c3htT2lJRVhIVGxrK1RJOUczdEwzZjJNSnJGQ21iamhaR2w5QU9UemdKQUVxcU5CQWhCMnFyL -09ybjB5cWp0MTM5VUQ1K05rVmVGNkE5UUdQa3RKcXpyNkpEbWNuMGdCWDVZSG9nPT0='; - public $sRequirements = ''; - public $sBaseValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTQlM0ElN0JzJTNBMjglM0ElMjJkM19jZmdfbW9kX19hTGljZW5zZUluZm9NYWlsJTIyJTNCYSUzQTIlM0ElN0JzJTNBNDglM0ElMjJVTktOT1dOQ09ORktFWV9fNDc5MzYzODcwMmI2NzcxNWYxZGZiZmM4MzI0NjY5MTQlMjIlM0JzJTNBMTklM0ElMjIyMDEzLTEwLTE3JTIwMDklM0EzOSUzQTUyJTIyJTNCcyUzQTQyJTNBJTIyTk9MSUNLRVlfXzQ3OTM2Mzg3MDJiNjc3MTVmMWRmYmZjODMyNDY2OTE0JTIyJTNCcyUzQTE5JTNBJTIyMjAxMy0xMC0xNyUyMDA5JTNBNDElM0EyNyUyMiUzQiU3RHMlM0EzOCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX091dHB1dE1pbWVUeXBlJTIyJTNCcyUzQTElM0ElMjIxJTIyJTNCcyUzQTMyJTNBJTIyZDNfY2ZnX21vZF9fc011bHRpbGFuZ19TZXBhcmF0b3IlMjIlM0JzJTNBMSUzQSUyMiU3QyUyMiUzQnMlM0E0MCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX1NhdmVNaXNzaW5nSXRlbXMlMjIlM0JzJTNBMSUzQSUyMjElMjIlM0IlN0Q='; - - protected $_aUpdateMethods = array( - array('check' => 'checkModCfgItemExist', - 'do' => 'updateModCfgItemExist'), - array('check' => 'checkRenameFields', - 'do' => 'fixRenameFields'), - array('check' => 'checkDeleteFields', - 'do' => 'fixDeleteFields'), - array('check' => 'checkTranslationTableExist', - 'do' => 'updateTranslationTableExist'), - array('check' => 'checkFields', - 'do' => 'fixFields'), - array('check' => 'checkIdentCollation', - 'do' => 'fixIdentCollation'), - array('check' => 'checkIndizes', - 'do' => 'fixIndizes'), - array('check' => 'checkFieldsCollation', - 'do' => 'fixFieldsCollation'), - array('check' => 'checkMultiLangDbItemsNotExist', - 'do' => 'importMultiLangItems'), - array('check' => 'hasUnregisteredFiles', - 'do' => 'showUnregisteredFiles'), - array('check' => 'checkModCfgSameRevision', - 'do' => 'updateModCfgSameRevision'), - ); - - public $aFields = array( - 'OXID' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'OXID', - 'sType' => 'VARCHAR(100)', - 'blNull' => false, - 'sDefault' => false, - 'sComment' => '', - 'sExtra' => '', - 'blMultilang' => false, - ), - 'OXTEXT' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'OXTEXT', - 'sType' => 'TEXT', - 'blNull' => false, - 'sDefault' => false, - 'sComment' => '', - 'sExtra' => '', - 'blMultilang' => true, - 'sForceCollation' => 'utf8_general_ci' - ), - 'OXORIGINAL' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'OXORIGINAL', - 'sType' => 'TINYINT(1)', - 'blNull' => false, - 'sDefault' => '0', - 'sComment' => 'item is modified', - 'sExtra' => '', - 'blMultilang' => true, - ), - 'OXSTRING' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'OXSTRING', - 'sType' => 'TINYINT(1)', - 'blNull' => false, - 'sDefault' => '1', - 'sComment' => 'item ist string or serialized structure', - 'sExtra' => '', - 'blMultilang' => false, - ), - 'OXADMIN' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'OXADMIN', - 'sType' => 'TINYINT(1)', - 'blNull' => false, - 'sDefault' => '0', - 'sComment' => 'item is used in admin panel', - 'sExtra' => '', - 'blMultilang' => false, - ), - ); - - public $aIndizes = array( - 'OXID' => array( - 'sTableName' => 'd3_translations', - 'sType' => d3database::INDEX_TYPE_PRIMARY, - 'sName' => 'OXID', - 'aFields' => array( - 'OXID' => 'OXID', - 'OXADMIN' => 'OXADMIN', - ), - ), - ); - - public $aRenameFields = array( - 'OXID' => array( - 'sTableName' => 'd3_translations', - 'mOldFieldNames' => array('oxident', 'OXIDENT'), // is case sensitive - 'sFieldName' => 'OXID', - 'blMultilang' => false, - ), - 'OXTEXT_0' => array( - 'sTableName' => 'd3_translations', - 'mOldFieldNames' => array('oxtext', 'oxtext_0'), // is case sensitive - 'sFieldName' => 'OXTEXT', - 'blMultilang' => false, - ), - 'OXTEXT' => array( - 'sTableName' => 'd3_translations', - 'mOldFieldNames' => array('oxtext'), // is case sensitive - 'sFieldName' => 'OXTEXT', - 'blMultilang' => true, - ), - 'OXORIGINAL' => array( - 'sTableName' => 'd3_translations', - 'mOldFieldNames' => array('oxoriginal'), // is case sensitive - 'sFieldName' => 'OXORIGINAL', - 'blMultilang' => false, - ), - ); - - public $aDeleteFields = array( - 'OXISSET' => array( - 'sTableName' => 'd3_translations', - 'sFieldName' => 'oxisset', - 'blMultilang' => false, - ), - ); - - protected $_aRefreshMetaModuleIds = array('d3_multilang'); - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function checkTranslationTableExist() - { - return $this->_checkTableNotExist('d3_translations'); - } - - /** - * @return bool - * @throws ConnectionException - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function updateTranslationTableExist() - { - $blRet = false; - if ($this->checkTranslationTableExist()) { - $this->setInitialExecMethod(__METHOD__); - $blRet = $this->_addTable2('d3_translations', $this->aFields, $this->aIndizes, 'D3 multilang', 'MyISAM'); - } - - return $blRet; - } - - /** - * @return bool - * @throws DatabaseConnectionException - * @throws d3ParameterNotFoundException - */ - public function checkIdentCollation() - { - $sFieldCollation = $this->_getIdentCollation(); - - $sPattern = '@.*_cs|.*_bin@'; - return false == preg_match($sPattern, $sFieldCollation); - } - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws d3ParameterNotFoundException - */ - public function fixIdentCollation() - { - $sFieldIdent = 'OXID'; - $sFieldCollation = $this->_getIdentCollation(); - - $sGeneralPattern = '@(.*)_ci@'; - preg_match($sGeneralPattern, $sFieldCollation, $aGeneralMatches); - - $sBinPattern = '@(.*)_general_ci@'; - preg_match($sBinPattern, $sFieldCollation, $aBinMatches); - - $oDatabase = $this->_getDatabaseHandler(); - - $sAvailableCollationSelect = "SHOW COLLATION WHERE Collation IN( - '".$aGeneralMatches[1]."_cs', 'utf8_general_cs', 'latin1_general_cs', - '".$aBinMatches[1]."_bin', 'utf8_bin', 'latin1_bin' - )"; - - $aAvailableCollations = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sAvailableCollationSelect); - usort($aAvailableCollations, array($this, 'sortCollations')); - - if (count($aAvailableCollations)) { - $sSelect = 'ALTER TABLE `'.$this->aFields[$sFieldIdent]['sTableName'].'` CHANGE `'. - $this->aFields[$sFieldIdent]['sFieldName'].'` `'.$this->aFields[$sFieldIdent]['sFieldName'].'` '. - $this->aFields[$sFieldIdent]['sType'].' CHARACTER SET '.$oDatabase->getBaseCharset(). - ' COLLATE '.$aAvailableCollations[0]['Collation'].' NOT NULL;'; - - $this->setActionLog( - 'SQL', - $sSelect, - $this->getInitialExecMethod(__METHOD__) - ); - - /** @var d3installdbcommon $oDbCommon */ - $oDbCommon = oxNew(d3installdbcommon::class, $this); - $blRet = $oDbCommon->tableSqlExecute($sSelect, $this->aFields[$sFieldIdent]['sTableName'], false); - } else { - /** @var d3installconfirmmessage $oMessage */ - $sMessage = sprintf( - Registry::getLang()->translateString('D3_MULTILANG_INSTALL_NOCSCOLLATION'), - $this->aFields[$sFieldIdent]['sFieldName'], - $this->aFields[$sFieldIdent]['sTableName'] - ); - $oMessage = oxNew(d3installconfirmmessage::class, $this); - $blRet = $oMessage->confirmCustomMessage($sMessage); - } - - return $blRet; - } - - /** - * @param $a - * @param $b - * - * @return int - * @throws DBALException - * @throws DatabaseConnectionException - */ - public function sortCollations($a, $b) - { - $oDatabase = $this->_getDatabaseHandler(); - $sBaseCharset = $oDatabase->getBaseCharset(); - - if ($a['Charset'] == $sBaseCharset && $b['Charset'] != $sBaseCharset) { - return -1; - } elseif ($a['Charset'] != $sBaseCharset && $b['Charset'] == $sBaseCharset) { - return 1; - } - - if (strstr($a['Collation'], '_general_cs') && !strstr($b['Collation'], '_general_cs')) { - return -1; - } elseif (!strstr($a['Collation'], '_general_cs') && strstr($b['Collation'], '_general_cs')) { - return 1; - } - - return 0; - } - - /** - * @return string - * @throws DatabaseConnectionException - * @throws d3ParameterNotFoundException - */ - protected function _getIdentCollation() - { - if ($this->getCacheHandler()->has(__METHOD__)) { - return $this->getCacheHandler()->get(__METHOD__); - } - - startProfile(__METHOD__); - - $myConfig = Registry::getConfig(); - $sSelect = 'select c.COLLATION_NAME from INFORMATION_SCHEMA.tables t ' . - 'LEFT JOIN INFORMATION_SCHEMA.columns c ON t.TABLE_NAME = c.TABLE_NAME ' . - 'where t.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' . - 'and t.TABLE_NAME = "d3_translations" ' . - 'and c.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' . - 'and c.COLUMN_NAME = "OXID" ' . - ' LIMIT 1'; - - $sCollation = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect); - $this->getCacheHandler()->set(__METHOD__, $sCollation); - - stopProfile(__METHOD__); - - return $sCollation; - } - - /** - * @return bool - */ - public function checkIndexRefreshMsg() - { - if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) { - return true; - } - - return false; - } - - /** - * @return bool - */ - public function fixIndexRefreshMsg() - { - $blRet = true; - - if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) { - Registry::getSession()->setVariable('checkIndexRefreshMsg', false); - $this->_confirmMessage('D3_EXTSEARCH_UPDATE_GENPHONETIC'); - } - - return $blRet; - } - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - */ - public function checkContentNoArtItemExist() - { - $blRet = false; - foreach ($this->getShopList() as $oShop) { - /** @var $oShop Shop */ - $aWhere = array( - 'oxloadid' => 'd3extsearch_noarticlefound', - 'oxshopid' => $oShop->getId(), - ); - - $blRet = $this->_checkTableItemNotExist('oxcontents', $aWhere); - - if ($blRet) { - return $blRet; - } - } - - return $blRet; - } - - /** - * @return bool true, if update is required - * @throws DatabaseConnectionException - */ - public function checkMultiLangDbItemsNotExist() - { - $blRet = false; - - // change this to your inividual check criterias - $sSql = "SELECT count(`oxid`) "; - $sSql .= "FROM `d3_translations` WHERE 1;"; - - if ($this->getDb()->getOne($sSql) == 0) { - $blRet = true; - } - - return $blRet; - } - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - */ - public function importMultiLangItems() - { - $this->setInitialExecMethod(__METHOD__); - - if ($this->checkMultiLangDbItemsNotExist()) { - if ($this->hasExecute()) { - /** @var d3_translations $oTranslation */ - $oTranslation = oxNew(d3_translations::class); - $iImport = $oTranslation->importInstalled(); - $this->setActionLog( - 'MSG', - sprintf(Registry::getLang()->translateString('D3_MULTILANG_INSTALL_IMPORTSUCC'), $iImport), - $this->getInitialExecMethod(__METHOD__) - ); - } else { - $this->setActionLog( - 'MSG', - Registry::getLang()->translateString('D3_MULTILANG_INSTALL_EXECIMPORT'), - $this->getInitialExecMethod(__METHOD__) - ); - } - $this->setUpdateBreak(true); - } - - return true; - } - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - * @throws StandardException - * @throws ReflectionException - * @throws d3ParameterNotFoundException - */ - public function hasUnregisteredFiles() - { - return $this->_hasUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister')); - } - - /** - * @return bool - * @throws DBALException - * @throws DatabaseConnectionException - * @throws DatabaseErrorException - * @throws ReflectionException - * @throws StandardException - * @throws d3ShopCompatibilityAdapterException - * @throws d3_cfg_mod_exception - */ - public function showUnregisteredFiles() - { - return $this->_showUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister')); - } -} + + * @link http://www.oxidmodule.com + */ + +class d3multilang_update extends d3install_updatebase +{ + public $sModKey = 'd3_multilang'; + public $sModName = 'Übersetzungsassistent'; + public $sModVersion = '4.0.0.1'; + public $sModRevision = '4001'; + public $sBaseConf = 'b1av2==aGNOa0hIWDFTaGVGdUhSdysxSjB6SVowWUdyWFhWMGFXS2NpYktnKzlkN2ZnNG03MndET2RuW +nNPVnFudmFUU2d1WnNTV1hCNk5odUg5S1FXdnZIS3IvWTgvVnpOZVhmSzcyZW1JMHVJa0JJNkZEbjJCT +EY1RmEzaG5TUGNiSkRCTVVVK2kya2d5SDl4aTQ4R28waHlxUFBPVzhkQnM4Y0k3alZtYTVaTlFlYXVFV +0NxSGI5a2pnRTdzc2NFMEF2T3pSOW9zbG5EV01TLzU3UGEvZGRRcEZLeXNhNDMvQVV4YnVpN1c2czFad +VRmcHU5c3htT2lJRVhIVGxrK1RJOUczdEwzZjJNSnJGQ21iamhaR2w5QU9UemdKQUVxcU5CQWhCMnFyL +09ybjB5cWp0MTM5VUQ1K05rVmVGNkE5UUdQa3RKcXpyNkpEbWNuMGdCWDVZSG9nPT0='; + public $sRequirements = ''; + public $sBaseValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTQlM0ElN0JzJTNBMjglM0ElMjJkM19jZmdfbW9kX19hTGljZW5zZUluZm9NYWlsJTIyJTNCYSUzQTIlM0ElN0JzJTNBNDglM0ElMjJVTktOT1dOQ09ORktFWV9fNDc5MzYzODcwMmI2NzcxNWYxZGZiZmM4MzI0NjY5MTQlMjIlM0JzJTNBMTklM0ElMjIyMDEzLTEwLTE3JTIwMDklM0EzOSUzQTUyJTIyJTNCcyUzQTQyJTNBJTIyTk9MSUNLRVlfXzQ3OTM2Mzg3MDJiNjc3MTVmMWRmYmZjODMyNDY2OTE0JTIyJTNCcyUzQTE5JTNBJTIyMjAxMy0xMC0xNyUyMDA5JTNBNDElM0EyNyUyMiUzQiU3RHMlM0EzOCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX091dHB1dE1pbWVUeXBlJTIyJTNCcyUzQTElM0ElMjIxJTIyJTNCcyUzQTMyJTNBJTIyZDNfY2ZnX21vZF9fc011bHRpbGFuZ19TZXBhcmF0b3IlMjIlM0JzJTNBMSUzQSUyMiU3QyUyMiUzQnMlM0E0MCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX1NhdmVNaXNzaW5nSXRlbXMlMjIlM0JzJTNBMSUzQSUyMjElMjIlM0IlN0Q='; + + protected $_aUpdateMethods = array( + array('check' => 'checkModCfgItemExist', + 'do' => 'updateModCfgItemExist'), + array('check' => 'checkRenameFields', + 'do' => 'fixRenameFields'), + array('check' => 'checkDeleteFields', + 'do' => 'fixDeleteFields'), + array('check' => 'checkTranslationTableExist', + 'do' => 'updateTranslationTableExist'), + array('check' => 'checkFields', + 'do' => 'fixFields'), + array('check' => 'checkIdentCollation', + 'do' => 'fixIdentCollation'), + array('check' => 'checkIndizes', + 'do' => 'fixIndizes'), + array('check' => 'checkFieldsCollation', + 'do' => 'fixFieldsCollation'), + array('check' => 'checkMultiLangDbItemsNotExist', + 'do' => 'importMultiLangItems'), + array('check' => 'hasUnregisteredFiles', + 'do' => 'showUnregisteredFiles'), + array('check' => 'checkModCfgSameRevision', + 'do' => 'updateModCfgSameRevision'), + ); + + public $aFields = array( + 'OXID' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'OXID', + 'sType' => 'VARCHAR(100)', + 'blNull' => false, + 'sDefault' => false, + 'sComment' => '', + 'sExtra' => '', + 'blMultilang' => false, + ), + 'OXTEXT' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'OXTEXT', + 'sType' => 'TEXT', + 'blNull' => false, + 'sDefault' => false, + 'sComment' => '', + 'sExtra' => '', + 'blMultilang' => true, + 'sForceCollation' => 'utf8_general_ci' + ), + 'OXORIGINAL' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'OXORIGINAL', + 'sType' => 'TINYINT(1)', + 'blNull' => false, + 'sDefault' => '0', + 'sComment' => 'item is modified', + 'sExtra' => '', + 'blMultilang' => true, + ), + 'OXSTRING' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'OXSTRING', + 'sType' => 'TINYINT(1)', + 'blNull' => false, + 'sDefault' => '1', + 'sComment' => 'item ist string or serialized structure', + 'sExtra' => '', + 'blMultilang' => false, + ), + 'OXADMIN' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'OXADMIN', + 'sType' => 'TINYINT(1)', + 'blNull' => false, + 'sDefault' => '0', + 'sComment' => 'item is used in admin panel', + 'sExtra' => '', + 'blMultilang' => false, + ), + ); + + public $aIndizes = array( + 'OXID' => array( + 'sTableName' => 'd3_translations', + 'sType' => d3database::INDEX_TYPE_PRIMARY, + 'sName' => 'OXID', + 'aFields' => array( + 'OXID' => 'OXID', + 'OXADMIN' => 'OXADMIN', + ), + ), + ); + + public $aRenameFields = array( + 'OXID' => array( + 'sTableName' => 'd3_translations', + 'mOldFieldNames' => array('oxident', 'OXIDENT'), // is case sensitive + 'sFieldName' => 'OXID', + 'blMultilang' => false, + ), + 'OXTEXT_0' => array( + 'sTableName' => 'd3_translations', + 'mOldFieldNames' => array('oxtext', 'oxtext_0'), // is case sensitive + 'sFieldName' => 'OXTEXT', + 'blMultilang' => false, + ), + 'OXTEXT' => array( + 'sTableName' => 'd3_translations', + 'mOldFieldNames' => array('oxtext'), // is case sensitive + 'sFieldName' => 'OXTEXT', + 'blMultilang' => true, + ), + 'OXORIGINAL' => array( + 'sTableName' => 'd3_translations', + 'mOldFieldNames' => array('oxoriginal'), // is case sensitive + 'sFieldName' => 'OXORIGINAL', + 'blMultilang' => false, + ), + ); + + public $aDeleteFields = array( + 'OXISSET' => array( + 'sTableName' => 'd3_translations', + 'sFieldName' => 'oxisset', + 'blMultilang' => false, + ), + ); + + protected $_aRefreshMetaModuleIds = array('d3_multilang'); + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function checkTranslationTableExist() + { + return $this->_checkTableNotExist('d3_translations'); + } + + /** + * @return bool + * @throws ConnectionException + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function updateTranslationTableExist() + { + $blRet = false; + if ($this->checkTranslationTableExist()) { + $this->setInitialExecMethod(__METHOD__); + $blRet = $this->_addTable2('d3_translations', $this->aFields, $this->aIndizes, 'D3 multilang', 'MyISAM'); + } + + return $blRet; + } + + /** + * @return bool + * @throws DatabaseConnectionException + * @throws d3ParameterNotFoundException + */ + public function checkIdentCollation() + { + $sFieldCollation = $this->_getIdentCollation(); + + $sPattern = '@.*_cs|.*_bin@'; + return false == preg_match($sPattern, $sFieldCollation); + } + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws d3ParameterNotFoundException + */ + public function fixIdentCollation() + { + $sFieldIdent = 'OXID'; + $sFieldCollation = $this->_getIdentCollation(); + + $sGeneralPattern = '@(.*)_ci@'; + preg_match($sGeneralPattern, $sFieldCollation, $aGeneralMatches); + + $sBinPattern = '@(.*)_general_ci@'; + preg_match($sBinPattern, $sFieldCollation, $aBinMatches); + + $oDatabase = $this->_getDatabaseHandler(); + + $sAvailableCollationSelect = "SHOW COLLATION WHERE Collation IN( + '".$aGeneralMatches[1]."_cs', 'utf8_general_cs', 'latin1_general_cs', + '".$aBinMatches[1]."_bin', 'utf8_bin', 'latin1_bin' + )"; + + $aAvailableCollations = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sAvailableCollationSelect); + usort($aAvailableCollations, array($this, 'sortCollations')); + + if (count($aAvailableCollations)) { + $sSelect = 'ALTER TABLE `'.$this->aFields[$sFieldIdent]['sTableName'].'` CHANGE `'. + $this->aFields[$sFieldIdent]['sFieldName'].'` `'.$this->aFields[$sFieldIdent]['sFieldName'].'` '. + $this->aFields[$sFieldIdent]['sType'].' CHARACTER SET '.$oDatabase->getBaseCharset(). + ' COLLATE '.$aAvailableCollations[0]['Collation'].' NOT NULL;'; + + $this->setActionLog( + 'SQL', + $sSelect, + $this->getInitialExecMethod(__METHOD__) + ); + + /** @var d3installdbcommon $oDbCommon */ + $oDbCommon = oxNew(d3installdbcommon::class, $this); + $blRet = $oDbCommon->tableSqlExecute($sSelect, $this->aFields[$sFieldIdent]['sTableName'], false); + } else { + /** @var d3installconfirmmessage $oMessage */ + $sMessage = sprintf( + Registry::getLang()->translateString('D3_MULTILANG_INSTALL_NOCSCOLLATION'), + $this->aFields[$sFieldIdent]['sFieldName'], + $this->aFields[$sFieldIdent]['sTableName'] + ); + $oMessage = oxNew(d3installconfirmmessage::class, $this); + $blRet = $oMessage->confirmCustomMessage($sMessage); + } + + return $blRet; + } + + /** + * @param $a + * @param $b + * + * @return int + * @throws DBALException + * @throws DatabaseConnectionException + */ + public function sortCollations($a, $b) + { + $oDatabase = $this->_getDatabaseHandler(); + $sBaseCharset = $oDatabase->getBaseCharset(); + + if ($a['Charset'] == $sBaseCharset && $b['Charset'] != $sBaseCharset) { + return -1; + } elseif ($a['Charset'] != $sBaseCharset && $b['Charset'] == $sBaseCharset) { + return 1; + } + + if (strstr($a['Collation'], '_general_cs') && !strstr($b['Collation'], '_general_cs')) { + return -1; + } elseif (!strstr($a['Collation'], '_general_cs') && strstr($b['Collation'], '_general_cs')) { + return 1; + } + + return 0; + } + + /** + * @return string + * @throws DatabaseConnectionException + * @throws d3ParameterNotFoundException + */ + protected function _getIdentCollation() + { + if ($this->getCacheHandler()->has(__METHOD__)) { + return $this->getCacheHandler()->get(__METHOD__); + } + + startProfile(__METHOD__); + + $myConfig = Registry::getConfig(); + $sSelect = 'select c.COLLATION_NAME from INFORMATION_SCHEMA.tables t ' . + 'LEFT JOIN INFORMATION_SCHEMA.columns c ON t.TABLE_NAME = c.TABLE_NAME ' . + 'where t.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' . + 'and t.TABLE_NAME = "d3_translations" ' . + 'and c.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' . + 'and c.COLUMN_NAME = "OXID" ' . + ' LIMIT 1'; + + $sCollation = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect); + $this->getCacheHandler()->set(__METHOD__, $sCollation); + + stopProfile(__METHOD__); + + return $sCollation; + } + + /** + * @return bool + */ + public function checkIndexRefreshMsg() + { + if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) { + return true; + } + + return false; + } + + /** + * @return bool + */ + public function fixIndexRefreshMsg() + { + $blRet = true; + + if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) { + Registry::getSession()->setVariable('checkIndexRefreshMsg', false); + $this->_confirmMessage('D3_EXTSEARCH_UPDATE_GENPHONETIC'); + } + + return $blRet; + } + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + */ + public function checkContentNoArtItemExist() + { + $blRet = false; + foreach ($this->getShopList() as $oShop) { + /** @var $oShop Shop */ + $aWhere = array( + 'oxloadid' => 'd3extsearch_noarticlefound', + 'oxshopid' => $oShop->getId(), + ); + + $blRet = $this->_checkTableItemNotExist('oxcontents', $aWhere); + + if ($blRet) { + return $blRet; + } + } + + return $blRet; + } + + /** + * @return bool true, if update is required + * @throws DatabaseConnectionException + */ + public function checkMultiLangDbItemsNotExist() + { + $blRet = false; + + // change this to your inividual check criterias + $sSql = "SELECT count(`oxid`) "; + $sSql .= "FROM `d3_translations` WHERE 1;"; + + if ($this->getDb()->getOne($sSql) == 0) { + $blRet = true; + } + + return $blRet; + } + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function importMultiLangItems() + { + $this->setInitialExecMethod(__METHOD__); + + if ($this->checkMultiLangDbItemsNotExist()) { + if ($this->hasExecute()) { + /** @var d3_translations $oTranslation */ + $oTranslation = oxNew(d3_translations::class); + $iImport = $oTranslation->importInstalled(); + $this->setActionLog( + 'MSG', + sprintf(Registry::getLang()->translateString('D3_MULTILANG_INSTALL_IMPORTSUCC'), $iImport), + $this->getInitialExecMethod(__METHOD__) + ); + } else { + $this->setActionLog( + 'MSG', + Registry::getLang()->translateString('D3_MULTILANG_INSTALL_EXECIMPORT'), + $this->getInitialExecMethod(__METHOD__) + ); + } + $this->setUpdateBreak(true); + } + + return true; + } + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + * @throws StandardException + * @throws ReflectionException + * @throws d3ParameterNotFoundException + */ + public function hasUnregisteredFiles() + { + return $this->_hasUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister')); + } + + /** + * @return bool + * @throws DBALException + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + * @throws ReflectionException + * @throws StandardException + * @throws d3ShopCompatibilityAdapterException + * @throws d3_cfg_mod_exception + */ + public function showUnregisteredFiles() + { + return $this->_showUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister')); + } +} diff --git a/src/menu.xml b/src/menu.xml index 0ab0c3a..989da20 100644 --- a/src/menu.xml +++ b/src/menu.xml @@ -1,12 +1,12 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/metadata.php b/src/metadata.php index 7c4875c..22ee531 100644 --- a/src/metadata.php +++ b/src/metadata.php @@ -1,89 +1,89 @@ - - * @link http://www.oxidmodule.com - */ - -use D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp; -use D3\ModCfg\Application\Model\d3utils; -use D3\ModCfg\Application\Model\Maintenance\d3clrtmp; -use OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain; -use OxidEsales\Eshop\Core\Language; - -/** - * Metadata version - */ -$sMetadataVersion = '2.0'; - -/** - * Module information - */ -$aModule = array( - 'id' => 'd3_multilang', - 'title' => (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³') . ' Übersetzungsassistent', - 'description' => array( - 'de' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich', - 'en' => '', - ), - 'thumbnail' => 'picture.png', - 'version' => '4.0.0.1', - 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', - 'email' => 'support@shopmodule.com', - 'url' => 'http://www.oxidmodule.com/', - 'extend' => array( - Language::class => D3\Multilang\Modules\Core\d3_oxlang_multilang::class, - d3cleartmp::class => D3\Multilang\Modules\Application\Controller\Admin\d3cleartmp_multilang::class, - d3clrtmp::class => D3\Multilang\Modules\Application\Model\Maintenance\d3clrtmp_multilang::class, - SystemRequirementsMain::class => D3\Multilang\Modules\Application\Controller\Admin\d3_sysreq_main_multilang::class, - ), - 'controllers' => array( - 'd3_cfg_multilang' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang::class, - 'd3_cfg_multilang_imex' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_imex::class, - 'd3_cfg_multilang_licence' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_licence::class, - 'd3_cfg_multilang_list' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_list::class, - 'd3_cfg_multilang_main' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_main::class, - ), - 'templates' => array( - 'd3_cfg_multilang_imex.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl', - 'd3_cfg_multilang_main.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_main.tpl', - 'd3_oxid_lang_file_pattern.tpl' => 'd3/multilang/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl', - ), - 'events' => array( - 'onActivate' => '\D3\Multilang\Setup\Events::onActivate', - 'onDeactivate' => '\D3\Multilang\Setup\Events::onDeactivate', - ), - 'settings' => array( - ), - 'blocks' => array( - array( - 'template' => 'd3cleartmp.tpl', - 'block' => 'd3cleartmp_additional', - 'file' => 'Application/views/admin/blocks/d3cleartmp_multilang.tpl', - ), - array( - 'template' => 'd3cleartmp.tpl', - 'block' => 'd3cleartmp_js_singleitems', - 'file' => 'Application/views/admin/blocks/d3cleartmp_multilang_js.tpl', - ), - ), - 'd3FileRegister' => array( - 'd3/multilang/Application/views/admin/de/d3_multilang_lang.php', - 'd3/multilang/Application/views/admin/en/d3_multilang_lang.php', - 'd3/multilang/Application/Model/d3_translations.php', - 'd3/multilang/metadata.php', - 'd3/multilang/Setup/Events.php', - 'd3/multilang/IntelliSenseHelper.php', - ), - 'd3SetupClasses' => array( - D3\Multilang\Setup\d3multilang_update::class, - ), + + * @link http://www.oxidmodule.com + */ + +use D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp; +use D3\ModCfg\Application\Model\d3utils; +use D3\ModCfg\Application\Model\Maintenance\d3clrtmp; +use OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain; +use OxidEsales\Eshop\Core\Language; + +/** + * Metadata version + */ +$sMetadataVersion = '2.0'; + +/** + * Module information + */ +$aModule = array( + 'id' => 'd3_multilang', + 'title' => (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³') . ' Übersetzungsassistent', + 'description' => array( + 'de' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich', + 'en' => '', + ), + 'thumbnail' => 'picture.png', + 'version' => '4.0.0.1', + 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', + 'email' => 'support@shopmodule.com', + 'url' => 'http://www.oxidmodule.com/', + 'extend' => array( + Language::class => D3\Multilang\Modules\Core\d3_oxlang_multilang::class, + d3cleartmp::class => D3\Multilang\Modules\Application\Controller\Admin\d3cleartmp_multilang::class, + d3clrtmp::class => D3\Multilang\Modules\Application\Model\Maintenance\d3clrtmp_multilang::class, + SystemRequirementsMain::class => D3\Multilang\Modules\Application\Controller\Admin\d3_sysreq_main_multilang::class, + ), + 'controllers' => array( + 'd3_cfg_multilang' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang::class, + 'd3_cfg_multilang_imex' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_imex::class, + 'd3_cfg_multilang_licence' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_licence::class, + 'd3_cfg_multilang_list' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_list::class, + 'd3_cfg_multilang_main' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_main::class, + ), + 'templates' => array( + 'd3_cfg_multilang_imex.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl', + 'd3_cfg_multilang_main.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_main.tpl', + 'd3_oxid_lang_file_pattern.tpl' => 'd3/multilang/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl', + ), + 'events' => array( + 'onActivate' => '\D3\Multilang\Setup\Events::onActivate', + 'onDeactivate' => '\D3\Multilang\Setup\Events::onDeactivate', + ), + 'settings' => array( + ), + 'blocks' => array( + array( + 'template' => 'd3cleartmp.tpl', + 'block' => 'd3cleartmp_additional', + 'file' => 'Application/views/admin/blocks/d3cleartmp_multilang.tpl', + ), + array( + 'template' => 'd3cleartmp.tpl', + 'block' => 'd3cleartmp_js_singleitems', + 'file' => 'Application/views/admin/blocks/d3cleartmp_multilang_js.tpl', + ), + ), + 'd3FileRegister' => array( + 'd3/multilang/Application/views/admin/de/d3_multilang_lang.php', + 'd3/multilang/Application/views/admin/en/d3_multilang_lang.php', + 'd3/multilang/Application/Model/d3_translations.php', + 'd3/multilang/metadata.php', + 'd3/multilang/Setup/Events.php', + 'd3/multilang/IntelliSenseHelper.php', + ), + 'd3SetupClasses' => array( + D3\Multilang\Setup\d3multilang_update::class, + ), ); \ No newline at end of file