• Resolved TAKE

    (@takmori)


    On the checkout page after logged into the AmazonPay, there is a link “Change”.

    I need to change that text to Japanese, but it cannot be done because the code is not written for i18n.

    wp-content\plugins\woocommerce-gateway-amazon-payments-advanced\includes\class-wc-gateway-amazon-payments-advanced.php #930

    <a href="#" class="wc-apa-widget-change" id="shipping_address_widget_change">Change</a>

    What should I do?
    Should I just wait for the update?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Christian

    (@christian1983)

    Hey @takmori,

    Hope you are doing well!

    You can check how to translate string with this link: https://wedevs.com/es/blog/95777/translating-wordpress-plugins

    Move both .po file and .mo files to languages folder in your plugin (e.g: /plugin-name/languages/) directory. You can keep these files in the following directory as well (/wp-content/languages/plugins/).

    Let me know if that helps.

    Best,
    Christian

    Thread Starter TAKE

    (@takmori)

    Christian,

    Thank you for reply me, but I have already tried to do so.

    The thing is, the code is hard coded like this below, so PO does not work at all.

    <a href="#" class="wc-apa-widget-change" id="shipping_address_widget_change">Change</a>

    wp-content\plugins\woocommerce-gateway-amazon-payments-advanced\includes\class-wc-gateway-amazon-payments-advanced.php #930

    I just used jQuery to replace that just for now.

    I will wait for the updates.

    • This reply was modified 3 years, 3 months ago by TAKE.
    • This reply was modified 3 years, 3 months ago by TAKE.
    Plugin Support Christian

    (@christian1983)

    Hey @takmori ,

    Hope you are doing well!

    the word change can be translated normally as we have already instructed. You are reffering simple to HTML raw output of the plugin. Taking a look in the php file includes/class-wc-gateway-amazon-payments-advanced.php line 931, it is visible that the word “Change” is being passed through a WP translator function under the domain ‘woocommerce-gateway-amazon-payments-advanced’ as it should.

    Let me know if you need more details.

    Best,
    Christian

    Plugin Support Christian

    (@christian1983)

    Hey @takmori ,

    Hope you are doing well!

    On a second look, the devs realised you are correct. Pleaase keep your jQuery solution for the time being. The next version of the plugin will include a fix, where you will be able to translate the word “Change” normally.

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

    Best,
    Christian

    • This reply was modified 3 years, 2 months ago by Christian.
    Plugin Support Christian

    (@christian1983)

    Hey @takmori

    New version was released, check if translation is possible.

    Best,
    Christian

    No, it is not possible without manually changing the language files. There are MANY strings missing in it. The source code of the plugin seems to be fine, but the strings are not included in the POT file. After adding these strings manually they get translated.

    I am having the same issue. Loco translate will not find the strings. Using a CSS or Jquery solution is not very suitable at all.

    How do I add the strings manually? Is there any tutorial?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘“Change” cannot be translated’ is closed to new replies.