• Hi @shandelierrr,

    Below 2 minor Privacy Policy Guide bugs. Please pass these on to your developers.

    1. The title (plugin name) of the added privacy policy is not translated on the Privacy Policy Guide page.
    2. The title (plugin name) of the added privacy policy does not distinguish between free/pro plugin on the Privacy Policy Guide page.
    Basically it always shows “iThemes Security”.

    To fix these issues replace the admin_init() method with the code below in the core/modules/privacy/class-itsec-privacy.php file:

    public function admin_init() {
    	if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
    		$plugin_name = ITSEC_Core::get_plugin_name();
    		$domain = ITSEC_Core::is_pro()?'it-l10n-ithemes-security-pro':'better-wp-security';
    
    		wp_add_privacy_policy_content( translate( $plugin_name, $domain ), $this->get_privacy_policy_content() );
    	}
    }

    Note it is perfectly ok to use the translate() function (instead of eg __()) with strings (like plugin name) that are included in the headers of the main plugin file.

    • This topic was modified 2 years, 4 months ago by nlpro.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @nlpro, thank you for bringing this to our attention. I have submitted your report to our developer and will update you when I receive feedback.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @nlpro, thank you for patiently waiting. I have confirmed with our developers that:
    1. The plugin name is intentionally not translated.
    2. The privacy policy also intentionally uses just iThemes Security instead of differentiating between the free/pro plugins.

    I hope this helps!

    Thread Starter nlpro

    (@nlpro)

    Hi @shanedelierrr,

    Ok well, then your developers are doing it intentionally wrong;-)

    1. I have to admit that when looking up the wp_add_privacy_policy_content() function in the online Code Reference, I noticed there is no mentioning of (optionally) translating the $plugin_name parameter.
    But WordPress core does it (#699 in wp_admin/includes/class-wp-privacy-policy-content.php), and so do other plugins.
    When a plugin provides/implements l10n/translation it makes sense (to me) to do so consistently.

    2. It’s a choice. Still think it’s better to use a (plugin name) title that matches an installed plugin name. Also the privacy policy content does differentiate between free/pro.

    Thread Starter nlpro

    (@nlpro)

    @timothyblynjacobs

    Another one (Pro only):

    The title (widget name) of the iTSec Pro dashboard widget metabox is not translatable on the WordPress main Dashboard page.
    (Oddly, or should I say inconsistantly, the right plugin name is being used here…).

    ALL WordPress core metabox titles (on the same page) are translatable.

    A translation is provided by passing a translated $widget_name parameter value to the WordPress core wp_add_dashboard_widget() function. But again, I must admit, there is no mention of (optionally) translating the $widget_name parameter in the online Code Reference.

    Thread Starter nlpro

    (@nlpro)

    Another one (plugin name related):

    FWIW it would make sense to use the right plugin name in the <h1> tag of the Grade Report page (show_grade_report() function in the ithemes-security-pro/pro/grade-report/admin-page/page.php file). Luckily, here it does get translated ??

    AFAIK Grade Report is a Pro only feature …

    Thread Starter nlpro

    (@nlpro)

    Hi @shanedelierrr,

    Circulating back to the wp_add_privacy_policy_content() #1 issue.

    A similar issue was accepted as a bug and fixed in the Twenty Twenty One theme (v1.6 release). Read all about it in this trac ticket.

    As you can see I’m doing my best to come up with good arguments. But this somehow seems to have turned into a one way discussion. Anyway, kindly point your developers to the above ??

    If your developers stick to their choice. Perhaps this is more a debate whether the plugin product name string should be translatable in a plugin or not.
    If iThemes developers (/product managers) opinion is it should not be translatable, then for consistancy’s sake please make it non translatable throughout the plugin …

    Currently there are some occurrences of:

    __( 'iThemes Security', 'better-wp-security' );

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @nlpro, thank you for the updates. I’ll be sure to forward these to our developers and update you once I receive feedback.

    Thread Starter nlpro

    (@nlpro)

    Hi @shanedelierrr,

    Since the Grade Report feature has now been removed I guess the Grade-Report-plugin-name thingy is a thing of the past. Creative solution ??

    But it is awfully silent as to the other issues raised in this topic…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin name/translation bug in Privacy Policy Guide’ is closed to new replies.