PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 59 forks source link

Credit Card Error messages are not translated #110

Closed fischamhaken closed 7 years ago

fischamhaken commented 7 years ago

M2.1.7

Error messages for wrong card information are not translated - even if german translation exists.

fjbender commented 7 years ago

I can't reproduce this. Once the language is set, messages are displayed in the corresponding language: image (In admin backend PAYONE -> General -> Payment Creditcard -> Custom Styling hosted iFrame)

image

However, I agree that this is quite hard to find.

fischamhaken commented 7 years ago

Hi, yes, its really hard to find :-) I actualized this.... clipboard03

..but error is displayed in english:

clipboard02

I found code for translation via grep for this not translated string (next screenshot) in /vendor/payone-gmbh/magento-2/view/frontend/web/js/view/payment/method-renderer/creditcard-method.js: $t("Please enter complete data.")

clipboard01

I added translation for this to /i18n/de_DE.csv and after clearing cache - voilá: error message is translated. So it seems, some messages are translated, and some not. It's strange to see your translation for "Expiry date invalid..." - I could not find this string in whole magento installation?! Is this translated remote?

fjbender commented 7 years ago

Yes, some of the messages are generated on our platform (i.e. whenever card date had been verified) and some are generated from the shop (i.e. when fields are incomplete).

Can you provide a PR for the added translations? :)

fischamhaken commented 7 years ago

Just for information - if others have same issue: These are the strings i can not translate: clipboard05 clipboard06 clipboard07

The only translation working is "Please enter complete data.","Bitte geben Sie die Kreditkartendaten vollstaendig ein."

Sorry, I don't know how to create PR (Pull Request??) Instead I added you my de_DE.csv

de_DE.zip

fjbender commented 7 years ago

Thanks for the updated CSV, I will create a pull request with that.

The other messages should be translateable through the (hidden) language selection in the admin backend, as they are generated platform-side.

fischamhaken commented 7 years ago

Another point at this issue: Is it possible that call to credit card provider does not accept language ("deutsch") - in test cases I noticed that 3D-Secure Page is complete english too, have a look at screenshot. clipboard09

fjbender commented 7 years ago

As I see it, our 3D Secure test page is only available in English. In live mode, the 3D Secure page is provided by the bank of the customer, which should automatically be in the right language.