Skip to content

Commit 06ed2c2

Browse files
fix: decode HTML entities from translation and do not translate values for meta keys
1 parent 6587d8a commit 06ed2c2

File tree

3 files changed

+833
-351
lines changed

3 files changed

+833
-351
lines changed

includes/admin/feedzy-rss-feeds-ui-lang.php

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ public static function get_form_elements() {
127127
),
128128
'max' => array(
129129
'label' => __( 'Number of items to display.', 'feedzy-rss-feeds' ),
130-
'placeholder' => __( '(eg: 5)', 'feedzy-rss-feeds' ),
130+
// translators: %s is the list of examples.
131+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '5' ) . ')',
131132
'type' => 'text',
132133
'value' => '',
133134
),
@@ -154,7 +155,12 @@ public static function get_form_elements() {
154155
),
155156
'refresh' => array(
156157
'label' => __( 'For how long we will cache the feed results.', 'feedzy-rss-feeds' ),
157-
'placeholder' => __( '(eg: 1_days, defaults: 12_hours)', 'feedzy-rss-feeds' ),
158+
'placeholder' => '('
159+
// translators: %s is the list of examples.
160+
. sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '1_days' )
161+
// translators: %s is the default value.
162+
. sprintf( __( 'default: %s', 'feedzy-rss-feeds' ), '12_hours' )
163+
. ')',
158164
'type' => 'select',
159165
'value' => '12_hours',
160166
'opts' => feedzy_classic_widget_refresh_options(),
@@ -301,13 +307,15 @@ public static function get_form_elements() {
301307
),
302308
'title' => array(
303309
'label' => __( 'Trim the title of the item after X characters. A value of 0 will remove the title.', 'feedzy-rss-feeds' ),
304-
'placeholder' => __( '(eg: 160)', 'feedzy-rss-feeds' ),
310+
// translators: %s is the list of examples.
311+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '160' ) . ')',
305312
'type' => 'text',
306313
'value' => '',
307314
),
308315
'meta' => array(
309316
'label' => $meta,
310-
'placeholder' => __( '(eg: author, date, time, tz=local)', 'feedzy-rss-feeds' ),
317+
// translators: %s is the list of examples.
318+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), 'author, date, time, tz=local' ) . ')',
311319
'type' => 'text',
312320
'value' => '',
313321
),
@@ -335,7 +343,8 @@ public static function get_form_elements() {
335343
'summarylength' => array(
336344
'label' => __( 'Crop description (summary) of the element after X characters.', 'feedzy-rss-feeds' ),
337345
'type' => 'text',
338-
'placeholder' => __( '(eg: 160)', 'feedzy-rss-feeds' ),
346+
// translators: %s is the list of examples.
347+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '160' ) . ')',
339348
'value' => '',
340349
),
341350
'keywords_title' => array(
@@ -427,7 +436,8 @@ public static function get_form_elements() {
427436
),
428437
'size' => array(
429438
'label' => __( 'Thumbnails dimension. Do not include "px". Eg: 150', 'feedzy-rss-feeds' ),
430-
'placeholder' => __( '(eg: 150)', 'feedzy-rss-feeds' ),
439+
// translators: %s is the list of examples.
440+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '150' ) . ')',
431441
'type' => 'text',
432442
'value' => '',
433443
),
@@ -492,7 +502,8 @@ public static function get_form_elements() {
492502
),
493503
'columns' => array(
494504
'label' => __( 'How many columns we should use to display the feed items', 'feedzy-rss-feeds' ),
495-
'placeholder' => __( '(eg. 1, 2, ..., 6)', 'feedzy-rss-feeds' ),
505+
// translators: %s is the list of examples.
506+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '1, 2, ..., 6' ) . ')',
496507
'type' => 'number',
497508
'disabled' => true,
498509
'value' => '1',

includes/elementor/widgets/register-widget.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
479479
'fz-cus-multiple-meta',
480480
array(
481481
'label' => __( 'When using multiple sources, should we display additional meta fields?', 'feedzy-rss-feeds' ),
482+
// translators: the source of the imported article (author, website).
482483
'placeholder' => __( '(eg: source)', 'feedzy-rss-feeds' ),
483484
'label_block' => true,
484485
'type' => Controls_Manager::TEXT,

0 commit comments

Comments
 (0)