Magento – Not able to translate OK and cancel buttons in confirmation popup minicart

inline-translationsmagento2.2.2mini-cartpopup

After adding an item into cart if we goto mini cart and click on remove item a confirmation popup with Ok and Cancel option will appear. I am not able to translate the Ok and Cancel buttons.

Please guide me how to do this. Thanks in advance.

Best Answer

Minicart confirmation popup button text Ok and Cancel option comes to the below file path. You can able to find that two button text form there.

File path: magento/vendor/magento/module-ui/view/base/web/js/modal/confirm.js

buttons: [{
    text: $t('Cancel'),
    class: 'action-secondary action-dismiss',

    /**
     * Click handler.
     */
    click: function (event) {
        this.closeModal(event);
    }
}, {
    text: $t('OK'),
    class: 'action-primary action-accept',

    /**
     * Click handler.
     */
    click: function (event) {
        this.closeModal(event, true);
    }
}]
Related Topic