Skip to content

Commit 8201369

Browse files
refactor: translatable strings
1 parent 18347a6 commit 8201369

22 files changed

+268
-166
lines changed

css/settings.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,6 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
835835
outline: 0;
836836
cursor: pointer;
837837
text-decoration: none;
838-
text-transform: capitalize;
839838
-webkit-transition: all 0.3s ease-in-out;
840839
-moz-transition: all 0.3s ease-in-out;
841840
-o-transition: all 0.3s ease-in-out;
@@ -1564,7 +1563,6 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
15641563
background: transparent;
15651564
border-color: #4268CF;
15661565
color: #4268CF;
1567-
text-transform: capitalize;
15681566
-webkit-transition: all 0.3s ease-in-out;
15691567
-moz-transition: all 0.3s ease-in-out;
15701568
-o-transition: all 0.3s ease-in-out;
@@ -2250,7 +2248,6 @@ li.draggable-item .components-panel__body-toggle.components-button{
22502248
}
22512249
.fz-content-action div .tagify__tag-text {
22522250
padding-right: 10px;
2253-
text-transform: capitalize;
22542251
}
22552252
.popover-action-list ul li.fz-action-disabled {
22562253
cursor: not-allowed !important;

feedzy-rss-feed.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,35 @@ function ( $labels ) {
324324
);
325325
}
326326

327+
if ( isset( $labels['about_us'] ) ) {
328+
$labels['about_us'] = array_merge(
329+
$labels['about_us'],
330+
array(
331+
'title' => __( 'About Us', 'feedzy-rss-feeds' ),
332+
'heroHeader' => __( 'Our Story', 'feedzy-rss-feeds' ),
333+
'heroTextFirst' => __( 'Themeisle was founded in 2012 by a group of passionate developers who wanted to create beautiful and functional WordPress themes and plugins. Since then, we have grown into a team of over 20 dedicated professionals who are committed to delivering the best possible products to our customers.', 'feedzy-rss-feeds' ),
334+
'heroTextSecond' => __( 'At Themeisle, we offer a wide range of WordPress themes and plugins that are designed to meet the needs of both beginners and advanced users. Our products are feature-rich, easy to use, and are designed to help you create beautiful and functional websites.', 'feedzy-rss-feeds' ),
335+
'teamImageCaption' => __( 'Our team in WCEU2022 in Portugal', 'feedzy-rss-feeds' ),
336+
'newsHeading' => __( 'Stay connected for news & updates!', 'feedzy-rss-feeds' ),
337+
'emailPlaceholder' => __( 'Your email address', 'feedzy-rss-feeds' ),
338+
'signMeUp' => __( 'Sign me up', 'feedzy-rss-feeds' ),
339+
'installNow' => __( 'Install Now', 'feedzy-rss-feeds' ),
340+
'activate' => __( 'Activate', 'feedzy-rss-feeds' ),
341+
'learnMore' => __( 'Learn More', 'feedzy-rss-feeds' ),
342+
'installed' => __( 'Installed', 'feedzy-rss-feeds' ),
343+
'notInstalled' => __( 'Not Installed', 'feedzy-rss-feeds' ),
344+
'active' => __( 'Active', 'feedzy-rss-feeds' ),
345+
'others' => array(
346+
'optimole_desc' => __( 'Optimole is an image optimization service that automatically optimizes your images and serves them to your visitors via a global CDN, making your website lighter, faster and helping you reduce your bandwidth usage.', 'feedzy-rss-feeds' ),
347+
'neve_desc' => __( 'A fast, lightweight, customizable WordPress theme offering responsive design, speed, and flexibility for various website types.', 'feedzy-rss-feeds' ),
348+
'landingkit_desc' => __( 'Turn WordPress into a landing page powerhouse with Landing Kit, map domains to pages or any other published resource.', 'feedzy-rss-feeds' ),
349+
'sparks_desc' => __( 'Extend your store functionality with 8 ultra-performant features like product comparisons, variation swatches, wishlist, and more.', 'feedzy-rss-feeds' ),
350+
'tpc_desc' => __( 'Design, save, and revisit your templates anytime with your personal vault on Templates Cloud.', 'feedzy-rss-feeds' ),
351+
),
352+
)
353+
);
354+
}
355+
327356
return $labels;
328357
}
329358
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ public function feedzy_category_feed() {
950950
<strong>' .
951951
sprintf(
952952
// translators: %1$s and %2$s are placeholders for HTML anchor tags.
953-
__( 'Please be aware that multiple feeds, when mashed together, may sometimes not work as expected as explained %1$s here %2$s.', 'feedzy-rss-feeds' ),
953+
__( 'Please be aware that multiple feeds, when mashed together, may sometimes not work as expected as explained %1$shere%2$s.', 'feedzy-rss-feeds' ),
954954
'<a href="' . esc_url( 'https://simplepie.org/wiki/faq/typical_multifeed_gotchas' ) . '" target="_blank">',
955955
'</a>'
956956
)

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

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ public function upsell_content( $content, $area, $location ) {
105105
<div class="only-pro-content">
106106
<div class="only-pro-container">
107107
<div class="only-pro-inner upgrade-alert">
108-
' . __( 'This feature is available in the Pro version. Unlock more features, by', 'feedzy-rss-feeds' ) . '
109-
<a target="_blank" href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, $area, $location ) ) ) . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '</a>
108+
' . sprintf(
109+
// translators: %1$s and %2$s are HTML tags for the link to the upsell URL.
110+
__( 'This feature is available in the Pro version. Unlock more features, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ),
111+
'<a target="_blank" href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, $area, $location ) ) ) . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">',
112+
'</a>'
113+
) . '
110114
</div>
111115
</div>
112116
</div>';
@@ -434,9 +438,18 @@ public function feedzy_import_feed_options() {
434438
'posts_per_page' => 100,
435439
);
436440
$feed_categories = get_posts( $args );
437-
$post_types = get_post_types( '', 'names' );
438-
$post_types = array_diff( $post_types, array( 'feedzy_imports', 'feedzy_categories' ) );
439-
$published_status = array( 'publish', 'draft' );
441+
$post_types = get_post_types( '', 'object' );
442+
$post_types = array_diff_key(
443+
$post_types,
444+
array(
445+
'feedzy_imports' => array(),
446+
'feedzy_categories' => array(),
447+
)
448+
);
449+
$published_status = array(
450+
'publish' => __( 'Publish', 'feedzy-rss-feeds' ),
451+
'draft' => __( 'Draft', 'feedzy-rss-feeds' ),
452+
);
440453

441454
$authors = get_users( array( 'number' => 100 ) );
442455
$authors_array = array();
@@ -929,11 +942,27 @@ public function manage_feedzy_import_columns( $column, $post_id ) {
929942
$then = new DateTime();
930943
$then = $then->setTimestamp( $last );
931944
$in = $now->diff( $then );
932-
$msg = sprintf(
933-
// translators: %1$d: number of hours, %2$d: number of minutes.
934-
__( 'Ran %1$d hours %2$d minutes ago', 'feedzy-rss-feeds' ),
935-
$in->format( '%h' ),
936-
$in->format( '%i' )
945+
946+
$hours = (int) $in->format( '%h' );
947+
$minutes = (int) $in->format( '%i' );
948+
949+
$hours_text = sprintf(
950+
// translators: %d: number of hours.
951+
_n( '%d hour', '%d hours', $hours, 'feedzy-rss-feeds' ),
952+
$hours
953+
);
954+
955+
$minutes_text = sprintf(
956+
// translators: %d: number of minutes.
957+
_n( '%d minute', '%d minutes', $minutes, 'feedzy-rss-feeds' ),
958+
$minutes
959+
);
960+
961+
$msg = sprintf(
962+
// translators: %1$s: hours text, %2$s: minutes text.
963+
__( 'Ran %1$s %2$s ago', 'feedzy-rss-feeds' ),
964+
$hours_text,
965+
$minutes_text
937966
);
938967
}
939968

@@ -2724,7 +2753,12 @@ function ( $term ) {
27242753
Feedzy_Rss_Feeds_Log::error(
27252754
sprintf(
27262755
// translators: %1$d is the number of items without images, %2$d is the total number of items imported.
2727-
__( 'Unable to find an image for %1$d out of %2$d items imported', 'feedzy-rss-feeds' ),
2756+
_n(
2757+
'Unable to find an image for %1$d out of %2$d item imported',
2758+
'Unable to find an image for %1$d out of %2$d items imported',
2759+
$count,
2760+
'feedzy-rss-feeds'
2761+
),
27282762
$import_image_errors,
27292763
$count
27302764
),
@@ -3663,7 +3697,11 @@ public function add_import_actions( $actions, $post ) {
36633697
} elseif ( 1 === intval( get_post_meta( $post->ID, 'feedzy', true ) ) ) {
36643698
// show an unclickable action that mentions that it is imported by us so that users are aware.
36653699
$feedzy_job_id = get_post_meta( $post->ID, 'feedzy_job', true );
3666-
$actions['feedzy'] = sprintf( '(%s %s)', __( 'Imported by Feedzy from', 'feedzy-rss-feeds' ), get_the_title( $feedzy_job_id ) );
3700+
$actions['feedzy'] = sprintf(
3701+
// translators: %s is the title of job.
3702+
__( 'Imported by Feedzy from %s', 'feedzy-rss-feeds' ),
3703+
get_the_title( $feedzy_job_id )
3704+
);
36673705
}
36683706

36693707
return $actions;

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

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,17 @@ public static function get_form_defaults() {
9090
*/
9191
public static function get_form_elements() {
9292
$meta = sprintf(
93-
// translators: 1: <code> tag for author, 2: closing </code> tag, 3: <code> tag for date, 4: closing </code> tag, 5: <code> tag for time, 6: closing </code> tag, 7: <a> tag for documentation link, 8: closing </a> tag.
94-
__( 'Should we display additional meta fields out of %1$s author %2$s, %3$s date %4$s and %5$s time %6$s? (comma-separated list, in order of display). View documentation %7$s here %8$s.', 'feedzy-rss-feeds' ),
95-
'<code>',
96-
'</code>',
97-
'<code>',
98-
'</code>',
93+
// translators: 1: <code> tag for author, 2: closing </code> tag, 3: <a> tag for documentation link, 4: closing </a> tag.
94+
__( 'Should we display additional meta fields out of %1$sauthor%2$s, %3$sdate%4$s and %5$stime%6$s? (comma-separated list, in order of display). View documentation %3$shere%4$s.', 'feedzy-rss-feeds' ),
9995
'<code>',
10096
'</code>',
10197
'<a href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '" target="_new">',
10298
'</a>'
10399
);
104100
if ( has_filter( 'feedzy_retrieve_categories' ) ) {
105101
$meta = sprintf(
106-
// translators: 1: <code> tag for author, 2: closing </code> tag, 3: <code> tag for date, 4: closing </code> tag, 5: <code> tag for time, 6: closing </code> tag, 7: <code> tag for categories, 8: closing </code> tag, 9: <a> tag for documentation link, 10: closing </a> tag.
107-
__( 'Should we display additional meta fields out of %1$s author%2$s, %3$s date%4$s, %5$s time %6$s and %7$s categories %8$s? (comma-separated list). View documentation %9$s here %10$s.', 'feedzy-rss-feeds' ),
108-
'<code>',
109-
'</code>',
110-
'<code>',
111-
'</code>',
112-
'<code>',
113-
'</code>',
102+
// translators: %1$s is <code> tag, %2$s is closing </code> tag, %3$s is <a> tag for documentation link, %4$s: closing </a> tag.
103+
__( 'Should we display additional meta fields out of %1$sauthor%2$s, %1$sdate%2$s, %1$stime%2$s and %1$scategories%2$s? (comma-separated list). View documentation %3$shere%4$s.', 'feedzy-rss-feeds' ),
114104
'<code>',
115105
'</code>',
116106
'<a href="' . esc_url( 'https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed' ) . '" target="_new">',
@@ -120,7 +110,7 @@ public static function get_form_elements() {
120110

121111
$multiple = sprintf(
122112
// translators: 1: <code> tag for source, 2: closing </code> tag.
123-
__( 'When using multiple sources, should we display additional meta fields? %1$s source %2$s (feed title).', 'feedzy-rss-feeds' ),
113+
__( 'When using multiple sources, should we display additional meta fields?%1$ssource%2$s(feed title).', 'feedzy-rss-feeds' ),
124114
'<code>',
125115
'</code>'
126116
);
@@ -134,7 +124,7 @@ public static function get_form_elements() {
134124
__( 'The feed(s) URL (comma-separated list).', 'feedzy-rss-feeds' ) . ' ' .
135125
sprintf(
136126
// translators: 1: <a> tag opening, 2: </a> tag closing.
137-
__( 'Click %1$s here %2$s to check if feed is valid.', 'feedzy-rss-feeds' ),
127+
__( 'Click %1$shere%2$s to check if feed is valid.', 'feedzy-rss-feeds' ),
138128
'<a href="' . esc_url( 'https://validator.w3.org/feed/' ) . '" target="_new">',
139129
'</a>'
140130
)
@@ -484,12 +474,12 @@ public static function get_form_elements() {
484474
),
485475
'section_pro' => array(
486476
'title' => __( 'PRO Options', 'feedzy-rss-feeds' ),
487-
'description' => __( 'Get access to more options and customizations with full version of Feedzy RSS Feeds . Use existing templates or extend them and make them your own.', 'feedzy-rss-feeds' ) . '<br/><a href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'sectionpro' ) ) ) . '" target="_blank"><small>' . __( 'See more features of Feedzy RSS Feeds PRO', 'feedzy-rss-feeds' ) . '</small></a>',
477+
'description' => __( 'Get access to more options and customizations with full version of Feedzy RSS Feeds. Use existing templates or extend them and make them your own.', 'feedzy-rss-feeds' ) . '<br/><a href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'sectionpro' ) ) ) . '" target="_blank"><small>' . __( 'See more features of Feedzy RSS Feeds PRO', 'feedzy-rss-feeds' ) . '</small></a>',
488478
'elements' => array(
489479
'price' => array(
490480
'label' => sprintf(
491481
// translators: 1: <br/> tag, 2: <a> tag opening, 3: </a> tag closing.
492-
__( 'Should we display the price from the feed if it is available? %1$s You can read about how to extract price from a custom tag %2$s here %3$s', 'feedzy-rss-feeds' ),
482+
__( 'Should we display the price from the feed if it is available?%1$sYou can read about how to extract price from a custom tag %2$shere%3$s', 'feedzy-rss-feeds' ),
493483
'<br/>',
494484
'<a href="' . esc_url( 'https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy' ) . '" target="_blank">',
495485
'</a>'
@@ -511,7 +501,7 @@ public static function get_form_elements() {
511501
'referral_url' => array(
512502
'label' => sprintf(
513503
// translators: 1: <a> tag opening, 2: </a> tag closing.
514-
__( 'Referral URL parameters as per %1$s this document here %2$s', 'feedzy-rss-feeds' ),
504+
__( 'Referral URL parameters as per %1$sthis document here%2$s', 'feedzy-rss-feeds' ),
515505
'<a href="' . esc_url( 'https://docs.themeisle.com/article/1073-how-to-add-referral-parameters-in-feedzy' ) . '" target="_blank">',
516506
'</a>'
517507
),
@@ -531,7 +521,7 @@ public static function get_form_elements() {
531521
'mapping' => array(
532522
'label' => sprintf(
533523
// translators: 1: <a> tag opening, 2: </a> tag closing.
534-
__( 'Provide mapping for custom feed elements as per %1$s this document here %2$s. This will only work for single feeds, not comma-separated feeds.', 'feedzy-rss-feeds' ),
524+
__( 'Provide mapping for custom feed elements as per %1$sthis document here%2$s. This will only work for single feeds, not comma-separated feeds.', 'feedzy-rss-feeds' ),
535525
'<a href="' . esc_url( 'https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy' ) . '" target="_blank">',
536526
'</a>'
537527
),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function feedzy_import_post_title_section() {
238238

239239
$content = __( 'You are using Feedzy Lite.', 'feedzy-rss-feeds' ) . ' ';
240240
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
241-
$content .= wp_sprintf( __( 'Unlock more powerful features, by %1$s upgrading to Feedzy Pro %2$s and get 50%% off.', 'feedzy-rss-feeds' ), '<a href="' . esc_url( $upgrade_url ) . '" target="_blank">', '</a>' );
241+
$content .= wp_sprintf( __( 'Unlock more powerful features, by %1$supgrading to Feedzy Pro%2$s and get 50%% off.', 'feedzy-rss-feeds' ), '<a href="' . esc_url( $upgrade_url ) . '" target="_blank">', '</a>' );
242242

243243
echo wp_kses_post( $content );
244244
?>

includes/elementor/widgets/register-widget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
106106
'type' => Controls_Manager::TEXTAREA,
107107
'description' => wp_sprintf(
108108
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
109-
__( 'You can add multiple sources at once, by separating them with commas. %1$s Click here %2$s to check if the feed is valid. Invalid feeds may not import anything.', 'feedzy-rss-feeds' ),
109+
__( 'You can add multiple sources at once, by separating them with commas. %1$sClick here%2$s to check if the feed is valid. Invalid feeds may not import anything.', 'feedzy-rss-feeds' ),
110110
'<a href="' . esc_url( 'https://validator.w3.org/feed/' ) . '" class="feedzy-source" target="_blank">',
111111
'</a>'
112112
),
@@ -505,7 +505,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
505505
'description' => wp_sprintf(
506506
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
507507
__(
508-
'Learn more about this feature in %1$s Feedzy docs %2$s .',
508+
'Learn more about this feature in %1$sFeedzy docs%2$s.',
509509
'feedzy-rss-feeds'
510510
),
511511
'<a target="_blank" href="' . esc_url( 'https://docs.themeisle.com/article/923-how-price-is-displayed-from-the-feed' ) . '">',
@@ -572,7 +572,7 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl
572572
! feedzy_is_pro() ?
573573
wp_sprintf(
574574
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
575-
__( 'Unlock this feature and more advanced options with %1$s Feedzy Pro %1$s.', 'feedzy-rss-feeds' ),
575+
__( 'Unlock this feature and more advanced options with %1$sFeedzy Pro%2$s.', 'feedzy-rss-feeds' ),
576576
'<a target="_blank" href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'refferal', 'widget-area' ) ) ) . '">',
577577
'</a>'
578578
)

includes/layouts/feedzy-improve.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<h3 class="h3 pb-16"><?php esc_html_e( 'Answer a few questions to help us improve Feedzy', 'feedzy-rss-feeds' ); ?></h3>
99
<p>
1010
<?php
11-
esc_html_e( 'We\'re always looking for suggestions to further improve Feedzy.', 'feedzy-rss-feeds' );
1211
if ( ! feedzy_is_pro() ) {
13-
esc_html_e( 'If your feedback is especially helpful and we choose to do an interview with you to discuss your suggestions, you will even gain a yearly membership for free for your trouble.', 'feedzy-rss-feeds' );
12+
esc_html_e( 'We\'re always looking for suggestions to further improve Feedzy. If your feedback is especially helpful and we choose to do an interview with you to discuss your suggestions, you will even gain a yearly membership for free for your trouble.', 'feedzy-rss-feeds' );
13+
} else {
14+
esc_html_e( 'We\'re always looking for suggestions to further improve Feedzy.', 'feedzy-rss-feeds' );
1415
}
1516
?>
1617
</p>

0 commit comments

Comments
 (0)