diff --git a/i18n/en.json b/i18n/en.json index 32745ec..198b3a5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -13,6 +13,8 @@ "bootstrap-components-image-modal-source-button" : "Visit Source", + "bootstrap-components-carousel-slide-label" : "Slide $1", + "bootstrap-components-lua-error-no-component": "No component name provided for mw.bootstrap.parse.", "bootstrap-components-lua-error-invalid-component": "Invalid component name passed to mw.bootstrap.parse: $1.", diff --git a/i18n/qqq.json b/i18n/qqq.json index b05a5cb..770c81f 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -10,6 +10,7 @@ "bootstrap-components-tracking-category": "Tracking category for pages with calls to at least one bootstrap tag.\n\n{{Notranslate}}", "bootstrap-components-close-element": "Text for the close button of various components.\n\n{{Identical|Close}}", "bootstrap-components-image-modal-source-button": "Text on the button linking to the image source page.", + "bootstrap-components-carousel-slide-label": "Text for the accessibility label of a carousel indicator button.\n\nParameters:\n* $1 - slide number", "bootstrap-components-lua-error-no-component": "Error message that indicates, that there was no component name provided to the lua parse function.", "bootstrap-components-lua-error-invalid-component": "Error message that indicates, that there was an invalid component name provided to the lua parse function.\n\nParameters:\n* $1 - invalid component provided", "bootstrap-components-badge-content-missing": "Error message that indicates, that the text is missing in a badge component. Please supply an input text after the double colon.", diff --git a/src/Components/Carousel.php b/src/Components/Carousel.php index 035dc92..1e065e8 100644 --- a/src/Components/Carousel.php +++ b/src/Components/Carousel.php @@ -193,7 +193,7 @@ private function generateIndicators( $num ) { 'data-bs-slide-to' => $i, 'class' => $class ?: false, 'aria-current' => $class ? 'true' : false, - 'aria-label' => 'Slide ' . ( $i + 1 ), + 'aria-label' => wfMessage( 'bootstrap-components-carousel-slide-label', $i + 1 )->inContentLanguage()->text(), ] ) . PHP_EOL; $class = false;