forked from ZwiiCMS-Team/ZwiiCMS
Sélecteur de copie de langues plus souple
This commit is contained in:
parent
606cd9de62
commit
82a42d8daf
@ -1591,11 +1591,29 @@ class common {
|
||||
|
||||
$this->setData(['core', 'dataVersion', 10400]);
|
||||
|
||||
/**
|
||||
* mettre à jour defaultdata
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
// Version 11.0.00
|
||||
if ($this->getData(['core', 'dataVersion']) < 11000) {
|
||||
// Mettre à jour les données de langue
|
||||
$this->setData(['config','translate','scriptGoogle', false ]);
|
||||
$this->setData(['config','translate','showCredits', false ]);
|
||||
$this->setData(['config','translate','autoDetect', false ]);
|
||||
$this->setData(['config','translate','admin', false ]);
|
||||
$this->setData(['config','translate','fr', false ]);
|
||||
$this->setData(['config','translate','de', false ]);
|
||||
$this->setData(['config','translate','en', false ]);
|
||||
$this->setData(['config','translate','es', false ]);
|
||||
$this->setData(['config','translate','it', false ]);
|
||||
$this->setData(['config','translate','nl', false ]);
|
||||
$this->setData(['config','translate','pt', false ]);
|
||||
|
||||
$this->setData(['core', 'dataVersion', 11000]);
|
||||
}
|
||||
|
||||
/**
|
||||
* mettre à jour defaultdata
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class init extends common {
|
||||
],
|
||||
],
|
||||
'core' => [
|
||||
'dataVersion' => 10400,
|
||||
'dataVersion' => 11000,
|
||||
'lastBackup' => 0,
|
||||
'lastClearTmp' => 0,
|
||||
'lastAutoUpdate' => 0,
|
||||
@ -98,6 +98,19 @@ class init extends common {
|
||||
],
|
||||
'module' => [],
|
||||
'user' => [],
|
||||
'translate' => [
|
||||
'scriptGoogle' => false,
|
||||
'showCredits' => false,
|
||||
'autoDetect' => false,
|
||||
'admin' => false,
|
||||
'fr' => 'none',
|
||||
'de' => 'none',
|
||||
'en' => 'none',
|
||||
'es' => 'none',
|
||||
'it' => 'none',
|
||||
'nl' => 'none',
|
||||
'pt' => 'none'
|
||||
],
|
||||
'theme' => [
|
||||
'body' => [
|
||||
'backgroundColor' => 'rgba(236, 239, 241, 1)',
|
||||
|
@ -24,9 +24,7 @@ class translate extends common {
|
||||
public static $translateOptions = [];
|
||||
|
||||
// Liste des langues installées
|
||||
public static $languagesInstalled = [
|
||||
'fr' => 'Français (fr)',
|
||||
];
|
||||
public static $languagesInstalled = [];
|
||||
// Liste des langues cibles
|
||||
public static $languagesTarget = [];
|
||||
|
||||
@ -69,11 +67,11 @@ class translate extends common {
|
||||
// Tableau des langues installées
|
||||
foreach (self::$i18nList as $key => $value) {
|
||||
if ($this->getData(['config','translate',$key]) === 'site') {
|
||||
self::$languagesInstalled[$key] = $value;
|
||||
self::$languagesTarget[$key] = $value;
|
||||
}
|
||||
}
|
||||
// Tableau des langues cibles
|
||||
self::$languagesTarget = array_diff (self::$i18nList,self::$languagesInstalled);
|
||||
// Langues cibles fr en plus
|
||||
self::$languagesInstalled = array_merge(['fr' => 'Français (fr)'],self::$languagesTarget);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
Loading…
Reference in New Issue
Block a user