Skip to content

Commit

Permalink
Fixed : Disambiguate "Cover" translatable string in the context of ba…
Browse files Browse the repository at this point in the history
…ckground-panel.js (#62440)

* Fixed : Disambiguate 'Cover' translatable string in the context of background-panel.js

* Added context for Contain and Tile

* Implemented the suggestions


Co-authored-by: narenin <narenin@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: audrasjb <audrasjb@git.wordpress.org>
  • Loading branch information
4 people authored Jun 11, 2024
1 parent faf5cba commit fd587da
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
__experimentalHStack as HStack,
__experimentalTruncate as Truncate,
} from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
import { __, _x, sprintf } from '@wordpress/i18n';
import { store as noticesStore } from '@wordpress/notices';
import { getFilename } from '@wordpress/url';
import { useCallback, Platform, useRef } from '@wordpress/element';
Expand Down Expand Up @@ -544,17 +544,26 @@ function BackgroundSizeToolsPanelItem( {
<ToggleGroupControlOption
key="cover"
value="cover"
label={ __( 'Cover' ) }
label={ _x(
'Cover',
'Size option for background image control'
) }
/>
<ToggleGroupControlOption
key="contain"
value="contain"
label={ __( 'Contain' ) }
label={ _x(
'Contain',
'Size option for background image control'
) }
/>
<ToggleGroupControlOption
key="tile"
value="auto"
label={ __( 'Tile' ) }
label={ _x(
'Tile',
'Size option for background image control'
) }
/>
</ToggleGroupControl>
<HStack justify="flex-start" spacing={ 2 } as="span">
Expand Down

0 comments on commit fd587da

Please sign in to comment.