From 66f8b900c498fda147718d9cf780fb4e108e8ffe Mon Sep 17 00:00:00 2001 From: Alex Lion Date: Fri, 14 Feb 2025 11:14:09 -0800 Subject: [PATCH] Improve I18N Issues Based on 1.7.0 --- admin/bsf-analytics/class-bsf-analytics.php | 2 +- admin/index.php | 56 ++++++++++----------- functions.php | 10 ++-- index.php | 6 +-- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/admin/bsf-analytics/class-bsf-analytics.php b/admin/bsf-analytics/class-bsf-analytics.php index b3ce8e1..46424e9 100644 --- a/admin/bsf-analytics/class-bsf-analytics.php +++ b/admin/bsf-analytics/class-bsf-analytics.php @@ -208,7 +208,7 @@ public function option_notice() { } /* translators: %s product name */ - $notice_string = __( 'Want to help make %1s even more awesome? Allow us to collect non-sensitive diagnostic data and usage information. ', 'all-in-one-schemaorg-rich-snippets' ); + $notice_string = wp_kses_post(__( 'Want to help make %s even more awesome? Allow us to collect non-sensitive diagnostic data and usage information. ', 'all-in-one-schemaorg-rich-snippets' )); if ( is_multisite() ) { $notice_string .= __( 'This will be applicable for all sites from the network.', 'all-in-one-schemaorg-rich-snippets' ); diff --git a/admin/index.php b/admin/index.php index 78999e8..7340cae 100644 --- a/admin/index.php +++ b/admin/index.php @@ -106,7 +106,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Item Review', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -147,7 +147,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Events', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -196,7 +196,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Person', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -245,7 +245,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Product', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -294,7 +294,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -351,7 +351,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -402,7 +402,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Video', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -443,7 +443,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Article', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -492,7 +492,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Service', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -742,46 +742,46 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'Where can I test my schema markup implementation?', 'all-in-one-schemaorg-rich-snippets' ) . '

' . esc_html__( 'You can use the standard Google Structured Data Testing Tool to test your schema markup implementation. You can also take a look at the preview of how your search result might look.', 'all-in-one-schemaorg-rich-snippets' ) . ' Click Here.

- +

' . esc_html__( 'Do I have to fill in all the details?', 'all-in-one-schemaorg-rich-snippets' ) . '

' . esc_html__( 'No. But, every schema type has some fields that HAVE to be filled as stated by Google. Therefore, it is recommended to fill these required fields in the schema markup you are implementing.', 'all-in-one-schemaorg-rich-snippets' ) . '

- +

' . esc_html__( 'Why does the plugin create extra content in the frontend? Can I hide it?', 'all-in-one-schemaorg-rich-snippets' ) . '

-

We understand that you don't like the content that gets displayed on your page / post. However, as per the strong recommendation of Google, MicroData should be clearly visible to the user.

-

Here is a reference link of what Google says. https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display

-

If you still do not want your schema markup to affect your frontend design, you can use Schema Pro - our advanced Schema markup plugin that is built with the latest JSON- LD technology which does not require a content box to be displayed on the front-end.

+

' . esc_html__( 'We understand that you don\'t like the content that gets displayed on your page / post. However, as per the strong recommendation of Google, MicroData should be clearly visible to the user.', 'all-in-one-schemaorg-rich-snippets' ) . '

+

' . esc_html__('Here is a reference link of what Google says: ', 'all-in-one-schemaorg-rich-snippets') . ' https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets#display

+

' . sprintf(esc_html__( 'If you still do not want your schema markup to affect your frontend design, you can use %1$sSchema Pro%2$s - our advanced Schema markup plugin that is built with the latest JSON-LD technology which does not require a content box to be displayed on the front-end.', 'all-in-one-schemaorg-rich-snippets' ),'','') . '

- +

' . esc_html__( 'Does the plugin work with other plugins like WordPress SEO, WooCommerce, etc?', 'all-in-one-schemaorg-rich-snippets' ) . '

-

Well, the plugin works perfectly with most of the other plugins as the only thing "All in One Schema.org Rich Snippets" does is - it gives you power to add Rich Snippets MicroData to your pages and posts easily.

If you come across a conflict with any other plugin, please do not hesitate to report an issue.

+

' . esc_html__( 'Well, the plugin works perfectly with most of the other plugins as the only thing "All in One Schema.org Rich Snippets" does is - it gives you power to add Rich Snippets MicroData to your pages and posts easily.', 'all-in-one-schemaorg-rich-snippets' ) . '

' . esc_html__( 'If you come across a conflict with any other plugin, please do not hesitate to report an issue.', 'all-in-one-schemaorg-rich-snippets', 'all-in-one-schemaorg-rich-snippets' ) . '

- +

' . esc_html__( 'How long will it take to show up rich snippets for my search results?', 'all-in-one-schemaorg-rich-snippets' ) . '

-

We cannot assure the time it will take to display a rich snippet for your search results. This is completely dependent on when your website is crawled by the search engine. However, there are many more factors, such as your website authority that contribute to the time taken for your website to be crawled and a rich snippet displayed.

-

If rich snippets are not appearing in your search results as of yet, most probably they might start appearing as soon as Google or other search engines find your website more authoritative.

-

Meanwhile - you can validate and see the preview of your rich snippets on [ Google Structured Data Testing Tool ] .

+

' . esc_html__( 'We cannot assure the time it will take to display a rich snippet for your search results. This is completely dependent on when your website is crawled by the search engine. However, there are many more factors, such as your website authority that contribute to the time taken for your website to be crawled and a rich snippet displayed.', 'all-in-one-schemaorg-rich-snippets' ) . '

+

' . esc_html__( 'If rich snippets are not appearing in your search results as of yet, most probably they might start appearing as soon as Google or other search engines find your website more authoritative.', 'all-in-one-schemaorg-rich-snippets' ) . '

+

' . sprintf(esc_html__( 'Meanwhile - you can validate and see the preview of your rich snippets on %1$s[ Google Structured Data Testing Tool ]%2$s.', 'all-in-one-schemaorg-rich-snippets' ),'','') . '

- +

' . esc_html__( "I don't see the feature I want. How can I get it?", 'all-in-one-schemaorg-rich-snippets' ) . '

' . wp_kses_post( __( "Get in touch with us to ask if this feature is in our development roadmap. If it is not in our roadmap, and if you still think this feature would make the plugin better, we have a couple of options for you:", 'all-in-one-schemaorg-rich-snippets' ) ) . '

@@ -801,7 +801,7 @@ function rich_snippet_dashboard() {
- +

' . wp_kses_post( __( 'Customize the look and feel of rich snippet box', 'all-in-one-schemaorg-rich-snippets' ) ) //phpcs:ignore WordPress.WP.I18n.NoHtmlWrappedStrings . '

@@ -830,7 +830,7 @@ function rich_snippet_dashboard() { -    ' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . ' +    ' . esc_html__( 'Reset ', 'all-in-one-schemaorg-rich-snippets' ) . ' @@ -850,7 +850,7 @@ function rich_snippet_dashboard() {
- +

' . esc_html__( 'WooCommerce Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -860,7 +860,7 @@ function rich_snippet_dashboard() { - + @@ -1250,7 +1250,7 @@ function get_support() { $html = '
- +

' . esc_html__( 'Get in touch with the Plugin Developers', 'all-in-one-schemaorg-rich-snippets' ) . '

@@ -1278,7 +1278,7 @@ function get_support() { - +
diff --git a/functions.php b/functions.php index 98a8ec2..d2ce34b 100644 --- a/functions.php +++ b/functions.php @@ -1397,14 +1397,14 @@ function show_nps_notice() { 'message' => array( // Step 1 i.e rating input. 'logo' => esc_url( plugins_url( 'admin/images/icon_32.png', __FILE__ ) ), - 'plugin_name' => __( 'All In One Schema Rich Snippets', 'rich-snippets' ), - 'nps_rating_message' => __( 'How likely are you to recommend All In One Schema Rich Snippets to your friends or colleagues?', 'rich-snippets' ), + 'plugin_name' => __( 'All In One Schema Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ), + 'nps_rating_message' => __( 'How likely are you to recommend All In One Schema Rich Snippets to your friends or colleagues?', 'all-in-one-schemaorg-rich-snippets' ), // Step 2A i.e. positive. - 'feedback_content' => __( 'Could you please do us a favor and give us a 5-star rating on Wordpress? It would help others choose All In One Schema Rich Snippets with confidence. Thank you!', 'rich-snippets' ), + 'feedback_content' => __( 'Could you please do us a favor and give us a 5-star rating on Wordpress? It would help others choose All In One Schema Rich Snippets with confidence. Thank you!', 'all-in-one-schemaorg-rich-snippets' ), 'plugin_rating_link' => esc_url( 'https://wordpress.org/support/plugin/all-in-one-schemaorg-rich-snippets/reviews/#new-post' ), // Step 2B i.e. negative. - 'plugin_rating_title' => __( 'Thank you for your feedback', 'rich-snippets' ), - 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'rich-snippets' ), + 'plugin_rating_title' => __( 'Thank you for your feedback', 'all-in-one-schemaorg-rich-snippets' ), + 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'all-in-one-schemaorg-rich-snippets' ), ), ) ); diff --git a/index.php b/index.php index 38eae00..a0f3c31 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ * Author URI: https://www.brainstormforce.com * Description: Welcome to the Schema - All In One Schema Rich Snippets! You can now easily add schema markup on various * pages and posts of your website. Implement schema types such as Review, Events, Recipes, Article, Products, Services * *etc. * Version: 1.7.0 - * Text Domain: rich-snippets + * Text Domain: all-in-one-schemaorg-rich-snippets * License: GPL2 * * @package AIOSRS. @@ -95,7 +95,7 @@ public function aiosrs_admin_bar() { */ public function register_custom_menu_page() { require_once plugin_dir_path( __FILE__ ) . 'admin/index.php'; - $page = add_menu_page( 'All in One Rich Snippets Dashboard', 'Rich Snippets', 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div' ); + $page = add_menu_page( __( 'All in One Rich Snippets Dashboard', 'all-in-one-schemaorg-rich-snippets' ), __( 'Rich Snippets', 'all-in-one-schemaorg-rich-snippets' ), 'administrator', 'rich_snippet_dashboard', 'rich_snippet_dashboard', 'div' ); // Call the function to print the stylesheets and javascripts in only this plugins admin area. add_action( 'admin_print_styles-' . $page, 'bsf_admin_styles' ); add_action( 'admin_print_scripts-' . $page, array( $this, 'iris_enqueue_scripts' ) ); @@ -208,7 +208,7 @@ public function star_icons() { */ public function rich_snippet_translation() { // Load Translation File. - load_plugin_textdomain( 'rich-snippets', false, basename( dirname( __FILE__ ) ) . '/lang/' ); + load_plugin_textdomain( 'all-in-one-schemaorg-rich-snippets', false, basename( dirname( __FILE__ ) ) . '/lang/' ); } /** * Register_bsf_settings.