• Resolved Javier Barrón

    (@javierbarron)


    Hello,

    I was trying to translate my website and I found that the “Cookie policy” tab title of my french version was trasnlated as “Cookies tiers”, wich means “3rd Party Cookies”.

    I looked into gdpr-cookie-compliance-fr_FR.po and everything was fine.

    After that, I looked into class-gdpr-modules.php and I found that the code for the $tab_title was the same in “GDPR Module – Third Party Cookies” and “GDPR Module – Cookie Policy Page” sections:

    $tab_title = isset( $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] ) && $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] ? $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] : __( ‘3rd Party Cookies’, ‘gdpr-cookie-compliance’ );

    I changed ‘3rd Party Cookies’ by ‘Cookie Policy’ in the “GDPR Module – Cookie Policy Page” section and now everything is fine.

    It seems to be a bug.

    If you could fix it before your next update, it would be nice.

    Thank you in advance.

    Best regards,

    Javier

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @javierbarron,

    Thanks for using our plugins.

    We have checked the plugin and no issues were found. Our module controller creates the objects and this data will be provided to our view controller. This is why you find $tab_title variable for each template part in ‘gdpr-modules’ folder.
    The Cookie Policy template part is located in gdpr-modules/modal/content-sections/cookiepolicy.php, you can create a folder in your active theme with name ‘gdpr-modules’ with all the directories in order to customise the cookiepolicy.php file.

    Hope this makes sense.

    Thread Starter Javier Barrón

    (@javierbarron)

    Hi @mooveagency,

    Thank you for your answer.

    Maybe my explanation was not good enough. I will try again.

    In GDPR Module – Advanced Cookies section of the class-gdpr-modules.php file we can read this code:

    $tab_title = isset( $modal_options[ ‘moove_gdpr_advanced_cookies_tab_title’ . $wpml_lang ] ) && $modal_options[ ‘moove_gdpr_advanced_cookies_tab_title’ . $wpml_lang ] ? $modal_options[ ‘moove_gdpr_advanced_cookies_tab_title’ . $wpml_lang ] : __( ‘Additional Cookies’, ‘gdpr-cookie-compliance’ );

    And we see that the text associated with the GDPR Module – Advanced Cookies section is ‘Additional Cookies’.

    In GDPR Module – Third Party Cookies section of the class-gdpr-modules.php file we can read this code:

    $tab_title = isset( $modal_options[ ‘moove_gdpr_performance_cookies_tab_title’ . $wpml_lang ] ) && $modal_options[ ‘moove_gdpr_performance_cookies_tab_title’ . $wpml_lang ] ? $modal_options[ ‘moove_gdpr_performance_cookies_tab_title’ . $wpml_lang ] : __( ‘3rd Party Cookies’, ‘gdpr-cookie-compliance’ );

    And we see that the text associated with the GDPR Module – Third Party Cookies section is ‘3rd Party Cookies’.

    Until now, everything seems logical and these are the texts used by gdpr-cookie-compliance-fr_FR.po file to find the translations in French.

    For example, in the case of the text ‘3rd Party Cookies’ the gdpr-cookie-compliance-fr_FR.po file give us ‘Cookie tiers’, as you can see in the code of the file:

    #: moove-modules.php:243 moove-modules.php:298 moove-modules.php:346
    #: views/moove/admin/settings/settings_page.php:94
    #: views/moove/admin/settings/third_party_cookies.php:66
    msgid “3rd Party Cookies”
    msgstr “Cookies tiers”

    So let’s have a look now to the code of GDPR Module – Cookie Policy Page section in the class-gdpr-modules.php file that give me problems:

    $tab_title = isset( $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] ) && $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] ? $modal_options[ ‘moove_gdpr_cookie_policy_tab_nav_label’ . $wpml_lang ] : __( ‘3rd Party Cookies’, ‘gdpr-cookie-compliance’ );

    We see that the text associated with the GDPR Module – Cookie Policy Page section is ‘3rd Party Cookies’ while I think it should have been ‘Cookie Policy’.

    As a result of this, in the French version of my website the tab title of Cookie Policy is translated by “Cookie tiers” by gdpr-cookie-compliance-fr_FR.po file, which is the French translation of “3rd Party Cookies”.

    To make the good translation, the gdpr-cookie-compliance-fr_FR.po file is expecting the ‘Cookie Policy’ text, as you can see in its code:

    #: moove-modules.php:354 views/moove/admin/settings/cookie_policy.php:45
    #: views/moove/admin/settings/settings_page.php:107
    msgid “Cookie Policy”
    msgstr “Politique de Cookies”

    As soon as I change the text “3rd Party Cookie” by “Cookie Policy” in the GDPR Module – Cookie Policy Page section of the class-gdpr-modules.php file, the problem is fixed.

    So, I believe the text should be changed in order to obtain the correct translations indicated in the gdpr-cookie-compliance-fr_FR.po file.

    I don’t really want to customize anything in my website. I think, that with this change in the the class-gdpr-modules.php file the tab title of the Cookie Policy tab will be correctly translated in any language having a .po file.

    Please, let me know if this makes any sense for you.

    Best regards,

    Javier Barrón

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @javierbarron,

    Thanks for the well-detailed report.
    You are right, the fallback string for Privacy title wasn’t updated. The issue will be fixed in our next release.

    Please note, this title is used as a fallback value, the default value in the options are loading properly, once you save the settings the correct title will be stored.

    The next version will be released soon.

    Thanks again for your contribution.

    Thread Starter Javier Barrón

    (@javierbarron)

    Hi @mooveagency,

    Thank you very much for your answer.

    I’m glad I was useful to you.

    Concerning your comment:

    “Please note, this title is used as a fallback value, the default value in the options are loading properly, once you save the settings the correct title will be stored.”.

    I agree, but is only true for a single language website.

    In my case, I have a bilingual website (Spanish/French). As the main language of my site is Spanish, there is no problem with Spanish version of the site. I indicate the correct title in the options and I don’t need the Spanish .po file.

    But for the French version, there is no possibility to change the tab title in the options. Then, I use WPML plugin to make the translation. WPML plugin finds most of the strings of your plugin texts and I can translate them. But, I don’t know why, it doesn’t find the string corresponding to the title of the “Policy Cookie” tab.

    So, I cannot change its value with WPML and I depend on the fall back value of the French .po file of your plugin.

    So, I am very happy to know you are planning to fix it in the next release.

    Thank you very much in advance.

    Best

    Javier Barrón

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @javierbarron,

    Please update your plugin to the latest version, the title and the POT file are updated.

    Thanks

    Thread Starter Javier Barrón

    (@javierbarron)

    Hi @mooveagency,

    Yes, I saw it the other day. I updated the plugin and everything is perfect now.

    Thank you very much for your support!!

    Best regards,

    Javier

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Bug in class-gdpr-modules.php in $tab_title’ is closed to new replies.