updating plugin and blocks translation namespace

This commit is contained in:
Antoine M 2023-11-23 16:33:00 +01:00
parent 4202c94e21
commit 8503426077
28 changed files with 64 additions and 89 deletions

View File

@ -33,7 +33,7 @@ export default function ImagePanelBody({ imageUrl, imageAlt, imageId, imagePropo
<>
<PanelBody
className='homegrade-blocks-components-image__panel-body'
title={__("Image", "homegrade-blocks__texte-backoffice")}>
title={__("Image", "homegrade-blocks")}>
{imageUrl && <img src={imageUrl} alt={imageAlt} />}
<div className='media-replace-container'>
<MediaReplaceFlow
@ -44,8 +44,8 @@ export default function ImagePanelBody({ imageUrl, imageAlt, imageId, imagePropo
onSelect={setImageAttributes}
name={
!imageUrl
? __("Ajouter", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{imageUrl && (

View File

@ -38,8 +38,8 @@ export default function ImagePanelBody({ imageUrl, imageAlt, imageId, imagePropo
onSelect={setImageAttributes}
name={
!imageUrl
? __("Ajouter", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{imageUrl && (

View File

@ -135,9 +135,7 @@ export default function OptionsSelectControl({
return (
<InspectorControls>
<PanelBody
title={__("Conseils Relié", "homegrade-blocks__texte-fonctionnel")}
>
<PanelBody title={__("Conseils Relié", "homegrade-blocks")}>
{/* <SelectControl
label={panelTitle}
value={chapterLinkRelatedPostId}

View File

@ -49,7 +49,7 @@ export default function OptionsSelectControl({
<InspectorControls>
<PanelBody
className="related-conseil-panel-body"
title={__("Page de lien de ce Chapitre ", "homegrade-blocks__texte-fonctionnel")}
title={__("Page de lien de ce Chapitre ", "homegrade-blocks")}
>
<LinkControl
value={chapterLinkRelatedPost}

View File

@ -33,7 +33,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
className="related-conseil-panel-body"
title={__(
"Page de lien de ce Chapitre ",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks"
)}
>
<LinkControl
@ -52,7 +52,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
className="homegrade-blocks-lien-chapitre__title"
placeholder={__(
"Titre du chapitre",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks"
)}
value={chapterLinkTitle}
onChange={onChangeChapterLinkTitle}
@ -62,7 +62,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
className="homegrade-blocks-lien-chapitre__description"
placeholder={__(
"Descriptif du chapitre",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks"
)}
value={chapterLinkDescription}
onChange={onChangeChapterLinkDescription}

View File

@ -10,7 +10,7 @@
"supports": {
"html": false
},
"textdomain": "homegrade-blocks__texte-fonctionnel",
"textdomain": "homegrade-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",

View File

@ -10,7 +10,7 @@
"supports": {
"html": false
},
"textdomain": "homegrade-blocks__texte-fonctionnel",
"textdomain": "homegrade-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",

View File

@ -39,10 +39,7 @@ export default function Edit() {
[
"homegrade-content-blocks/section-titling",
{
sectionTitle: __(
"Communiqués de presse",
"homegrade-blocks__texte-fonctionnel"
),
sectionTitle: __("Communiqués de presse", "homegrade-blocks"),
},
],
]}

View File

@ -56,7 +56,7 @@ export default function Edit({
<>
<InspectorControls>
<PanelBody
title={__("Icone", "homegrade-blocks__texte-backoffice")}
title={__("Icone", "homegrade-blocks")}
initialOpen={true}
>
<ToggleControl
@ -131,7 +131,7 @@ export default function Edit({
disableLineBreaks
placeholder={__(
"Insérez votre titre ici",
"homegrade-blocks__texte-backoffice"
"homegrade-blocks"
)}
allowedFormats={["homegrade-format/tooltip"]}
tagName={headingLevel}

View File

@ -113,7 +113,7 @@ export default function Edit({ attributes, setAttributes }) {
<InspectorControls>
<PanelBody
className="homegrade-blocks-content-page-header__panel-cta"
title={__("Titre du bloc", "homegrade-blocks__texte-backoffice")}
title={__("Titre du bloc", "homegrade-blocks")}
>
<ToggleControl
label="Titre automatique"
@ -128,10 +128,7 @@ export default function Edit({ attributes, setAttributes }) {
</PanelBody>
<PanelBody
className="homegrade-blocks-components-image__panel-body"
title={__(
"Image d'accompagnement",
"homegrade-blocks__texte-backoffice"
)}
title={__("Image d'accompagnement", "homegrade-blocks")}
>
<ToggleControl
label="Couverture automatique"
@ -158,9 +155,9 @@ export default function Edit({ attributes, setAttributes }) {
!imageUrl
? __(
"Ajouter votre image manuellement",
"homegrade-blocks__texte-backoffice"
"homegrade-blocks"
)
: __("Remplacer", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks")
}
/>
{imageUrl && (
@ -181,7 +178,7 @@ export default function Edit({ attributes, setAttributes }) {
<PanelBody
className="homegrade-blocks-content-page-header__panel-cta"
title={__("Call to action", "homegrade-blocks__texte-backoffice")}
title={__("Call to action", "homegrade-blocks")}
>
<ToggleControl
label="Afficher un call to action"
@ -198,10 +195,7 @@ export default function Edit({ attributes, setAttributes }) {
/>
<LinkControl
label="Lien du cta"
title={__(
"Call to action",
"homegrade-blocks__texte-backoffice"
)}
title={__("Call to action", "homegrade-blocks")}
value={cta}
onChange={onChangeCTA}
/>

View File

@ -208,7 +208,7 @@ function Edit({
>
{__(
"Version texte des indications de l'illustration",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks"
)}
{/* <ChevronDown /> */}
<img src={chevronDown} alt="" />

View File

@ -125,7 +125,7 @@ export default function Edit({ attributes, setAttributes }) {
{hasLogo && (
<PanelBody
className="homegrade-blocks-highlight__panel-body"
title={__("Logo", "homegrade-blocks__texte-backoffice")}
title={__("Logo", "homegrade-blocks")}
>
{logoUrl && <img src={logoUrl} alt={logoAlt} />}
@ -138,11 +138,8 @@ export default function Edit({ attributes, setAttributes }) {
onSelect={setLogoAttributes}
name={
!logoUrl
? __(
"Ajouter un Logo",
"homegrade-blocks__texte-backoffice"
)
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter un Logo", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{logoUrl && (
@ -238,8 +235,8 @@ export default function Edit({ attributes, setAttributes }) {
onSelect={setLogoAttributes}
name={
!logoUrl
? __("Ajouter Logo", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter Logo", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
)}

View File

@ -40,14 +40,14 @@ export default function Edit({ attributes, setAttributes }) {
<InspectorControls>
<PanelBody
className="homegrade-blocks-components-image__panel-body homegrade-blocks-components-icon__panel-body"
title={__("Icone", "homegrade-blocks__texte-backoffice")}
title={__("Icone", "homegrade-blocks")}
>
{iconUrl && (
<img className="icon-preview" src={iconUrl} alt={iconAlt} />
)}
<div className="media-replace-container">
<MediaReplaceFlow
label={__("Source", "homegrade-blocks__texte-backoffice")}
label={__("Source", "homegrade-blocks")}
mediaId={iconId}
mediaUrl={iconUrl}
allowedTypes={["image"]}
@ -55,8 +55,8 @@ export default function Edit({ attributes, setAttributes }) {
onSelect={setIconAttributes}
name={
!iconUrl
? __("Ajouter", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{iconUrl && (
@ -74,7 +74,7 @@ export default function Edit({ attributes, setAttributes }) {
<PanelRow>
<ToggleControl
label={__("Ombre", "homegrade-blocks__texte-backoffice")}
label={__("Ombre", "homegrade-blocks")}
checked={hasShadow}
onChange={onHasShadowChange}
/>

View File

@ -25,9 +25,9 @@ if (!function_exists('getRessourceIcon')) {
<ul class="homegrade-blocks-kit-presse__press-grid-datas">
<div class="table_head">
<p><?php echo __("Fichier", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Format", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Mise à jour", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Fichier", "homegrade-blocks") ?></p>
<p><?php echo __("Format", "hhomegrade-blocks") ?></p>
<p><?php echo __("Mise à jour", "homegrade-blocks") ?></p>
</div>
<?php foreach ($press_kit_datas as $data) : ?>
<?php

View File

@ -25,9 +25,9 @@ if (!function_exists('getRessourceIcon')) {
<ul class="homegrade-blocks-kit-presse__press-grid-datas">
<div class="table_head">
<p><?php echo __("Fichier", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Format", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Mise à jour", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Fichier", "homegrade-blocks") ?></p>
<p><?php echo __("Format", "homegrade-blocks") ?></p>
<p><?php echo __("Mise à jour", "homegrade-blocks") ?></p>
</div>
<?php foreach ($press_kit_datas as $data) : ?>
<?php

View File

@ -65,8 +65,8 @@ export default function Edit({ attributes, setAttributes, ...props }) {
onSelect={setIllustrationAttributes}
name={
!illustrationUrl
? __("Ajouter", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{illustrationUrl && (

View File

@ -20,8 +20,8 @@ $offresEmplois = new WP_Query($args);
<ul class="homegrade-blocks-offres-emplois__offres-grid-datas">
<div class="table_head">
<p><?php echo __("Poste", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Offre", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Poste", "homegrade-blocks") ?></p>
<p><?php echo __("Offre", "homegrade-blocks") ?></p>
</div>
<?php foreach ($offresEmplois->posts as $offre) : ?>
<?php

View File

@ -20,8 +20,8 @@ $offresEmplois = new WP_Query($args);
<ul class="homegrade-blocks-offres-emplois__offres-grid-datas">
<div class="table_head">
<p><?php echo __("Poste", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Offre", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Poste", "homegrade-blocks") ?></p>
<p><?php echo __("Offre", "homegrade-blocks") ?></p>
</div>
<?php foreach ($offresEmplois->posts as $offre) : ?>
<?php

View File

@ -14,7 +14,7 @@ foreach ($block->inner_blocks as $inner_block) {
<div class="icon">
<img src="<?php echo plugin_dir_url(dirname(__DIR__)) ?>points-cles/src/img/icon_feather_key.png" alt="" />
</div>
<h3 class=""><?php echo __("Les points clés", "homegrade-blocks__texte-fonctionnel") ?></h3>
<h3 class=""><?php echo __("Les points clés", "homegrade-blocks") ?></h3>
</div>
<?php echo $inner_blocks_html ?>

View File

@ -14,7 +14,7 @@ foreach ($block->inner_blocks as $inner_block) {
<div class="icon">
<img src="<?php echo plugin_dir_url(dirname(__DIR__)) ?>points-cles/src/img/icon_feather_key.png" alt="" />
</div>
<h3 class=""><?php echo __("Les points clés", "homegrade-blocks__texte-fonctionnel") ?></h3>
<h3 class=""><?php echo __("Les points clés", "homegrade-blocks") ?></h3>
</div>
<?php echo $inner_blocks_html ?>

View File

@ -9,9 +9,9 @@ $press_reviews_datas = get_field('press_reviews_datas', 'option');
<ul class="homegrade-blocks-press-reviews__article-grid">
<div class="table_head">
<p><?php echo __("Titre", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Journal", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Date", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Titre", "homegrade-blocks") ?></p>
<p><?php echo __("Journal", "homegrade-blocks") ?></p>
<p><?php echo __("Date", "homegrade-blocks") ?></p>
</div>
<?php foreach ($press_reviews_datas as $press_review) : ?>
<?php

View File

@ -19,10 +19,7 @@ export default function Edit() {
[
"homegrade-content-blocks/section-titling",
{
sectionTitle: __(
"Revue de Presse",
"homegrade-blocks__texte-fonctionnel"
),
sectionTitle: __("Revue de Presse", "homegrade-blocks"),
},
],
]}

View File

@ -9,9 +9,9 @@ $press_reviews_datas = get_field('press_reviews_datas', 'option');
<ul class="homegrade-blocks-press-reviews__article-grid">
<div class="table_head">
<p><?php echo __("Titre", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Journal", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Date", "homegrade-blocks__texte-fonctionnel") ?></p>
<p><?php echo __("Titre", "homegrade-blocks") ?></p>
<p><?php echo __("Journal", "homegrade-blocks") ?></p>
<p><?php echo __("Date", "homegrade-blocks") ?></p>
</div>
<?php foreach ($press_reviews_datas as $press_review) : ?>
<?php
@ -29,7 +29,7 @@ $press_reviews_datas = get_field('press_reviews_datas', 'option');
</a>
<p class="homegrade-blocks-press-reviews__newspaper-source-name"><?php echo $press_review['newspaper_source'] ?></p>
<p class="homegrade-blocks-press-reviews__publication-date"><?php echo $press_review['publication_date'] ?></p>
<a class="homegrade-blocks-press-reviews__article-download cta cta--secondary cta--button" href=""><?php echo __('Télécharger', "homegrade-blocks__texte-fonctionnel") ?></a>
<a class="homegrade-blocks-press-reviews__article-download cta cta--secondary cta--button" href=""><?php echo __('Télécharger', "homegrade-blocks") ?></a>
</li>

View File

@ -110,9 +110,7 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
return (
<InspectorControls>
<PanelBody
title={__("Question Relié", "homegrade-blocks__texte-backoffice")}
>
<PanelBody title={__("Question Relié", "homegrade-blocks")}>
{/* <SelectControl
label={panelTitle}
value={relatedPostId}
@ -132,7 +130,7 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
<Tip>
{__(
"Pour modifier le contenu de la question affichée ici, rendez-vous dans la fiche question correspondante.",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks"
)}
</Tip>
)}

View File

@ -63,7 +63,7 @@ export default function Edit({ attributes, setAttributes, clientId }) {
className="section_titling__title"
placeholder={__(
"Ajouter ici le Titre de Section",
"homegrade-blocks__texte-backoffice"
"homegrade-blocks"
)}
onChange={onChangeSectionTitle}
/>
@ -71,7 +71,7 @@ export default function Edit({ attributes, setAttributes, clientId }) {
value={sectionSubtitle}
tagName="p"
className="section_titling__subtitle"
placeholder={__("Ajouter ici le Sous-titre", "homegrade")}
placeholder={__("Ajouter ici le Sous-titre", "homegrade-blocks")}
onChange={onChangeSectionSubtitle}
/>
</div>

View File

@ -20,10 +20,7 @@ export default function Edit({ attributes, setAttributes, clientId }) {
<>
<InspectorControls>
<PanelBody
title={__(
"Variantes de Timeline",
"homegrade-blocks__texte-backoffice"
)}
title={__("Variantes de Timeline", "homegrade-blocks")}
className={"homegrade-blocks-timeline__panel-body"}
></PanelBody>
</InspectorControls>

View File

@ -131,17 +131,14 @@ export default function Edit({ attributes, setAttributes, clientId }) {
<>
<InspectorControls>
<PanelBody
title={__(
"Variantes de Timeline",
"homegrade-blocks__texte-backoffice"
)}
title={__("Variantes de Timeline", "homegrade-blocks")}
className={
"homegrade-blocks-timeline__panel-body homegrade-blocks-components-image__panel-body"
}
>
<PanelRow>
<ToggleControl
label={__("Titre de bloc", "homegrade-blocks__texte-backoffice")}
label={__("Titre de bloc", "homegrade-blocks")}
help={
hasTitle ? "Titre de bloc." : "Ne pas afficher de bloc titrage"
}

View File

@ -109,7 +109,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
{hasStepPicture && (
<PanelBody
className="homegrade-blocks-timeline-step__panel-body homegrade-blocks-timeline-step__panel-body--image"
title={__("Image", "homegrade-blocks__texte-backoffice")}
title={__("Image", "homegrade-blocks")}
>
{timelineStepImageUrl && (
<img src={timelineStepImageUrl} alt={timelineStepImageAlt} />
@ -123,8 +123,8 @@ export default function Edit({ attributes, setAttributes, ...props }) {
onSelect={setImageAttributes}
name={
!timelineStepImageUrl
? __("Ajouter", "homegrade-blocks__texte-backoffice")
: __("Remplacer", "homegrade-blocks__texte-backoffice")
? __("Ajouter", "homegrade-blocks")
: __("Remplacer", "homegrade-blocks")
}
/>
{timelineStepImageUrl && (