Skip to content

Commit 08d4a93

Browse files
release: fixes
- Improved the i18n support.
2 parents a568c8c + ee0b682 commit 08d4a93

22 files changed

+1729
-906
lines changed
2.06 MB
Loading
2.06 MB
Loading
121 KB
Loading
121 KB
Loading

css/settings.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ span.error-message .components-external-link .components-visually-hidden{
18011801
}
18021802
.fz-action-btn button {
18031803
display: flex;
1804-
width: 131px;
1804+
min-width: 131px;
18051805
height: 44px;
18061806
padding: 12px 18px;
18071807
justify-content: space-between;

feedzy-rss-feed.php

+38
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ function () {
204204
);
205205
}
206206
);
207+
add_filter(
208+
'feedzy_rss_feeds_feedback_review_button_do', function () {
209+
return __( 'Upgrade Now!', 'feedzy-rss-feeds' );
210+
}
211+
);
212+
add_filter(
213+
'feedzy_rss_feeds_feedback_review_button_cancel', function () {
214+
return __( 'No, thanks.', 'feedzy-rss-feeds' );
215+
}
216+
);
207217
define( 'FEEDZY_SURVEY_PRO', 'https://forms.gle/FZXhL3D48KJUhb7q9' );
208218
define( 'FEEDZY_SURVEY_FREE', 'https://forms.gle/yQUGSrKEa7XJTGLx8' );
209219
}
@@ -290,3 +300,31 @@ function feedzy_import_job_logs( $name, $msg, $type ) {
290300
);
291301
}
292302
);
303+
304+
add_filter( 'themeisle_sdk_labels', function( $labels ) {
305+
if ( isset( $labels['float_widget'] ) ) {
306+
$labels['float_widget'] = array_merge(
307+
$labels['float_widget'],
308+
array(
309+
/* translators: %s: Product name */
310+
'button' => esc_html__( 'Toggle Help Widget for %s', 'feedzy-rss-feeds' ),
311+
'panel' => array(
312+
/* translators: %s: Product name */
313+
'greeting' => esc_html__( 'Thank you for using %s', 'feedzy-rss-feeds' ),
314+
'title' => esc_html__( 'How can we help you?', 'feedzy-rss-feeds' ),
315+
'close' => esc_html__( 'Close Toggle Help Widget', 'feedzy-rss-feeds' ),
316+
),
317+
'links' => array(
318+
'documentation' => esc_html__( 'Documentation', 'feedzy-rss-feeds' ),
319+
'support' => esc_html__( 'Get Support', 'feedzy-rss-feeds' ),
320+
'wizard' => esc_html__( 'Run Setup Wizard', 'feedzy-rss-feeds' ),
321+
'upgrade' => esc_html__( 'Upgrade to Pro', 'feedzy-rss-feeds' ),
322+
'feature_request' => esc_html__( 'Suggest a Feature', 'feedzy-rss-feeds' ),
323+
'rate' => esc_html__( 'Rate Us', 'feedzy-rss-feeds' ),
324+
),
325+
)
326+
);
327+
}
328+
329+
return $labels;
330+
});

includes/abstract/feedzy-rss-feeds-admin-abstract.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ protected function check_valid_source( $url, $cache, $source_type = 'xml' ) {
10041004
)
10051005
);
10061006
if ( ! empty( $amazon_products->get_errors() ) ) {
1007-
$amazon_api_errors['source_type'] = __( '[Amazon Product Advertising API] ', 'feedzy-rss-feeds' );
1007+
$amazon_api_errors['source_type'] = '[' . __( 'Amazon Product Advertising API', 'feedzy-rss-feeds' ) . ']';
10081008
$amazon_api_errors['source'] = array( $url );
10091009
$amazon_api_errors['errors'] = $amazon_products->get_errors();
10101010
update_post_meta( $post_id, '__transient_feedzy_invalid_source_errors', $amazon_api_errors );

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

+18-14
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ public function enqueue_styles_admin() {
213213
)
214214
);
215215

216+
wp_set_script_translations( $this->plugin_name . '_action_popup', 'feedzy-rss-feeds' );
217+
216218
$asset_file = include FEEDZY_ABSPATH . '/build/conditions/index.asset.php';
217219
wp_enqueue_script( $this->plugin_name . '_conditions', FEEDZY_ABSURL . 'build/conditions/index.js', array_merge( $asset_file['dependencies'], array( 'wp-editor', 'wp-api' ) ), $asset_file['version'], true );
218220

@@ -235,6 +237,8 @@ public function enqueue_styles_admin() {
235237

236238
wp_enqueue_style( 'wp-block-editor' );
237239

240+
wp_set_script_translations( $this->plugin_name . '_conditions', 'feedzy-rss-feeds' );
241+
238242
$this->register_survey();
239243
}
240244
if ( ! defined( 'TI_CYPRESS_TESTING' ) && ( 'edit' !== $screen->base && 'feedzy_imports' === $screen->post_type && feedzy_show_import_tour() ) ) {
@@ -661,15 +665,15 @@ public function add_feedzy_post_type_metaboxes() {
661665
* Render RN upsell metabox.
662666
*/
663667
public function render_upsell_rn() {
664-
echo '<strong>Get access to more features.</strong>';
668+
echo '<strong>' . esc_html__( 'Get access to more features.', 'feedzy-rss-feeds' ) . '</strong>';
665669
echo '<ul>
666-
<li>- Auto add referral parameters to links</li>
667-
<li>- Full Text Import</li>
668-
<li>- Parahrase content</li>
669-
<li>- Translate content</li>
670-
<li>- Elementor Templates support</li>
670+
<li>- ' . esc_html__( 'Auto add referral parameters to links', 'feedzy-rss-feeds' ) . '</li>
671+
<li>- ' . esc_html__( 'Full Text Import', 'feedzy-rss-feeds' ) . '</li>
672+
<li>- ' . esc_html__( 'Paraphrase content', 'feedzy-rss-feeds' ) . '</li>
673+
<li>- ' . esc_html__( 'Translate content', 'feedzy-rss-feeds' ) . '</li>
674+
<li>- ' . esc_html__( 'Elementor Templates support', 'feedzy-rss-feeds' ) . '</li>
671675
</ul>';
672-
echo '<a class="button button-primary " href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'metabox', 'new-category' ) ) ) . '" target="_blank">View more details</a>';
676+
echo '<a class="button button-primary " href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'metabox', 'new-category' ) ) ) . '" target="_blank">' . esc_html__( 'View more details', 'feedzy-rss-feeds' ) . '</a>';
673677
}
674678

675679
/**
@@ -1693,7 +1697,7 @@ private function setup_wizard_subscribe_process() {
16931697
$response = array(
16941698
'status' => 1,
16951699
'redirect_to' => add_query_arg( 'post_type', 'feedzy_imports', admin_url( 'edit.php' ) ),
1696-
'message' => __( 'Redirecting to feedzy dashboard', 'feedzy-rss-feeds' ),
1700+
'message' => __( 'Redirecting to Feedzy dashboard', 'feedzy-rss-feeds' ),
16971701
);
16981702
}
16991703
} elseif ( 'shortcode' === $integrate_with ) {
@@ -1708,7 +1712,7 @@ private function setup_wizard_subscribe_process() {
17081712
$response = array(
17091713
'status' => 1,
17101714
'redirect_to' => add_query_arg( 'post_type', 'feedzy_imports', admin_url( 'edit.php' ) ),
1711-
'message' => __( 'Redirecting to feedzy dashboard', 'feedzy-rss-feeds' ),
1715+
'message' => __( 'Redirecting to Feedzy dashboard', 'feedzy-rss-feeds' ),
17121716
);
17131717
}
17141718
} elseif ( 'page_builder' === $integrate_with ) {
@@ -2120,15 +2124,15 @@ public function get_lang_list() {
21202124
'ars_Arab' => __( 'Najdi Arabic', 'feedzy-rss-feeds' ),
21212125
'ary_Arab' => __( 'Moroccan Arabic', 'feedzy-rss-feeds' ),
21222126
'arz_Arab' => __( 'Egyptian Arabic', 'feedzy-rss-feeds' ),
2123-
'asm_Beng' => __( 'Assamese ', 'feedzy-rss-feeds' ),
2127+
'asm_Beng' => __( 'Assamese', 'feedzy-rss-feeds' ),
21242128
'ast_Latn' => __( 'Asturian', 'feedzy-rss-feeds' ),
21252129
'awa_Deva' => __( 'Awadhi', 'feedzy-rss-feeds' ),
21262130
'ayr_Latn' => __( 'Central Aymara', 'feedzy-rss-feeds' ),
21272131
'azb_Arab' => __( 'South Azerbaijani', 'feedzy-rss-feeds' ),
21282132
'azj_Latn' => __( 'North Azerbaijani', 'feedzy-rss-feeds' ),
21292133
'bak_Cyrl' => __( 'Bashkir', 'feedzy-rss-feeds' ),
21302134
'bam_Latn' => __( 'Bambara', 'feedzy-rss-feeds' ),
2131-
'ban_Latn' => __( 'Balinese ', 'feedzy-rss-feeds' ),
2135+
'ban_Latn' => __( 'Balinese', 'feedzy-rss-feeds' ),
21322136
'bel_Cyrl' => __( 'Belarusian', 'feedzy-rss-feeds' ),
21332137
'bem_Latn' => __( 'Bemba', 'feedzy-rss-feeds' ),
21342138
'ben_Beng' => __( 'Bengali', 'feedzy-rss-feeds' ),
@@ -2168,7 +2172,7 @@ public function get_lang_list() {
21682172
'glg_Latn' => __( 'Galician', 'feedzy-rss-feeds' ),
21692173
'grn_Latn' => __( 'Guarani', 'feedzy-rss-feeds' ),
21702174
'guj_Gujr' => __( 'Gujarati', 'feedzy-rss-feeds' ),
2171-
'hat_Latn' => __( 'Haitian Creole ', 'feedzy-rss-feeds' ),
2175+
'hat_Latn' => __( 'Haitian Creole', 'feedzy-rss-feeds' ),
21722176
'hau_Latn' => __( 'Hausa', 'feedzy-rss-feeds' ),
21732177
'heb_Hebr' => __( 'Hebrew', 'feedzy-rss-feeds' ),
21742178
'hin_Deva' => __( 'Hindi', 'feedzy-rss-feeds' ),
@@ -2187,7 +2191,7 @@ public function get_lang_list() {
21872191
'kac_Latn' => __( 'Jingpho', 'feedzy-rss-feeds' ),
21882192
'kam_Latn' => __( 'Kamba', 'feedzy-rss-feeds' ),
21892193
'kan_Knda' => __( 'Kannada', 'feedzy-rss-feeds' ),
2190-
'kas_Arab' => __( 'Kashmiri Arab)', 'feedzy-rss-feeds' ),
2194+
'kas_Arab' => __( 'Kashmiri Arab', 'feedzy-rss-feeds' ),
21912195
'kas_Deva' => __( 'Kashmiri Devanagari', 'feedzy-rss-feeds' ),
21922196
'kat_Geor' => __( 'Georgian', 'feedzy-rss-feeds' ),
21932197
'knc_Arab' => __( 'Central Kanuri Arab', 'feedzy-rss-feeds' ),
@@ -2288,7 +2292,7 @@ public function get_lang_list() {
22882292
'tso_Latn' => __( 'Tsonga', 'feedzy-rss-feeds' ),
22892293
'tuk_Latn' => __( 'Turkmen', 'feedzy-rss-feeds' ),
22902294
'tum_Latn' => __( 'Tumbuka', 'feedzy-rss-feeds' ),
2291-
'tur_Latn' => __( 'Turkish ', 'feedzy-rss-feeds' ),
2295+
'tur_Latn' => __( 'Turkish', 'feedzy-rss-feeds' ),
22922296
'twi_Latn' => __( 'Twi', 'feedzy-rss-feeds' ),
22932297
'tzm_Tfng' => __( 'Central Atlas Tamazight', 'feedzy-rss-feeds' ),
22942298
'uig_Arab' => __( 'Uyghur', 'feedzy-rss-feeds' ),

includes/admin/feedzy-rss-feeds-import.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3485,7 +3485,7 @@ public function add_import_export_section() {
34853485
<script type="template/text" id="fz_import_field_section">
34863486
<div class="fz-import-field hidden">
34873487
<form method="post" enctype="multipart/form-data" action="<?php echo esc_url( add_query_arg( array( 'action' => 'fz_import_job' ), admin_url( 'admin.php' ) ) ); ?>">
3488-
<h4> <?php esc_html_e( 'Choose the inport job .json file to import.', 'feedzy-rss-feeds' ); ?></h4>
3488+
<h4> <?php esc_html_e( 'Choose the import job .json file to import.', 'feedzy-rss-feeds' ); ?></h4>
34893489
<?php wp_nonce_field( 'fz_import_job' ); ?>
34903490
<input type="file" accept=".json" name="fz_import" required>
34913491
<button type="submit" class="button button-primary"><?php esc_html_e( 'Import', 'feedzy-rss-feeds' ); ?></button>

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

+21-9
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,19 +307,22 @@ 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
),
314322
'multiple_meta' => array(
315323
'label' => $multiple,
316-
'placeholder' => __( '(eg: source)', 'feedzy-rss-feeds' ),
324+
// translators: %s is the list of examples.
325+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), 'source' ) . ')',
317326
'type' => 'text',
318327
'value' => '',
319328
),
@@ -335,7 +344,8 @@ public static function get_form_elements() {
335344
'summarylength' => array(
336345
'label' => __( 'Crop description (summary) of the element after X characters.', 'feedzy-rss-feeds' ),
337346
'type' => 'text',
338-
'placeholder' => __( '(eg: 160)', 'feedzy-rss-feeds' ),
347+
// translators: %s is the list of examples.
348+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '160' ) . ')',
339349
'value' => '',
340350
),
341351
'keywords_title' => array(
@@ -366,7 +376,7 @@ public static function get_form_elements() {
366376
),
367377
),
368378
'keywords_ban' => array(
369-
'label' => __( 'Exclude items if selected field contains specific keyword(s) (Use comma(,) and plus(+) keyword). ', 'feedzy-rss-feeds' ),
379+
'label' => __( 'Exclude items if selected field contains specific keyword(s) (Use comma(,) and plus(+) keyword).', 'feedzy-rss-feeds' ),
370380
'placeholder' => __( '(eg: politics, gossip + stock etc.)', 'feedzy-rss-feeds' ),
371381
'type' => 'text',
372382
'value' => '',
@@ -427,7 +437,8 @@ public static function get_form_elements() {
427437
),
428438
'size' => array(
429439
'label' => __( 'Thumbnails dimension. Do not include "px". Eg: 150', 'feedzy-rss-feeds' ),
430-
'placeholder' => __( '(eg: 150)', 'feedzy-rss-feeds' ),
440+
// translators: %s is the list of examples.
441+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '150' ) . ')',
431442
'type' => 'text',
432443
'value' => '',
433444
),
@@ -492,7 +503,8 @@ public static function get_form_elements() {
492503
),
493504
'columns' => array(
494505
'label' => __( 'How many columns we should use to display the feed items', 'feedzy-rss-feeds' ),
495-
'placeholder' => __( '(eg. 1, 2, ..., 6)', 'feedzy-rss-feeds' ),
506+
// translators: %s is the list of examples.
507+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), '1, 2, ..., 6' ) . ')',
496508
'type' => 'number',
497509
'disabled' => true,
498510
'value' => '1',

includes/elementor/widgets/register-widget.php

+16-19
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
243243
'fz-filter-from-dt',
244244
array(
245245
'label_block' => true,
246-
'label' => __( 'Filter items by time range, from: ', 'feedzy-rss-feeds' ),
246+
'label' => __( 'Filter items by time range, from:', 'feedzy-rss-feeds' ) . ' ',
247247
'type' => 'date_time_local',
248248
'classes' => $this->upsell_class(),
249249
'separator' => 'before',
@@ -253,7 +253,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
253253
'fz-filter-to-dt',
254254
array(
255255
'label_block' => true,
256-
'label' => __( 'To ', 'feedzy-rss-feeds' ),
256+
'label' => __( 'To', 'feedzy-rss-feeds' ) . ' ',
257257
'type' => 'date_time_local',
258258
'classes' => $this->upsell_class(),
259259
)
@@ -468,31 +468,28 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
468468
'label' => __( 'Display additional meta fields (author, date, time or categories)', 'feedzy-rss-feeds' ),
469469
'label_block' => true,
470470
'type' => Controls_Manager::TEXT,
471-
'description' => wp_sprintf(
472-
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
473-
__(
474-
'You can add multiple tags at once, by separating them with commas.%1$s View documentation here %2$s .', 'feedzy-rss-feeds'
475-
),
476-
'<a target="_blank" href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '">',
477-
'</a>'
478-
),
471+
'description' => __( 'You can add multiple tags at once, by separating them with commas.', 'feedzy-rss-feeds' )
472+
. ' '
473+
. '<a target="_blank" href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '">'
474+
. __( 'View documentation here.', 'feedzy-rss-feeds' )
475+
. '</a>',
479476
)
480477
);
481478
$this->add_control(
482479
'fz-cus-multiple-meta',
483480
array(
484481
'label' => __( 'When using multiple sources, should we display additional meta fields?', 'feedzy-rss-feeds' ),
485-
'placeholder' => __( '(eg: source)', 'feedzy-rss-feeds' ),
482+
// translators: %s is the list of examples.
483+
'placeholder' => '(' . sprintf( __( 'eg: %s', 'feedzy-rss-feeds' ), 'source' ) . ')',
486484
'label_block' => true,
487485
'type' => Controls_Manager::TEXT,
488-
'description' => wp_sprintf(
489-
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
490-
__(
491-
'You can find more info about available meta field values here.%1$s View documentation here %2$s .', 'feedzy-rss-feeds'
492-
),
493-
'<a target="_blank" href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '">',
494-
'</a>'
495-
),
486+
// translators: this followed by sentence: View documentation here.
487+
'description' => __( 'You can find more info about available meta field values here.', 'feedzy-rss-feeds' )
488+
. ' '
489+
. '<a target="_blank" href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '">'
490+
// translators: this sentence is wrapped with a link tag.
491+
. __( 'View documentation here.', 'feedzy-rss-feeds' )
492+
. '</a>',
496493
)
497494
);
498495
$this->add_control(

includes/layouts/feedzy-tutorial.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
</ul>
131131
<?php if ( ! $is_pro ) : ?>
132132
<div class="cta">
133-
<a href="<?php echo tsdk_utmify( FEEDZY_UPSELL_LINK, 'viewall', 'tutorial' ); ?>#pro-features" class="btn btn-ghost" target="blank">
133+
<a href="<?php echo esc_url_raw( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'viewall', 'tutorial' ) ) ); ?>#pro-features" class="btn btn-ghost" target="blank">
134134
<?php esc_html_e( 'View all Premium features', 'feedzy-rss-feeds' ); ?>
135135
</a>
136136
</div>

0 commit comments

Comments
 (0)