bug translate copy et comment
This commit is contained in:
parent
77c13948fd
commit
c9899a7396
3
core/module/translate/ressource/comment.json
Normal file
3
core/module/translate/ressource/comment.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"comment": []
|
||||
}
|
@ -84,6 +84,7 @@ class translate extends common {
|
||||
$success = (copy (self::DATA_DIR . $copyFrom . '/module.json', self::DATA_DIR . $toCreate . '/module.json') === true && $success === true) ? true : false;
|
||||
$success = (copy (self::DATA_DIR . $copyFrom . '/page.json', self::DATA_DIR . $toCreate . '/page.json') === true && $success === true) ? true : false;
|
||||
$success = ($this->copyDir (self::DATA_DIR . $copyFrom . '/content', self::DATA_DIR . $toCreate . '/content') === true && $success === true) ? true : false;
|
||||
$success = (copy ('core/module/translate/ressource/comment.json', self::DATA_DIR . $toCreate . '/comment.json') === true && $success === true) ? true : false;
|
||||
// Enregistrer la langue
|
||||
if ($success) {
|
||||
$this->setData(['config', 'i18n', $toCreate, 'site' ]);
|
||||
@ -101,6 +102,7 @@ class translate extends common {
|
||||
$success = (copy (self::DATA_DIR . $copyFrom . '/locale.json', self::DATA_DIR . $toCreate . '/locale.json') === true && $success === true) ? true : false;
|
||||
$success = (copy ('core/module/translate/ressource/module.json', self::DATA_DIR . $toCreate . '/module.json') === true && $success === true) ? true : false;
|
||||
$success = (copy ('core/module/translate/ressource/page.json', self::DATA_DIR . $toCreate . '/page.json') === true && $success === true) ? true : false;
|
||||
$success = (copy ('core/module/translate/ressource/comment.json', self::DATA_DIR . $toCreate . '/comment.json') === true && $success === true) ? true : false;
|
||||
}
|
||||
// Si une page de même nom existe déjà elle sera écrasée
|
||||
// Si une page est de nom différent mais de position identique, elle sera ajoutée au menu dans le bon ordre
|
||||
@ -150,15 +152,15 @@ class translate extends common {
|
||||
}
|
||||
// Classement pages, sous-pages, pages orphelines, barres
|
||||
foreach($pagesList as $page => $pageId) {
|
||||
if ( $this->getData(['page',$page,'parentPageId']) === '' ) $pagesList[$page][$type] = 'page';
|
||||
if ( $this->getData(['page',$page,'parentPageId']) !== '' ) $pagesList[$page][$type] = 'sous-page';
|
||||
if ( $this->getData(['page',$page,'position']) === 0 ) $pagesList[$page][$type] = 'page orpheline';
|
||||
if ( $this->getData(['page',$page,'block']) === 'bar' ) $pagesList[$page][$type] = 'barre';
|
||||
if ( $this->getData(['page',$page,'parentPageId']) === '' ) $pagesList[$page]['type'] = 'page';
|
||||
if ( $this->getData(['page',$page,'parentPageId']) !== '' ) $pagesList[$page]['type'] = 'sous-page';
|
||||
if ( $this->getData(['page',$page,'position']) === 0 ) $pagesList[$page]['type'] = 'page orpheline';
|
||||
if ( $this->getData(['page',$page,'block']) === 'bar' ) $pagesList[$page]['type'] = 'barre';
|
||||
}
|
||||
//Affichage des pages et mémorisation dans le tableau de sortie self::$pagesList
|
||||
// Type de page : titre court ( titre - identifiant )
|
||||
foreach($pagesList as $page => $pageId) {
|
||||
switch ($pagesList[$page][$type]){
|
||||
switch ($pagesList[$page]['type']){
|
||||
case 'page' :
|
||||
self::$pagesList[$page]= $text['core_translate']['copy'][8].$this->getData(['page',$page,'shortTitle']).' ( '. $this->getData(['page',$page,'title']).' - '.$page.' )';
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user