Skip to content

Commit 0196148

Browse files
Merge pull request #1059 from Codeinwp/fix/translators-feedback
fix: correct typos, improve text formatting, styling and loading
2 parents 3e29a3f + 7ad538f commit 0196148

22 files changed

+1730
-904
lines changed
2.06 MB
Loading
2.06 MB
Loading
121 KB
Loading
121 KB
Loading

css/settings.css

Lines changed: 1 addition & 1 deletion
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

Lines changed: 38 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 18 additions & 14 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 19 additions & 8 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(
@@ -366,7 +375,7 @@ public static function get_form_elements() {
366375
),
367376
),
368377
'keywords_ban' => array(
369-
'label' => __( 'Exclude items if selected field contains specific keyword(s) (Use comma(,) and plus(+) keyword). ', 'feedzy-rss-feeds' ),
378+
'label' => __( 'Exclude items if selected field contains specific keyword(s) (Use comma(,) and plus(+) keyword).', 'feedzy-rss-feeds' ),
370379
'placeholder' => __( '(eg: politics, gossip + stock etc.)', 'feedzy-rss-feeds' ),
371380
'type' => 'text',
372381
'value' => '',
@@ -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',

0 commit comments

Comments
 (0)