From 9a9fdf760f1538704fc4cd7dcf2a4bbf8dde8cf4 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Fri, 10 Jan 2025 12:29:44 +0530 Subject: [PATCH] fix: Simplify the sprintf translations for percentage widths --- .../block-editor/src/components/image-size-control/index.js | 2 +- packages/block-library/src/button/edit.js | 2 +- packages/block-library/src/search/edit.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/image-size-control/index.js b/packages/block-editor/src/components/image-size-control/index.js index 3432e85728fd3..1cd2b51054e7e 100644 --- a/packages/block-editor/src/components/image-size-control/index.js +++ b/packages/block-editor/src/components/image-size-control/index.js @@ -139,7 +139,7 @@ export default function ImageSizeControl( { value={ scale } label={ sprintf( /* translators: Percentage value. */ - __( '%1$d%%' ), + __( '%d%%' ), scale ) } /> diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index 06e10f604650e..67e1218ca2f65 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -150,7 +150,7 @@ function WidthPanel( { selectedWidth, setAttributes } ) { value={ widthValue } label={ sprintf( /* translators: Percentage value. */ - __( '%1$d%%' ), + __( '%d%%' ), widthValue ) } /> diff --git a/packages/block-library/src/search/edit.js b/packages/block-library/src/search/edit.js index b4ac37220c816..ed8edf4a5aca8 100644 --- a/packages/block-library/src/search/edit.js +++ b/packages/block-library/src/search/edit.js @@ -472,7 +472,7 @@ export default function SearchEdit( { value={ widthValue } label={ sprintf( /* translators: Percentage value. */ - __( '%1$d%%' ), + __( '%d%%' ), widthValue ) } />