Traduction RFM dans la langue de l'interface

This commit is contained in:
Fred Tempez 2022-10-23 17:27:57 +02:00
parent d752ed4784
commit ef984055f1
17 changed files with 206 additions and 190 deletions

View File

@ -310,7 +310,8 @@ class template
'maxlength' => '500', 'maxlength' => '500',
'name' => $nameId, 'name' => $nameId,
'type' => 2, 'type' => 2,
'value' => '' 'value' => '',
'language' => 'fr_FR'
], $attributes); ], $attributes);
// Traduction de l'aide et de l'étiquette // Traduction de l'aide et de l'étiquette
$attributes['value'] = helper::translate($attributes['value']); $attributes['value'] = helper::translate($attributes['value']);
@ -348,6 +349,7 @@ class template
href="' . href="' .
helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' .
'?relative_url=1' . '?relative_url=1' .
'&lang=' . $attributes['language'] .
'&field_id=' . $attributes['id'] . '&field_id=' . $attributes['id'] .
'&type=' . $attributes['type'] . '&type=' . $attributes['type'] .
'&akey=' . md5_file(core::DATA_DIR . 'core.json') . '&akey=' . md5_file(core::DATA_DIR . 'core.json') .

View File

@ -27,7 +27,7 @@
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
<em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em> <em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em>
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,6 +26,7 @@
<div class="row"> <div class="row">
<?php echo template::file('configRestoreImportFile', [ <?php echo template::file('configRestoreImportFile', [
'label' => 'Sélectionnez une archive au format ZIP', 'label' => 'Sélectionnez une archive au format ZIP',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 2, 'type' => 2,
'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.' 'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.'
]); ?> ]); ?>

View File

@ -13,6 +13,7 @@
<div class="col4"> <div class="col4">
<?php echo template::file('configFavicon', [ <?php echo template::file('configFavicon', [
'type' => 1, 'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon', 'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon']) 'value' => $this->getData(['config', 'favicon'])
@ -21,6 +22,7 @@
<div class="col4"> <div class="col4">
<?php echo template::file('configFaviconDark', [ <?php echo template::file('configFaviconDark', [
'type' => 1, 'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre', 'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark']) 'value' => $this->getData(['config', 'faviconDark'])

View File

@ -192,6 +192,7 @@
<div class="col9"> <div class="col9">
<?php echo template::file('pageIconUrl', [ <?php echo template::file('pageIconUrl', [
'help' => 'Sélectionnez une image ou une icône de petite dimension', 'help' => 'Sélectionnez une image ou une icône de petite dimension',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Icône', 'label' => 'Icône',
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
]); ?> ]); ?>

View File

@ -21,6 +21,7 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::file('pluginImportFile', [ <?php echo template::file('pluginImportFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Archive ZIP', 'label' => 'Archive ZIP',
'type' => 2 'type' => 2
]); ?> ]); ?>

View File

@ -31,6 +31,7 @@
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('configModulesInstallation', [ <?php echo template::file('configModulesInstallation', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Archive ZIP :', 'label' => 'Archive ZIP :',
'type' => 2 'type' => 2
]); ?> ]); ?>

View File

@ -65,6 +65,7 @@
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : ""; $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
echo template::file('themeBodyImage', [ echo template::file('themeBodyImage', [
'help' => 'Sélectionner une image', 'help' => 'Sélectionner une image',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Arrière plan', 'label' => 'Arrière plan',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile

View File

@ -66,6 +66,7 @@
<div class="row" id="containerFontAddFile"> <div class="row" id="containerFontAddFile">
<div class="col12"> <div class="col12">
<?php echo template::file('fontAddFile', [ <?php echo template::file('fontAddFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Fichier de fonte (Format WOFF)' 'label' => 'Fichier de fonte (Format WOFF)'
]); ?> ]); ?>
</div> </div>

View File

@ -68,6 +68,7 @@
<div class="col12"> <div class="col12">
<?php echo template::file('fontEditFile', [ <?php echo template::file('fontEditFile', [
'label' => 'Fichier de fonte (Format WOFF)', 'label' => 'Fichier de fonte (Format WOFF)',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'value' => $this->getUrl(2) === 'files' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : '' 'value' => $this->getUrl(2) === 'files' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : ''
]); ?> ]); ?>
</div> </div>

View File

@ -154,14 +154,14 @@
</h4> </h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php <?php $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'header', 'image'])) ? $this->getData(['theme', 'header', 'image']) : ""; ?>
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'header', 'image'])) ? <?php echo template::file('themeHeaderImage', [
$this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [
'label' => 'Image', 'label' => 'Image',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]);
?>
<span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo"> <span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo">
<?php echo helper::translate('Largeur de l\'image :'); ?> <span id="themeHeaderImageWidth"></span> ( <?php echo helper::translate('largeur de site :'); ?> <?php echo $this->getData(['theme', 'site', 'width']); ?>) <?php echo helper::translate('Largeur de l\'image :'); ?> <span id="themeHeaderImageWidth"></span> ( <?php echo helper::translate('largeur de site :'); ?> <?php echo $this->getData(['theme', 'site', 'width']); ?>)
- -

View File

@ -29,6 +29,7 @@
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('themeManageImport', [ <?php echo template::file('themeManageImport', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Archive ZIP :', 'label' => 'Archive ZIP :',
'type' => 2 'type' => 2
]); ?> ]); ?>
@ -41,7 +42,7 @@
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Sauvegarde du thème dans le'); ?> <h4><?php echo helper::translate('Sauvegarde du thème dans le'); ?>
<a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>" data-lity> <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json');?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>
<?php echo helper::translate('gestionnaire de fichiers'); ?> <?php echo helper::translate('gestionnaire de fichiers'); ?>
</a> </a>
</h4> </h4>

View File

@ -108,15 +108,15 @@
</div> </div>
<div class="row"> <div class="row">
<div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone'; ?>"> <div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone'; ?>">
<?php <?php $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo'])) ? $this->getData(['theme', 'menu', 'burgerLogo']) : ""; ?>
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo'])) ? <?php echo template::file('themeMenuBurgerLogo', [
$this->getData(['theme', 'menu', 'burgerLogo']) : "";
echo template::file('themeMenuBurgerLogo', [
'help' => 'Sélectionner une image de dimensions adaptées', 'help' => 'Sélectionner une image de dimensions adaptées',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo du menu burger', 'label' => 'Logo du menu burger',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]);
?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -30,6 +30,7 @@
<div class="row"> <div class="row">
<div class="col10"> <div class="col10">
<?php echo template::file('userImportCSVFile', [ <?php echo template::file('userImportCSVFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Liste d\'utilisateurs :' 'label' => 'Liste d\'utilisateurs :'
]); ?> ]); ?>
</div> </div>

View File

@ -42,6 +42,7 @@
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::file('blogAddPicture', [ <?php echo template::file('blogAddPicture', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.', 'help' => 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.',
'label' => 'Image de couverture', 'label' => 'Image de couverture',
'type' => 1 'type' => 1

View File

@ -44,6 +44,7 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::file('blogEditPicture', [ <?php echo template::file('blogEditPicture', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '', 'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '',
'label' => 'Image de couverture', 'label' => 'Image de couverture',
'type' => 1, 'type' => 1,

View File

@ -1,5 +1,5 @@
<?php echo template::formOpen('formOptionForm'); ?> <?php echo template::formOpen('formOptionForm'); ?>
<div class="row"> <div class="row">
<div class="col1"> <div class="col1">
<?php echo template::button('formOptionBack', [ <?php echo template::button('formOptionBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
@ -10,8 +10,8 @@
<div class="col2 offset9"> <div class="col2 offset9">
<?php echo template::submit('formOptionSubmit'); ?> <?php echo template::submit('formOptionSubmit'); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>Validation du formulaire</h4> <h4>Validation du formulaire</h4>
@ -45,8 +45,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>Gabarit</h4> <h4>Gabarit</h4>
@ -74,8 +74,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>Courriel</h4> <h4>Courriel</h4>
@ -110,7 +110,7 @@
<div class="col4"> <div class="col4">
<?php echo template::select('formOptionUser', $module::$listUsers, [ <?php echo template::select('formOptionUser', $module::$listUsers, [
'label' => 'A un membre', 'label' => 'A un membre',
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']),$module::$listUsers) 'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), $module::$listUsers)
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -131,6 +131,7 @@
<div class="col4"> <div class="col4">
<?php echo template::file('formOptionLogo', [ <?php echo template::file('formOptionLogo', [
'help' => 'Sélectionnez le logo du site', 'help' => 'Sélectionnez le logo du site',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo', 'label' => 'Logo',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl']) 'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl'])
]); ?> ]); ?>
@ -153,5 +154,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>