• ResolvedPlugin Support Thu P. a11n

    (@thup90)


    The strings “Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our…” and “Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our…” would not translate in Loco Translate or WPML after the translations have been provided. Please help!

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

Viewing 8 replies - 16 through 23 (of 23 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @maxgx,

    Would you be able to share a url where I could check the issue out?

    It sort of does sound like a caching issue at first, also what language is set in WordPress for the site? I can attempt to recreate this myself and see what we find.

    Thanks!

    I don’t know what was added in the last or second to last update, but now it’s half fixed:
    – The privacy policy text does appear in the String Translation menu of WPML, so I can translate it.
    – The terms and conditions text does NOT appear, so I cannot translate.

    All this time I’m using WPML with the Enfold theme.

    Will Brubaker

    (@willthewebmechanic)

    Automattic Happiness Engineer

    I don’t know what was added in the last or second to last update

    Here are the changes: https://github.com/woocommerce/woocommerce/commit/2f8f30cd29ceea5a291f41eed3925a4629bb24c4#diff-196233fcc5c2e94e61150768cae11ff4

    The terms and conditions text does NOT appear, so I cannot translate.

    As you can see in the changeset, the same changes were applied to that as the one that you are able to see.

    I think it’s coming from the Accounts and Privacy page. I mean, why doesn’t the Terms and Conditions text appear in that page and only in the Customizer? The Privacy text does appear in that page, so probably if T&C was also added, it would appear in the WPML string translation, no?

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    Trying to clear up confusion about the privacy policy strings and their translations. These strings are translatable, however, they are also stored in the database. This means that if the translation was not in place at the time of upgrade, the values stored in the database are going to be in English. The strings can then be modified under WooCommerce > Settings > Accounts & Privacy.

    The wc_get_privacy_policy_text() function is what calls these string into action for display. As can be seen, the get_option() WordPress function is used. This means that whatever is in the database is what is going to be displayed. The translatable strings here exist only if the options are not found, this will not translate what is being pulled from the database.

    For single language sites, you must translate the strings at WooCommerce > Settings > Accounts & Privacy , and it is recommended to have the same translation in your .po file.

    For multi-language sites, such as those using WPML, the plugin that is doing the multiple languages will need to make use of the filter that returns the strings in the above linked function.

    sorry for the delay in replying, but i’ve successfully managed to translate WooCommerce default strings in the site default language using WPML.

    the issue was that WC strings had been assigned the default site language (not EN).

    using WPML->Strings Translation, i searched for a part of the string (“other purposes described in our”) and found 2 results, the WC strings, but flagged as non-EN.

    at the bottom of the list of results, WPML provides a tool to change the string language – i reverted them back to EN.

    i was then able to add a translation to both.

    a screenshot is available here

    Plugin Support Thu P. a11n

    (@thup90)

    Thank you! I experience no more of this issue!

    Hi!

    So I had to “rape” the woocommerce translation a little bit, because I couldn’t figured out how it works as @jessi wrote… So, I wrote a snippet (use Snippets plugin to is, don not hack the plugin or theme, or functions.php because further releases could overwrite).

    Create a new snippet, which is show only on frontend, then add that snippet into the text editor:

    function gdpr_blahblah( $atts ){
    	return __('Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our <a href="#put_your_policy_url_here">Privacy Policy</a>.', 'woocommerce'); 
    }
    add_shortcode( 'gdpr_blahblah', 'gdpr_blahblah' );

    Then save and activate, and go to the WPML page, and find the string in String translation list, and do translate.

    Then go to Woocommerce > Settings > Account & Privacy and change the GDRP text to [gdpr_blahblah] – name it as you wish – shortcode.

    It solved to me the gdpr text problem.

    Cheers.

    • This reply was modified 6 years, 1 month ago by tzs007.
Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘New strings “Your Your personal data will be used…” don’t translate’ is closed to new replies.