updating dynamic simleys shortcode translations

This commit is contained in:
Antoine M 2024-08-19 16:59:45 +02:00
parent 6aacf5334a
commit 721256233b
2 changed files with 12 additions and 5 deletions

View File

@ -69,9 +69,16 @@ function homegrade_enqueue_scripts()
$main_app_js_dynamic_datas = array(
'yes' => __('Oui', 'homegrade-theme__texte-fonctionnel'),
'no' => __('Non', 'homegrade-theme__texte-fonctionnel'),
'neutral' => __('Neutre', 'homegrade-theme__texte-fonctionnel'),
'deleteFilter' => __('Supprimer le filtre', 'homegrade-theme__texte-fonctionnel'),
'template_directory_uri' => get_template_directory_uri(),
'current_thematique' => get_the_terms(get_the_ID(), 'thematiques')[0] ?? null,
'privilegier' => __('À privilégier', 'homegrade-theme__texte-fonctionnel'),
'prudence' => __('Prudence', 'homegrade-theme__texte-fonctionnel'),
'ecarter' => __('À écarter', 'homegrade-theme__texte-fonctionnel'),
);
wp_localize_script('main-app-js', 'mainAppJsDynamicDatas', $main_app_js_dynamic_datas);

View File

@ -27,31 +27,31 @@ function handleEditorShortCodes() {
'\\(\\(x\\)\\)': `
<img class="homegrade-shortcode-icon homegrade-shortcode-icon--crossed"
src="${mainAppJsDynamicDatas.template_directory_uri}/resources/img/graphic-assets/table-cell--cross.svg"
alt="Alternative"/>
alt="${mainAppJsDynamicDatas.no}"/>
`,
// ((-))
'\\(\\(-\\)\\)': `
<img class="homegrade-shortcode-icon homegrade-shortcode-icon--dashed"
src="${mainAppJsDynamicDatas.template_directory_uri}/resources/img/graphic-assets/table-cell--dash.svg"
alt="Alternative"/>
alt="${mainAppJsDynamicDatas.neutral}"/>
`,
// (:-))
'\\(:-\\)\\)': `
<img class="homegrade-shortcode-icon homegrade-shortcode-icon--smiley homegrade-shortcode-icon--smiley-good"
src="${mainAppJsDynamicDatas.template_directory_uri}/resources/img/graphic-assets/homegrade_smiley-pratique-bonne.svg"
alt="Possible"/>
alt="${mainAppJsDynamicDatas.privilegier}"/>
`,
// (:-|)
'\\(:-\\|\\)': `
<img class="homegrade-shortcode-icon homegrade-shortcode-icon--smiley homegrade-shortcode-icon--smiley-neutral"
src="${mainAppJsDynamicDatas.template_directory_uri}/resources/img/graphic-assets/homegrade_smiley-pratique-intermediaire.svg"
alt="Alternative"/>
alt="${mainAppJsDynamicDatas.prudence}"/>
`,
// (:-()
'\\(:-\\(\\)': `
<img class="homegrade-shortcode-icon homegrade-shortcode-icon--smiley homegrade-shortcode-icon--smiley-bad"
src="${mainAppJsDynamicDatas.template_directory_uri}/resources/img/graphic-assets/homegrade_smiley-pratique-mauvaise.svg"
alt="Alternative"/>
alt="${mainAppJsDynamicDatas.ecarter}"/>
`,
};