renommer module/translate en module/language

This commit is contained in:
Fred Tempez 2023-07-19 18:03:00 +02:00
parent 724c9fe521
commit 529f86c873
17 changed files with 252 additions and 251 deletions

View File

@ -1029,7 +1029,7 @@ class layout extends common
]) . '</li>'; ]) . '</li>';
$rightItems .= '<li>' . template::ico('flag', [ $rightItems .= '<li>' . template::ico('flag', [
'help' => 'Multilingue', 'help' => 'Multilingue',
'href' => helper::baseUrl() . 'translate' 'href' => helper::baseUrl() . 'language'
]) . '</li>'; ]) . '</li>';
$rightItems .= '<li>' . template::ico('cog-alt', [ $rightItems .= '<li>' . template::ico('cog-alt', [
'help' => 'Configuration', 'help' => 'Configuration',

View File

@ -68,7 +68,7 @@ class common
'sitemap', 'sitemap',
'theme', 'theme',
'user', 'user',
'translate', 'language',
'plugin' 'plugin'
]; ];
public static $accessList = [ public static $accessList = [
@ -77,7 +77,7 @@ class common
'config', 'config',
'edit', 'edit',
'config', 'config',
'translate' 'language'
]; ];
public static $accessExclude = [ public static $accessExclude = [
'login', 'login',

View File

@ -1008,9 +1008,10 @@ if ($this->getData(['core', 'dataVersion']) < 13000) {
mkdir(self::FILE_DIR . 'source/partage'); mkdir(self::FILE_DIR . 'source/partage');
} }
// Efface le script router.php // Efface le dossier translate
// if (file_exists('core/class/router.class.php')) if (is_dir('core/module/translate')) {
// unlink('core/class/router.class.php'); $this->removeDir('core/module/translate');
}
// Ajouter le prénom comme pseudo et le pseudo comme signature // Ajouter le prénom comme pseudo et le pseudo comme signature
foreach ($this->getData(['user']) as $userId => $userIds) { foreach ($this->getData(['user']) as $userId => $userIds) {

View File

@ -13,7 +13,7 @@
* @link http://zwiicms.fr/ * @link http://zwiicms.fr/
*/ */
class translate extends common class language extends common
{ {
public static $actions = [ public static $actions = [
@ -81,7 +81,7 @@ class translate extends common
) { ) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => false, 'state' => false,
'notification' => helper::translate('Action interdite') 'notification' => helper::translate('Action interdite')
]); ]);
@ -101,7 +101,7 @@ class translate extends common
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'notification' => $response ? helper::translate('Copie terminée avec succès') : 'Copie terminée avec des erreurs', 'notification' => $response ? helper::translate('Copie terminée avec succès') : 'Copie terminée avec des erreurs',
'state' => $response 'state' => $response
]); ]);
@ -328,7 +328,7 @@ class translate extends common
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'notification' => helper::translate('Modifications enregistrées'), 'notification' => helper::translate('Modifications enregistrées'),
'state' => true 'state' => true
]); ]);
@ -364,7 +364,7 @@ class translate extends common
) { ) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => false, 'state' => false,
'notification' => helper::translate('Action interdite') 'notification' => helper::translate('Action interdite')
]); ]);
@ -471,7 +471,7 @@ class translate extends common
) { ) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => false, 'state' => false,
'notification' => helper::translate('Action interdite') 'notification' => helper::translate('Action interdite')
]); ]);
@ -505,7 +505,7 @@ class translate extends common
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => helper::translate('Modifications enregistrées'), 'notification' => helper::translate('Modifications enregistrées'),
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => true, 'state' => true,
]); ]);
} }
@ -573,7 +573,7 @@ class translate extends common
) { ) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => false, 'state' => false,
'notification' => helper::translate('Action interdite') 'notification' => helper::translate('Action interdite')
]); ]);
@ -587,7 +587,7 @@ class translate extends common
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'), 'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'),
'state' => $success 'state' => $success
]); ]);
@ -603,7 +603,7 @@ class translate extends common
// Effacer la langue dans la base // Effacer la langue dans la base
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'), 'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'),
'state' => $success 'state' => $success
]); ]);
@ -636,7 +636,7 @@ class translate extends common
) { ) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => false, 'state' => false,
'notification' => helper::translate('Action interdite') 'notification' => helper::translate('Action interdite')
]); ]);
@ -652,7 +652,7 @@ class translate extends common
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => helper::translate('Modifications enregistrées'), 'notification' => helper::translate('Modifications enregistrées'),
'redirect' => helper::baseUrl() . 'translate', 'redirect' => helper::baseUrl() . 'language',
'state' => true, 'state' => true,
]); ]);
} }