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
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"plugins": [
"prettier"
],
"env": {
"browser": true
},
"globals": {
"jQuery": true,
"wp": true
Expand Down
17 changes: 17 additions & 0 deletions components/parts/common/swiper-controls.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* Swiper Controls
* Swiper add/replace automatically the aria-label, the role, the icon on the buttons
*
* @var array $args
*/

?>

<div class="swiper__controls">
<div class="swiper__buttons">
<div class="swiper-button-prev swiper__button" role="button" aria-label="<?php esc_attr_e( 'Previous slide', 'beapi-blocks-theme' ); ?>"></div>
<div class="swiper-button-next swiper__button" role="button" aria-label="<?php esc_attr_e( 'Next slide', 'beapi-blocks-theme' ); ?>"></div>
</div>
</div>
8 changes: 7 additions & 1 deletion inc/Services/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function register_assets(): void {
$this->assets_tools->register_script(
'scripts',
$asset['file'],
array_merge( [ 'jquery' ], $asset['dependencies'] ), // ensure jQuery dependency is set even if not declared explicitly in the JS
array_merge( [ 'jquery', 'wp-i18n' ], $asset['dependencies'] ), // ensure jQuery dependency is set even if not declared explicitly in the JS
$asset['version'],
[ 'strategy' => 'defer' ]
);
Expand Down Expand Up @@ -127,6 +127,12 @@ public function register_assets(): void {
public function enqueue_scripts(): void {
// JS
$this->assets_tools->enqueue_script( 'scripts' );

wp_set_script_translations(
'scripts',
'beapi-blocks-theme',
\get_theme_file_path( 'languages' )
);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"2026-04-10 16:29+0200","generator":"WP-CLI\/2.12.0","source":"dist\/app-min.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"Previous slide":["Diapositive pr\u00e9c\u00e9dente"],"Next slide":["Diapositive suivante"],"This is the first slide":["C'est la premi\u00e8re diapositive"],"This is the last slide":["C'est la derni\u00e8re diapositive"],"Go to slide {{index}}":["Aller \u00e0 la diapositive {{index}}"],"{{index}} of {{slidesLength}}":["{{index}} sur {{slidesLength}}"]}}}
Binary file modified languages/beapi-blocks-theme-fr_FR.mo
Binary file not shown.
46 changes: 36 additions & 10 deletions languages/beapi-blocks-theme-fr_FR.po
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Copyright (C) 2025 BeAPI
# This file is distributed under the same license as the BeAPI Blocks Theme theme.
msgid ""
msgstr ""
"Project-Id-Version: BeAPI Blocks Theme 1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/beapi-blocks-"
"theme\n"
"POT-Creation-Date: 2026-04-10T14:28:33+00:00\n"
"PO-Revision-Date: 2026-04-10 16:29+0200\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/beapi-blocks-theme\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-04-10T14:28:33+00:00\n"
"PO-Revision-Date: 2026-04-10 16:29+0200\n"
"Language: fr_FR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.8\n"
"X-Domain: beapi-blocks-theme\n"

#. Theme Name of the theme
#. Description of the theme
#: style.css patterns/footer.php:75
#: style.css
#: patterns/footer.php:75
msgid "BeAPI Blocks Theme"
msgstr ""

Expand All @@ -34,7 +32,8 @@ msgid "BeAPI"
msgstr ""

#. Author URI of the theme
#: style.css patterns/footer.php:83
#: style.css
#: patterns/footer.php:83
msgid "https://beapi.fr"
msgstr ""

Expand Down Expand Up @@ -173,7 +172,8 @@ msgstr "Voici plutôt quelques liens utiles :"
msgid "Back to home"
msgstr "Retour à l’accueil"

#: patterns/hidden-404.php:41 patterns/hidden-404.php:45
#: patterns/hidden-404.php:41
#: patterns/hidden-404.php:45
msgid "Link"
msgstr "Lien"

Expand Down Expand Up @@ -381,3 +381,29 @@ msgstr ""

#~ msgid "Add to my calendar"
#~ msgstr "Ajouter à mon calendrier"

#: components/parts/common/swiper-controls.php:14
#: dist/app-min.js
msgid "Previous slide"
msgstr "Diapositive précédente"

#: components/parts/common/swiper-controls.php:15
#: dist/app-min.js
msgid "Next slide"
msgstr "Diapositive suivante"

#: dist/app-min.js
msgid "This is the first slide"
msgstr "C'est la première diapositive"

#: dist/app-min.js
msgid "This is the last slide"
msgstr "C'est la dernière diapositive"

#: dist/app-min.js
msgid "Go to slide {{index}}"
msgstr "Aller à la diapositive {{index}}"

#: dist/app-min.js
msgid "{{index}} of {{slidesLength}}"
msgstr "{{index}} sur {{slidesLength}}"
26 changes: 26 additions & 0 deletions languages/beapi-blocks-theme.pot
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,29 @@ msgstr ""
msgctxt "Template part name"
msgid "Footer"
msgstr ""

#: components/parts/common/swiper-controls.php:14
#: dist/app-min.js
msgid "Previous slide"
msgstr ""

#: components/parts/common/swiper-controls.php:15
#: dist/app-min.js
msgid "Next slide"
msgstr ""

#: dist/app-min.js
msgid "This is the first slide"
msgstr ""

#: dist/app-min.js
msgid "This is the last slide"
msgstr ""

#: dist/app-min.js
msgid "Go to slide {{index}}"
msgstr ""

#: dist/app-min.js
msgid "{{index}} of {{slidesLength}}"
msgstr ""
Loading