forked from ZwiiCMS-Team/ZwiiCMS
File manager dans la langue de l'UI + variable default devient interface
This commit is contained in:
parent
25f74054ff
commit
75fc5a8233
@ -306,7 +306,7 @@ class common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Langue de l'administration
|
// Langue de l'administration
|
||||||
self::$i18n = $this->getData(['config', 'i18n', 'default']);
|
self::$i18n = $this->getData(['config', 'i18n', 'interface']);
|
||||||
// La langue par défaut du contenu est celle du site si le cookie est absent.
|
// La langue par défaut du contenu est celle du site si le cookie est absent.
|
||||||
self::$i18n = (empty(self::$i18n) || is_null(self::$i18n)) ? self::$i18n = 'fr' : self::$i18n ;
|
self::$i18n = (empty(self::$i18n) || is_null(self::$i18n)) ? self::$i18n = 'fr' : self::$i18n ;
|
||||||
|
|
||||||
@ -1466,7 +1466,7 @@ class common {
|
|||||||
$this->getData(['user', $this->getUser('id') , 'files']) === true
|
$this->getData(['user', $this->getUser('id') , 'files']) === true
|
||||||
) {
|
) {
|
||||||
$items .= '<wbr>' . template::ico('folder', [
|
$items .= '<wbr>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json'),
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']),
|
||||||
'margin' => 'all',
|
'margin' => 'all',
|
||||||
'attr' => 'data-lity',
|
'attr' => 'data-lity',
|
||||||
'help' => 'Fichiers du site'
|
'help' => 'Fichiers du site'
|
||||||
@ -1595,7 +1595,7 @@ class common {
|
|||||||
$this->getData(['user', $this->getUser('id') , 'files']) === true
|
$this->getData(['user', $this->getUser('id') , 'files']) === true
|
||||||
) {
|
) {
|
||||||
$itemsRight .= '<li>' . template::ico('folder', [
|
$itemsRight .= '<li>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json'),
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']),
|
||||||
'attr' => 'data-lity',
|
'attr' => 'data-lity',
|
||||||
'help' => 'Fichiers du site'
|
'help' => 'Fichiers du site'
|
||||||
]). '</li>';
|
]). '</li>';
|
||||||
@ -2021,7 +2021,7 @@ class common {
|
|||||||
// Items de droite
|
// Items de droite
|
||||||
$rightItems = '';
|
$rightItems = '';
|
||||||
if($this->getUser('group') >= self::GROUP_MODERATOR) {
|
if($this->getUser('group') >= self::GROUP_MODERATOR) {
|
||||||
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
|
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']) . '" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
|
||||||
}
|
}
|
||||||
if($this->getUser('group') >= self::GROUP_ADMIN) {
|
if($this->getUser('group') >= self::GROUP_ADMIN) {
|
||||||
$rightItems .= '<li>' . template::ico('brush', [
|
$rightItems .= '<li>' . template::ico('brush', [
|
||||||
|
@ -894,7 +894,7 @@ if ($this->getData(['core', 'dataVersion']) < 11600) {
|
|||||||
unlink('core/vendor/i18n/translation.js');
|
unlink('core/vendor/i18n/translation.js');
|
||||||
}
|
}
|
||||||
// Langue de l'interface
|
// Langue de l'interface
|
||||||
$this->setData(['config', 'i18n', 'default', 'fr']);
|
$this->setData(['config', 'i18n', 'interface', 'fr']);
|
||||||
|
|
||||||
// Mise à jour
|
// Mise à jour
|
||||||
$this->setData(['core', 'dataVersion', 11600]);
|
$this->setData(['core', 'dataVersion', 11600]);
|
||||||
|
@ -495,7 +495,7 @@ class config extends common {
|
|||||||
'redirectLogin' => $this->getInput('connectRedirectLogin',helper::FILTER_BOOLEAN)
|
'redirectLogin' => $this->getInput('connectRedirectLogin',helper::FILTER_BOOLEAN)
|
||||||
],
|
],
|
||||||
'i18n' => [
|
'i18n' => [
|
||||||
'default' => $this->getData(['config', 'i18n', 'default']),
|
'interface' => $this->getData(['config', 'i18n', 'default']),
|
||||||
'fr' => $this->getData(['config', 'i18n', 'fr']),
|
'fr' => $this->getData(['config', 'i18n', 'fr']),
|
||||||
'de' => $this->getData(['config', 'i18n', 'de']),
|
'de' => $this->getData(['config', 'i18n', 'de']),
|
||||||
'en' => $this->getData(['config', 'i18n', 'en']),
|
'en' => $this->getData(['config', 'i18n', 'en']),
|
||||||
|
@ -42,7 +42,7 @@ class init extends common {
|
|||||||
'redirectLogin' => true
|
'redirectLogin' => true
|
||||||
],
|
],
|
||||||
'i18n' => [
|
'i18n' => [
|
||||||
'default' => 'fr',
|
'interface' => 'fr',
|
||||||
'fr'=> 'none',
|
'fr'=> 'none',
|
||||||
'de'=> 'none',
|
'de'=> 'none',
|
||||||
'en'=> 'none',
|
'en'=> 'none',
|
||||||
|
@ -218,7 +218,7 @@ class translate extends common {
|
|||||||
]);
|
]);
|
||||||
// Sauvegarder les langues de contenu
|
// Sauvegarder les langues de contenu
|
||||||
$this->setData(['config', 'i18n', [
|
$this->setData(['config', 'i18n', [
|
||||||
'default' => $this->getInput('translateI18n'),
|
'interface' => $this->getInput('translateI18n'),
|
||||||
'fr' => $this->getInput('translateFR'),
|
'fr' => $this->getInput('translateFR'),
|
||||||
'de' => $this->getInput('translateDE'),
|
'de' => $this->getInput('translateDE'),
|
||||||
'en' => $this->getInput('translateEN'),
|
'en' => $this->getInput('translateEN'),
|
||||||
|
@ -46,13 +46,13 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<div class="block" id="flagsWrapper">
|
<div class="block" id="flagsWrapper">
|
||||||
<h4>
|
<h4>
|
||||||
<?php echo template::topic('Interface de Zwii'); ?>
|
<?php echo template::topic('Interface'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset4">
|
<div class="col4 offset4">
|
||||||
<?php echo template::select('translateI18n', $module::$i18nFiles, [
|
<?php echo template::select('translateI18n', $module::$i18nFiles, [
|
||||||
'label' => 'Traductions installées',
|
'label' => 'Traductions installées',
|
||||||
'selected' => $this->getData(['config', 'i18n' , 'default']),
|
'selected' => $this->getData(['config', 'i18n' , 'interface']),
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
11
core/vendor/filemanager/config/config.php
vendored
11
core/vendor/filemanager/config/config.php
vendored
@ -11,12 +11,15 @@ if (function_exists('mb_regex_encoding')) {
|
|||||||
}
|
}
|
||||||
ob_start('mb_output_handler');
|
ob_start('mb_output_handler');
|
||||||
date_default_timezone_set('Europe/Paris');
|
date_default_timezone_set('Europe/Paris');
|
||||||
setlocale(LC_CTYPE, 'fr_FR'); //correct transliteration
|
|
||||||
|
// Lire la langue installée
|
||||||
|
$tab = json_decode(file_get_contents('../../../site/data/config.json'), true);
|
||||||
|
$lang = $tab['config']['i18n']['interface'];
|
||||||
|
setlocale(LC_CTYPE, $lang); //correct transliteration
|
||||||
|
|
||||||
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
|
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
|
||||||
$userId = $_COOKIE['ZWII_USER_ID'];
|
$userId = $_COOKIE['ZWII_USER_ID'];
|
||||||
$json = file_get_contents('../../../site/data/user.json');
|
$tab = json_decode(file_get_contents('../../../site/data/user.json'), true);
|
||||||
$tab = json_decode($json, true);
|
|
||||||
$group = $tab['user'][$userId]['group'];
|
$group = $tab['user'][$userId]['group'];
|
||||||
$uploadDir = '/site/file/source/';
|
$uploadDir = '/site/file/source/';
|
||||||
$currentPath = '../../../site/file/source/';
|
$currentPath = '../../../site/file/source/';
|
||||||
@ -300,7 +303,7 @@ $config = array(
|
|||||||
| default language file name
|
| default language file name
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
'default_language' => "fr_FR",
|
'default_language' => 'fr_FR',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -328,7 +328,7 @@
|
|||||||
"Interface": "",
|
"Interface": "",
|
||||||
"Contenu du site": "",
|
"Contenu du site": "",
|
||||||
"Traductions installées": "",
|
"Traductions installées": "",
|
||||||
"Interface de Zwii": "",
|
"Interface": "",
|
||||||
"Paramétres": "",
|
"Paramétres": "",
|
||||||
"Maintenance": "",
|
"Maintenance": "",
|
||||||
"Scripts externes": "",
|
"Scripts externes": "",
|
||||||
|
@ -328,7 +328,7 @@
|
|||||||
"Interface": "",
|
"Interface": "",
|
||||||
"Contenu du site": "",
|
"Contenu du site": "",
|
||||||
"Traductions installées": "",
|
"Traductions installées": "",
|
||||||
"Interface de Zwii": "",
|
"Interface": "",
|
||||||
"Paramétres": "",
|
"Paramétres": "",
|
||||||
"Maintenance": "",
|
"Maintenance": "",
|
||||||
"Scripts externes": "",
|
"Scripts externes": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user