• Resolved rayuaz

    (@rayuaz)


    Hi. I’m using woocommerce blocks in my checkout page, and although there is a portuguese (brazilian) translation, it’s a really really bad one, so I want to change it. I tried translating it with loco translate, but it doesn’t work. I then did some googling, and found this thread, which states that:

    “When the translation percentage for a locale reaches 95% it then becomes available as a language pack for download by any WordPress site configured with that locale as it’s language”

    From what I understand, this means that the translation should be implemented automatically, which is why my checkout page is already (poorly) translated, right? But there are some translations that are not even in the translation project page, such as the “This is a required field” message, which is translated as “Preencha este campo”, which means “Fill this field”.

    My plan at the moment is to use javascript to detect when this badly translated message appears, and replace it, but I’m sure there must be a less hacky way to do it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Albert Juhé Lluveras

    (@aljullu)

    Hi there,

    Thanks for trying the Checkout block in your site. I will answer your questions below:

    I’m using woocommerce blocks in my checkout page, and although there is a portuguese (brazilian) translation, it’s a really really bad one, so I want to change it.

    If you see some translations that need to be improved, I would suggest submitting them directly to the Translate WordPress directory, this will allow others to benefit from your effort and will make sure the translations you submit are kept up-to-date.

    I tried translating it with loco translate, but it doesn’t work

    You are right, Loco Translate doesn’t support some of the strings in WooCommerce Blocks, so you can’t modify them specifically for your site. This has a technical reason: that plugin doesn’t pick up and/or translate these strings because it currently doesn’t support translating strings generated via using the WordPress JavaScript i18n API. You could try contacting the authors of that plugin and asking them to add support.

    From what I understand, this means that the translation should be implemented automatically, which is why my checkout page is already (poorly) translated, right?

    Portuguese (Brazil) translation is above 95%, so it’s available for all users that enable it. You can still make suggestions to the translation to improve it via the Translate WordPress directory.

    But there are some translations that are not even in the translation project page, such as the “This is a required field” message, which is translated as “Preencha este campo”, which means “Fill this field”.

    Just to confirm, you are referring to the error messages that appear below the input fields in the Checkout page? When possible, we use browser validation so some of those errors are automatically generated by the browser and it’s currently not possible to change those strings.

    Hope that helps!

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    – Joey

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to translate woocommerce blocks?’ is closed to new replies.