Rename module gr_GR to el_GR

This commit is contained in:
Fred Tempez 2023-02-12 18:12:13 +01:00
parent 03bfbdd9a7
commit cf3fd7b832
8 changed files with 9 additions and 3 deletions

View File

@ -937,12 +937,19 @@ if ($this->getData(['core', 'dataVersion']) < 12204) {
unlink('core\module\install\ressource\i18n\gr_GR.json'); unlink('core\module\install\ressource\i18n\gr_GR.json');
} }
if (file_exists(self::I18N_DIR . 'gr_GR.json')) { if (file_exists(self::I18N_DIR . 'gr_GR.json')) {
copy(self::I18N_DIR . 'gr_GR.json', self::I18N_DIR . 'el_GR.json'); rename(self::I18N_DIR . 'gr_GR.json', self::I18N_DIR . 'el_GR.json');
unlink(self::I18N_DIR . 'gr_GR.json');
} }
$d = $this->getData(['languages', 'gr_GR']); $d = $this->getData(['languages', 'gr_GR']);
$this->setData(['languages', 'el_GR', $d]); $this->setData(['languages', 'el_GR', $d]);
$this->deleteData(['languages', 'gr_GR']); $this->deleteData(['languages', 'gr_GR']);
// Idem pour les modules
$moduleIds = ['blog', 'news', 'gallery', 'search', 'redirection', 'form'];
foreach($moduleIds as $key => $value) {
if (file_exists('module/' . $value . '/i18n/gr_GR.json' ))
{
rename ('module/' . $value . '/i18n/gr_GR.json', 'module/' . $value . '/i18n/el_GR.json');
}
}
// Mise à jour // Mise à jour
$this->setData(['core', 'dataVersion', 12204]); $this->setData(['core', 'dataVersion', 12204]);
} }

View File

@ -181,7 +181,6 @@ class translate extends common
foreach($installedUI as $key => $value) { foreach($installedUI as $key => $value) {
if ($store[$key]['version'] > $value['version']) { if ($store[$key]['version'] > $value['version']) {
echo copy('core/module/install/ressource/i18n/' . $key . '.json', self::I18N_DIR . $key . '.json');
$this->setData(['languages', $key, $store[$key]]); $this->setData(['languages', $key, $store[$key]]);
} }
} }