Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions components/parts/common/post-sharing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* Post sharing actions (copy link / native share).
*
* @var array $args {
* @type string $url Post permalink.
* @type string $title Post title.
* }
*/

use function BEA\Theme\Framework\Helpers\Svg\the_icon;

$url = (string) ( $args['url'] ?? '' );
$post_title = (string) ( $args['title'] ?? '' );

if ( '' === $url ) {
return;
}
?>

<div
class="post-sharing"
data-url="<?php echo esc_url( $url ); ?>"
data-title="<?php echo esc_attr( $post_title ); ?>"
data-copied-label="<?php echo esc_attr__( 'Link copied!', 'beapi-frontend-framework' ); ?>"
data-error-copy="<?php echo esc_attr__( 'Unable to copy the link', 'beapi-frontend-framework' ); ?>"
data-error-share="<?php echo esc_attr__( 'Unable to share', 'beapi-frontend-framework' ); ?>"
>
<div class="post-sharing__actions">
<button type="button" class="post-sharing__button post-sharing__button--copy" data-action="copy">
<?php the_icon( 'link', [ 'post-sharing__icon', 'post-sharing__icon--copy' ] ); ?>
<?php the_icon( 'check-circle', [ 'post-sharing__icon', 'post-sharing__icon--check' ] ); ?>
<span class="post-sharing__label"><?php echo esc_html__( 'Copy link', 'beapi-frontend-framework' ); ?></span>
</button>
<button type="button" class="post-sharing__button post-sharing__button--share" data-action="share">
<?php the_icon( 'share', [ 'post-sharing__icon', 'post-sharing__icon--share' ] ); ?>
<span class="post-sharing__label"><?php echo esc_html__( 'Share', 'beapi-frontend-framework' ); ?></span>
</button>
</div>
<p class="post-sharing__status sr-only" role="status" aria-live="polite"></p>
</div>
54 changes: 30 additions & 24 deletions languages/beapi-frontend-framework.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-05-07T14:30:39+00:00\n"
"POT-Creation-Date: 2026-09-18T09:57:30+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.12.0\n"
"X-Domain: beapi-frontend-framework\n"
Expand Down Expand Up @@ -39,6 +39,26 @@ msgstr ""
msgid "Breadcrumb"
msgstr ""

#: components/parts/common/post-sharing.php:25
msgid "Link copied!"
msgstr ""

#: components/parts/common/post-sharing.php:26
msgid "Unable to copy the link"
msgstr ""

#: components/parts/common/post-sharing.php:27
msgid "Unable to share"
msgstr ""

#: components/parts/common/post-sharing.php:33
msgid "Copy link"
msgstr ""

#: components/parts/common/post-sharing.php:37
msgid "Share"
msgstr ""

#: footer.php:2
msgid "Footer"
msgstr ""
Expand Down Expand Up @@ -92,6 +112,10 @@ msgstr ""
msgid "Close menu"
msgstr ""

#: inc/Helpers/Formatting/Datetime.php:53
msgid "Published on"
msgstr ""

#: inc/Helpers/Formatting/Link.php:144
msgid "New window"
msgstr ""
Expand Down Expand Up @@ -120,46 +144,28 @@ msgstr ""
msgid "Share by email"
msgstr ""

#: inc/Services/Editor.php:144
#: inc/Services/Editor.php:168
msgid "Small"
msgstr ""

#: inc/Services/Editor.php:152
#: inc/Services/Editor.php:176
msgid "Large"
msgstr ""

#: inc/Services/Editor.php:160
#: inc/Services/Editor.php:184
msgid "Huge"
msgstr ""

#. translators: %s: heading number
#: inc/Services/Editor.php:168
#: inc/Services/Editor.php:192
#, php-format
msgid "Style H%s"
msgstr ""

#: inc/Services/Editor_Patterns.php:40
#: inc/Services/Editor_Patterns.php:45
msgid "Common"
msgstr ""

#. translators: %s: file name.
#: inc/Services/Editor_Patterns.php:125
#, php-format
msgid "Could not register file \"%s\" as a block pattern (\"Slug\" field missing)"
msgstr ""

#. translators: %1s: file name; %2s: slug value found.
#: inc/Services/Editor_Patterns.php:138
#, php-format
msgid "Could not register file \"%1$s\" as a block pattern (invalid slug \"%2$s\")"
msgstr ""

#. translators: %1s: file name; %2s: slug value found.
#: inc/Services/Editor_Patterns.php:155
#, php-format
msgid "Could not register file \"%s\" as a block pattern (\"Title\" field missing)"
msgstr ""

#: inc/Services/Menu.php:37
msgid "Main menu"
msgstr ""
Expand Down
Binary file modified languages/fr_FR.mo
Binary file not shown.
88 changes: 54 additions & 34 deletions languages/fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Project-Id-Version: Be API Frontend Framework 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/beapi-frontend-"
"framework\n"
"POT-Creation-Date: 2026-05-07T14:30:39+00:00\n"
"PO-Revision-Date: 2026-05-07 16:41+0200\n"
"POT-Creation-Date: 2026-09-18T09:57:30+00:00\n"
"PO-Revision-Date: 2026-09-18 12:00+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
Expand Down Expand Up @@ -42,6 +42,26 @@ msgstr ""
msgid "Breadcrumb"
msgstr "Fil d’ariane"

#: components/parts/common/post-sharing.php:25
msgid "Link copied!"
msgstr "Lien copié !"

#: components/parts/common/post-sharing.php:26
msgid "Unable to copy the link"
msgstr "Impossible de copier le lien"

#: components/parts/common/post-sharing.php:27
msgid "Unable to share"
msgstr "Impossible de partager"

#: components/parts/common/post-sharing.php:33
msgid "Copy link"
msgstr "Copier le lien"

#: components/parts/common/post-sharing.php:37
msgid "Share"
msgstr "Partager"

#: footer.php:2
msgid "Footer"
msgstr "Pied de Page"
Expand Down Expand Up @@ -94,6 +114,10 @@ msgstr "Ouvrir le menu"
msgid "Close menu"
msgstr "Fermer le menu"

#: inc/Helpers/Formatting/Datetime.php:53
msgid "Published on"
msgstr "Publié le"

#: inc/Helpers/Formatting/Link.php:144
msgid "New window"
msgstr "Nouvelle fenêtre"
Expand Down Expand Up @@ -122,55 +146,28 @@ msgstr "Partager sur Bluesky"
msgid "Share by email"
msgstr "Partager par email"

#: inc/Services/Editor.php:144
#: inc/Services/Editor.php:168
msgid "Small"
msgstr "Petit"

#: inc/Services/Editor.php:152
#: inc/Services/Editor.php:176
msgid "Large"
msgstr "Grand"

#: inc/Services/Editor.php:160
#: inc/Services/Editor.php:184
msgid "Huge"
msgstr "Très grand"

#. translators: %s: heading number
#: inc/Services/Editor.php:168
#: inc/Services/Editor.php:192
#, php-format
msgid "Style H%s"
msgstr ""

#: inc/Services/Editor_Patterns.php:40
#: inc/Services/Editor_Patterns.php:45
msgid "Common"
msgstr "Général"

#. translators: %s: file name.
#: inc/Services/Editor_Patterns.php:125
#, php-format
msgid ""
"Could not register file \"%s\" as a block pattern (\"Slug\" field missing)"
msgstr ""
"Impossible de déclarer la composition de blocs à partir du fichier \"%s\" "
"(Le champ \"Slug\" est manquant)"

#. translators: %1s: file name; %2s: slug value found.
#: inc/Services/Editor_Patterns.php:138
#, php-format
msgid ""
"Could not register file \"%1$s\" as a block pattern (invalid slug \"%2$s\")"
msgstr ""
"Impossible de déclarer la composition de blocs à partir du fichier \"%1$s\" "
"(Le slug \"%2$s\" n'est pas valide)"

#. translators: %1s: file name; %2s: slug value found.
#: inc/Services/Editor_Patterns.php:155
#, php-format
msgid ""
"Could not register file \"%s\" as a block pattern (\"Title\" field missing)"
msgstr ""
"Impossible de déclarer la composition de blocs à partir du fichier \"%s\" "
"(Le champ \"Title\" est manquant)"

#: inc/Services/Menu.php:37
msgid "Main menu"
msgstr "Menu principal"
Expand Down Expand Up @@ -264,6 +261,29 @@ msgctxt "Space size name"
msgid "lg (64px)"
msgstr ""

#, php-format
#~ msgid ""
#~ "Could not register file \"%s\" as a block pattern (\"Slug\" field missing)"
#~ msgstr ""
#~ "Impossible de déclarer la composition de blocs à partir du fichier \"%s\" "
#~ "(Le champ \"Slug\" est manquant)"

#, php-format
#~ msgid ""
#~ "Could not register file \"%1$s\" as a block pattern (invalid slug "
#~ "\"%2$s\")"
#~ msgstr ""
#~ "Impossible de déclarer la composition de blocs à partir du fichier "
#~ "\"%1$s\" (Le slug \"%2$s\" n'est pas valide)"

#, php-format
#~ msgid ""
#~ "Could not register file \"%s\" as a block pattern (\"Title\" field "
#~ "missing)"
#~ msgstr ""
#~ "Impossible de déclarer la composition de blocs à partir du fichier \"%s\" "
#~ "(Le champ \"Title\" est manquant)"

#~ msgid "Dark"
#~ msgstr "Sombre"

Expand Down
1 change: 1 addition & 0 deletions src/img/icons/sprite/check-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/icons/sprite/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/img/icons/sprite/logo-beapi.svg

This file was deleted.

1 change: 1 addition & 0 deletions src/img/icons/sprite/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading