Skip to content

Commit

Permalink
PLANET-4811 Fix label translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Inwerpsel committed Oct 26, 2020
1 parent 0c42a4c commit ef10817
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions assets/src/blocks/Gallery/GalleryBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const BLOCK_NAME = 'planet4-blocks/gallery';
const getStyleLabel = (label, help) => {
if (help) {
return (
<Tooltip text={__(help, 'planet4-blocks-backend')}>
<span>{__(label, 'planet4-blocks-backend')}</span>
<Tooltip text={ help }>
<span>{ label }</span>
</Tooltip>
);
}
return label;
}
};

export class GalleryBlock {
constructor() {
Expand Down Expand Up @@ -63,23 +63,23 @@ export class GalleryBlock {
{
name: 'slider',
label: getStyleLabel(
'Slider',
'The slider is a carousel of images. For more than 5 images, consider using a grid.'
__('Slider', 'planet4-blocks-backend'),
__('The slider is a carousel of images. For more than 5 images, consider using a grid.', 'planet4-blocks-backend'),
),
isDefault: true
},
{
name: 'three-columns',
label: getStyleLabel(
'3 Columns',
'The 3 columns image display is great for accentuating text, and telling a visual story.'
__('3 Columns', 'planet4-blocks-backend'),
__('The 3 columns image display is great for accentuating text, and telling a visual story.', 'planet4-blocks-backend'),
),
},
{
name: 'grid',
label: getStyleLabel(
'Grid',
'The grid shows thumbnails of lots of images. Good to use when showing lots of activity.'
__('Grid', 'planet4-blocks-backend'),
__('The grid shows thumbnails of lots of images. Good to use when showing lots of activity.', 'planet4-blocks-backend'),
),
}
],
Expand Down
16 changes: 8 additions & 8 deletions assets/src/blocks/Submenu/SubmenuBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const BLOCK_NAME = 'planet4-blocks/submenu';
const getStyleLabel = (label, help) => {
if (help) {
return (
<Tooltip text={__(help, 'planet4-blocks-backend')}>
<span>{__(label, 'planet4-blocks-backend')}</span>
<Tooltip text=help>
<span>{label}</span>
</Tooltip>
);
}
Expand Down Expand Up @@ -52,23 +52,23 @@ export const registerSubmenuBlock = () => {
{
name: 'long',
label: getStyleLabel(
'Long full-width',
'Use: on long pages (more than 5 screens) when list items are long (+ 10 words). No max items recommended.'
__('Long full-width', 'planet4-blocks-backend'),
__('Use: on long pages (more than 5 screens) when list items are long (+ 10 words). No max items recommended.', 'planet4-blocks-backend'),
),
isDefault: true
},
{
name: 'short',
label: getStyleLabel(
'Short full-width',
'Use: on long pages (more than 5 screens) when list items are short (up to 5 words). No max items recommended.'
__('Short full-width', 'planet4-blocks-backend'),
__('Use: on long pages (more than 5 screens) when list items are short (up to 5 words). No max items recommended.', 'planet4-blocks-backend'),
)
},
{
name: 'sidebar',
label: getStyleLabel(
'Short sidebar',
'Use: on long pages (more than 5 screens) when list items are short (up to 10 words). Max items recommended: 9'
__('Short sidebar', 'planet4-blocks-backend'),
__('Use: on long pages (more than 5 screens) when list items are short (up to 10 words). Max items recommended: 9', 'planet4-blocks-backend'),
)
}
],
Expand Down

0 comments on commit ef10817

Please sign in to comment.