• Resolved Anonymous User 15528382

    (@anonymized-15528382)


    Seems that Stripe 4.0.0 bypass WP language and shows all checkout error notices in english.

    Also, some custom notices/errors are missing from checkout only if Stripe is activated.

    Tested on local and spanish, tell me if I can do any test or workaround.

    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor royho

    (@royho)

    Can you please provide some strings that are not translated? Also just to make sure you’re referring to Spain/Spanish?

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    Any error notice in checkout is translated, and if there is any custom notice added (custom fields validation on checkout) is not shown.

    Tested on italian language too.

    Billing first name cannot be empty
    Billing last name cannot be empty
    Billing address 1 cannot be empty
    Billing postcode cannot be empty
    Billing city cannot be empty
    Billing phone cannot be empty
    Billing email cannot be empty
    You must accept our Terms & Conditions.
    Plugin Contributor royho

    (@royho)

    Right the field names not translating is known however the string “cannot be empty” should be translated. Even the “You must accept…” should be translated as seen here https://translate.wordpress.org/projects/wp-plugins/woocommerce-gateway-stripe/stable/es/default?page=4

    I would suggest you switch your WP language to English and save, then switch it back to Spanish and save. See if that refreshes your language file.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    Thanks @royho, but if I disable Stripe and enable another payment method (BACS e.g.), all errors appears fully translated:

    Nombre es un campo requerido.
    Apellidos es un campo requerido.
    Dirección de la calle es un campo requerido.
    Localidad / Ciudad es un campo requerido.
    Provincia es un campo requerido.
    Código postal es un campo requerido.
    Teléfono móvil es un campo requerido.
    Correo electrónico es un campo requerido.
    Debes aceptar nuestros términos y condiciones.

    And if Stripe and another payment method are enabled at the same time, the translation error only occurs if Stripe is selected.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    Similar thing occurs for the custom notices. If there is any custom notice added (custom fields validation on checkout) is not shown when Stripe is selected.

    Plugin Contributor royho

    (@royho)

    Correct these errors are specific to Stripe. But as I said the other text other than the fields should indeed be translated. I don’t quite understand what you mean by “custom notice”. How are these added?

    • This reply was modified 6 years, 8 months ago by royho.
    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    These strings (First name, Last name, etc.) i see that are WooCommerce related and translated in WC language files, are used by all payment methods I used:
    https://translate.wordpress.org/projects/wp-plugins/woocommerce/dev/es/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=572703&filters%5Btranslation_id%5D=22901707

    The notices related to custom fields are added with:
    add_action( 'woocommerce_checkout_process', 'function' );
    and
    wc_add_notice( __( 'Custom error' ), 'error' );
    and works with all other payment methods.

    Maybe I’m wrong, but I hope I can help.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    Just tested with 3.2.3 version and all seems to be ok, all strings translated and custom validation errors showing.

    Plugin Contributor royho

    (@royho)

    So the script you pasted doesn’t have text domain so it can’t possibly translated. wc_add_notice( __( 'Custom error' ), 'error' );

    Can you perhaps link a screenshot of the error so I can see? And did you test switch the language as I suggested to see if that works for you?

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    The text domain is not a problem, that string is spanish as a part of private plugin.

    I add a notice (error) if my custom field is not properly filled by customer, and works ok with 3.2.3 version of Stripe and other payment plugins.

    The issue here is that don’t appear with Stripe 4.0.0, as the WC translations of notices from normal field (first name, country, etc.) errors.

    The language switch don’t take effect on translations or custom notice.

    I hope I explained myself well, thanks!

    Plugin Contributor royho

    (@royho)

    Ok so you mean the error you add doesn’t show at all and not just the translation?

    Plugin Contributor royho

    (@royho)

    This is what I see as the error http://cld.wthms.co/5xZ7mV But again as I said the non translated part is a known issue and will be fixed. But other than the field names, the rest should be translated.

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    That’s the translation issue, great if will be fixed 🙂

    I think that all form related errors from checkout are WC related (appears on WC text domain) and must not bypass by Stripe, like “%s cannot be empty” translation for UX consistency.

    About the custom validation error doesn’t show at all.

    Thanks!

    Thread Starter Anonymous User 15528382

    (@anonymized-15528382)

    @royho, in past replies I misunderstood “error” vs. “issue” words about the notices, because I call them “error notices” and did not realize that you see its missing translation like issue too, I’m sorry 😉
    Also reported here: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/438

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey Juan,

    Looking at the GitHub issue, Roy has made a fix and that will be part of the 4.0.1 release.

    I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Stripe v. 4.0.0 and checkout error notices’ is closed to new replies.