Installation langue de l'UI WIP
This commit is contained in:
parent
9a6d4f6911
commit
b8424ed6bd
|
@ -33,6 +33,48 @@ class install extends common {
|
||||||
|
|
||||||
public static $newVersion;
|
public static $newVersion;
|
||||||
|
|
||||||
|
// Fichiers des langues de l'interface
|
||||||
|
public static $i18nFiles = [];
|
||||||
|
public static $languagesUI = [
|
||||||
|
'az_AZ' => 'Azərbaycan dili',
|
||||||
|
'bg_BG' => 'български език',
|
||||||
|
'ca' => 'Català, valencià',
|
||||||
|
'cs' => 'čeština, český jazyk',
|
||||||
|
'da' => 'Dansk',
|
||||||
|
'de' => 'Deutsch',
|
||||||
|
'el_GR' => 'ελληνικά',
|
||||||
|
'en_EN' => 'English',
|
||||||
|
'es' => 'Español',
|
||||||
|
'fa' => 'فارسی',
|
||||||
|
'fr_FR' => 'Français',
|
||||||
|
'he_IL' => 'Hebrew (Israel)',
|
||||||
|
'hr' => 'Hrvatski jezik',
|
||||||
|
'hu_HU' => 'Magyar',
|
||||||
|
'id' => 'Bahasa Indonesia',
|
||||||
|
'it' => 'Italiano',
|
||||||
|
'ja' => '日本',
|
||||||
|
'lt' => 'Lietuvių kalba',
|
||||||
|
'mn_MN' => 'монгол',
|
||||||
|
'nb_NO' => 'Norsk bokmål',
|
||||||
|
'nn_NO' => 'Norsk nynorsk',
|
||||||
|
'nl' => 'Nederlands, Vlaams',
|
||||||
|
'pl' => 'Język polski, polszczyzna',
|
||||||
|
'pt_BR' => 'Português(Brazil)',
|
||||||
|
'pt_PT' => 'Português',
|
||||||
|
'ro' => 'Română',
|
||||||
|
'ru' => 'Pусский язык',
|
||||||
|
'sk' => 'Slovenčina',
|
||||||
|
'sl' => 'Slovenski jezik',
|
||||||
|
'sv_SE' => 'Svenska',
|
||||||
|
'th_TH' => 'ไทย',
|
||||||
|
'tr_TR' => 'Türkçe',
|
||||||
|
'uk_UA' => 'Yкраїнська мова',
|
||||||
|
'vi' => 'Tiếng Việt',
|
||||||
|
'zh_CN' => '中文 (Zhōngwén), 汉语, 漢語',
|
||||||
|
|
||||||
|
// source: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installation
|
* Installation
|
||||||
|
@ -162,6 +204,21 @@ class install extends common {
|
||||||
$dataThemes = json_decode($dataThemes, true);
|
$dataThemes = json_decode($dataThemes, true);
|
||||||
self::$themes = helper::arrayColumn($dataThemes, 'name');
|
self::$themes = helper::arrayColumn($dataThemes, 'name');
|
||||||
|
|
||||||
|
// Liste des langues UI disponibles
|
||||||
|
if (is_dir(self::I18N_DIR)) {
|
||||||
|
$dir = getcwd();
|
||||||
|
chdir(self::I18N_DIR);
|
||||||
|
$files = glob('*.json');
|
||||||
|
// Ajouter une clé au tableau avec le code de langue
|
||||||
|
foreach( $files as $file) {
|
||||||
|
// La langue est-elle référencée ?
|
||||||
|
if (array_key_exists(basename($file, '.json'), self::$languagesUI)) {
|
||||||
|
self::$i18nFiles[basename($file, '.json')] = self::$languagesUI[basename($file, '.json')];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
// Créer sitemap
|
// Créer sitemap
|
||||||
$this->createSitemap();
|
$this->createSitemap();
|
||||||
// Mise à jour de la liste des pages pour TinyMCE
|
// Mise à jour de la liste des pages pour TinyMCE
|
||||||
|
|
|
@ -2,102 +2,110 @@
|
||||||
<?php echo template::topic('Renseignez les champs ci-dessous pour finaliser l\'installation.'); ?>
|
<?php echo template::topic('Renseignez les champs ci-dessous pour finaliser l\'installation.'); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php echo template::formOpen('installForm'); ?>
|
<?php echo template::formOpen('installForm'); ?>
|
||||||
<ul class="accordion" data-speed="150">
|
<div class="installStep1">
|
||||||
<li class="accordion-item active">
|
<div class="row">
|
||||||
<h3 class="accordion-title">
|
<div class="col12">
|
||||||
<?php echo template::topic('Compte administrateur'); ?>
|
|
||||||
</h3>
|
|
||||||
<div class="accordion-content">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col12">
|
|
||||||
<?php echo template::text('installId', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Identifiant'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col6">
|
|
||||||
<?php echo template::password('installPassword', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Mot de passe'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col6">
|
|
||||||
<?php echo template::password('installConfirmPassword', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Confirmation'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php echo template::mail('installMail', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Adresse mail'
|
|
||||||
]); ?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col6">
|
|
||||||
<?php echo template::text('installFirstname', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Prénom'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
<div class="col6">
|
|
||||||
<?php echo template::text('installLastname', [
|
|
||||||
'autocomplete' => 'off',
|
|
||||||
'label' => 'Nom'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li class="accordion-item">
|
</div>
|
||||||
<h3 class="accordion-title">
|
<div class="installStep2">
|
||||||
<?php echo template::topic('Options avancées'); ?>
|
<ul class="accordion" data-speed="150">
|
||||||
</h3>
|
<li class="accordion-item active">
|
||||||
<div class="accordion-content">
|
<h3 class="accordion-title">
|
||||||
<div class="row">
|
<?php echo template::topic('Compte administrateur'); ?>
|
||||||
<div class="col12">
|
</h3>
|
||||||
<?php echo template::checkbox('installDefaultData',true , 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
|
<div class="accordion-content">
|
||||||
'checked' => false
|
<div class="row">
|
||||||
]);
|
<div class="col12">
|
||||||
?>
|
<?php echo template::text('installId', [
|
||||||
</div>
|
'autocomplete' => 'off',
|
||||||
</div>
|
'label' => 'Identifiant'
|
||||||
<div class="row">
|
|
||||||
<div class="col3">
|
|
||||||
<?php echo template::select('installProxyType', $module::$proxyType, [
|
|
||||||
'label' => 'Type de proxy',
|
|
||||||
'selected' => $this->getData(['config', 'proxyType'])
|
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col6">
|
|
||||||
<?php echo template::text('installProxyUrl', [
|
|
||||||
'label' => 'Adresse du proxy',
|
|
||||||
'placeholder' => 'cache.proxy.fr'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col3">
|
<div class="row">
|
||||||
<?php echo template::text('installProxyPort', [
|
<div class="col6">
|
||||||
'label' => 'Port du proxy',
|
<?php echo template::password('installPassword', [
|
||||||
'placeholder' => '6060'
|
'autocomplete' => 'off',
|
||||||
]); ?>
|
'label' => 'Mot de passe'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::password('installConfirmPassword', [
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'label' => 'Confirmation'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo template::mail('installMail', [
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'label' => 'Adresse mail'
|
||||||
|
]); ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::text('installFirstname', [
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'label' => 'Prénom'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::text('installLastname', [
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'label' => 'Nom'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
</li>
|
||||||
<div class="col12">
|
<li class="accordion-item">
|
||||||
<?php echo template::select('installTheme', $module::$themes, [
|
<h3 class="accordion-title">
|
||||||
'label' => 'Thème'
|
<?php echo template::topic('Options avancées'); ?>
|
||||||
]); ?>
|
</h3>
|
||||||
|
<div class="accordion-content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<?php echo template::checkbox('installDefaultData',true , 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
|
||||||
|
'checked' => false
|
||||||
|
]);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::select('installProxyType', $module::$proxyType, [
|
||||||
|
'label' => 'Type de proxy',
|
||||||
|
'selected' => $this->getData(['config', 'proxyType'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col6">
|
||||||
|
<?php echo template::text('installProxyUrl', [
|
||||||
|
'label' => 'Adresse du proxy',
|
||||||
|
'placeholder' => 'cache.proxy.fr'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::text('installProxyPort', [
|
||||||
|
'label' => 'Port du proxy',
|
||||||
|
'placeholder' => '6060'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col12">
|
||||||
|
<?php echo template::select('installTheme', $module::$themes, [
|
||||||
|
'label' => 'Thème'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col3 offset9">
|
||||||
|
<?php echo template::submit('installSubmit', [
|
||||||
|
'value' => 'Installer'
|
||||||
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col3 offset9">
|
|
||||||
<?php echo template::submit('installSubmit', [
|
|
||||||
'value' => 'Installer'
|
|
||||||
]); ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo template::formClose(); ?>
|
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue