• Resolved Agent 3W

    (@agent3w)


    Hello,

    using Cart block and Checkout Block, I can’t translate to french “Add a coupon”.

    I didn’t find this string in translations files (.json).

    I found in this file : assets/js/base/components/cart-checkout/totals/coupon/index.tsx some strings like this : __( 'Add a coupon', 'woo-gutenberg-products-block' )

    So I added a function on hook gettext to force translation to “Ajouter un code promo”. But it doesn’t work.

    How can I translate this string ? all other strings in this block seems to be translated.

    Thank you.
    Joffrey

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

    (@babylon1999)

    Hello @agent3w,

    The “Add coupon” link should be translated by default as you can see here, but I can confirm your findings on my test site as well.

    At the time being you can switch the text using JavaScript with the Simple Custom CSS and JS plugin.

    You can copy&paste the snippet below, make sure to stick with these settings.

    function updateCouponLink() {
      document.querySelector('.wc-block-components-totals-coupon-link').textContent = 'Ajouter un code promoa';
    }
    window.addEventListener('load', updateCouponLink);
    

    I also made a GitHub report about this here, I invite you to check for updates about this in the comments.

    Hope this helps!

    Thread Starter Agent 3W

    (@agent3w)

    Thank you Saif ??

    Hope this will be fixed in one of next updates ??

    Best regards.
    Joffrey

    Hi @agent3w

    Unfortunately, there is no ETA on a solution that I can provide at this time. Though I can assure you that issues are addressed as quickly as possible based on our development team’s current workload and the severity of the issue when compared to the severity of other open issues.

    Thanks!

    Plugin Author Raluca

    (@ralucastn)

    Hi @agent3w,

    the issues has been fixed in the meantime. Thank you for taking the time to report it.

    Hey! I see this was fixed for the supported language, but I’m struggling to translate “Add a coupon” to Slovak language through Loco.

    It’s not in the source of “woocommerce-sk_SK.po”.

    Or should I be looking somewhere else?

    I’d appreciate any guidance, thanks!

    Michal

    Hi @michaluhnak

    Thanks for reaching out!

    I understand you are experiencing the same issue and since every site is different and you’re not the person who originally started this topic then, per the forum guidelines, would you please start your own topic?

    Additionally, please include your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Once you’ve created a new forum topic, you can include the contents of your SSR and logs within your message on that forum topic.

    We’ll be more than happy to help there ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translate : Add a coupon’ is closed to new replies.