From 915fd98ceb8927f74996a1bad0d0e012b9860db3 Mon Sep 17 00:00:00 2001 From: Burhan Nasir Date: Tue, 10 May 2022 13:08:22 +0500 Subject: [PATCH] Add missing text domain --- assets/js/blocks/related-posts/Edit.js | 10 +++++++--- assets/js/blocks/related-posts/block.js | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/js/blocks/related-posts/Edit.js b/assets/js/blocks/related-posts/Edit.js index c734faacab..3530076d51 100644 --- a/assets/js/blocks/related-posts/Edit.js +++ b/assets/js/blocks/related-posts/Edit.js @@ -66,7 +66,7 @@ class Edit extends Component { /> - + setAttributes({ number: value })} @@ -76,8 +76,12 @@ class Edit extends Component {
{displayPosts === false || displayPosts.length === 0 ? ( - - {posts === false ? : __('No related posts yet.')} + + {posts === false ? ( + + ) : ( + __('No related posts yet.', 'elasticpress') + )} ) : (
    diff --git a/assets/js/blocks/related-posts/block.js b/assets/js/blocks/related-posts/block.js index 647c8f9747..eb6297d1b5 100644 --- a/assets/js/blocks/related-posts/block.js +++ b/assets/js/blocks/related-posts/block.js @@ -1,9 +1,11 @@ import Edit from './Edit'; +const { __ } = wp.i18n; + const { registerBlockType } = wp.blocks; registerBlockType('elasticpress/related-posts', { - title: 'Related Posts (ElasticPress)', + title: __('Related Posts (ElasticPress)', 'elasticpress'), supports: { align: true, },