diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js index 4df5af1fba8e8..78f48b0bafabb 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js @@ -6,7 +6,8 @@ define([ 'jquery', 'underscore', 'uiRegistry', - 'jquery/ui' + 'jquery/ui', + 'mage/translate' ], function ($, _, registry) { 'use strict'; diff --git a/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js b/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js index db4fe46a3515e..cbb16b397f9e6 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js @@ -7,7 +7,8 @@ define([ 'jquery', 'Magento_Ui/js/lib/validation/utils', 'Magento_Ui/js/form/element/abstract', - 'Magento_Ui/js/lib/validation/validator' + 'Magento_Ui/js/lib/validation/validator', + 'mage/translate' ], function ($, utils, Abstract, validator) { 'use strict'; diff --git a/app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js b/app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js index 02209e904f22c..be7793e7ebaf7 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js @@ -4,7 +4,8 @@ */ define([ 'uiComponent', - 'Magento_Customer/js/customer-data' + 'Magento_Customer/js/customer-data', + 'mage/translate' ], function (Component, customerData) { 'use strict'; @@ -12,23 +13,22 @@ define([ function initSidebar() { if (sidebarInitialized) { - return ; + return; } sidebarInitialized = true; require([ 'jquery', 'mage/mage' ], function ($) { + /*eslint-disable max-len*/ $('[data-role=compare-products-sidebar]').mage('compareItems', { - "removeConfirmMessage": $.mage.__( - "Are you sure you want to remove this item from your Compare Products list?" - ), - "removeSelector": "#compare-items a.action.delete", - "clearAllConfirmMessage": $.mage.__( - "Are you sure you want to remove all items from your Compare Products list?" - ), - "clearAllSelector": "#compare-clear-all" + 'removeConfirmMessage': $.mage.__('Are you sure you want to remove this item from your Compare Products list?'), + 'removeSelector': '#compare-items a.action.delete', + 'clearAllConfirmMessage': $.mage.__('Are you sure you want to remove all items from your Compare Products list?'), + 'clearAllSelector': '#compare-clear-all' }); + + /*eslint-enable max-len*/ }); } diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js index aebf4ed3d6530..29e9e2ea896ec 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js @@ -224,7 +224,7 @@ define([ if (msg) { alert({ - content: $.mage.__(msg) + content: msg }); } } diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js b/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js index 8d54413581631..7a25538bcc01a 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js @@ -70,9 +70,7 @@ define([ 'qty': ':input.cart-item-qty', 'button': ':button.update-cart-item' }, - 'confirmMessage': $.mage.__( - 'Are you sure you would like to remove this item from the shopping cart?' - ) + 'confirmMessage': $.mage.__('Are you sure you would like to remove this item from the shopping cart?') }); } diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml index e01d39f03771d..ef3e449fe52db 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml @@ -29,7 +29,8 @@ require([ 'jquery', 'mage/template', 'jquery/file-uploader', - 'domReady!' + 'domReady!', + 'mage/translate' ], function ($, mageTemplate) { $('#getHtmlId() ?> .fileupload').fileupload({ dataType: 'json', diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js index d9aa420b6106b..ce2fd9ac5ea80 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js @@ -8,7 +8,8 @@ define([ 'jquery', 'Magento_Ui/js/core/app', 'underscore', - 'notification' + 'notification', + 'mage/translate' ], function (Component, $, bootstrap, _) { 'use strict'; @@ -221,9 +222,7 @@ define([ if (data.items.length) { this.productsModal.notification('add', { - message: $.mage.__( - 'Choose a new product to delete and replace the current product configuration.' - ), + message: $.mage.__('Choose a new product to delete and replace the current product configuration.'), messageContainer: this.gridSelector }); } else { diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/select_attributes.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/select_attributes.js index 961e2ca23ed36..18a1b30c051ce 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/select_attributes.js +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/select_attributes.js @@ -51,9 +51,13 @@ define([ this.setNotificationMessage(); }, setNotificationMessage: function () { + /*eslint-disable max-len*/ + var msg = $.mage.__('When you remove or add an attribute, we automatically update all configurations and you will need to recreate current configurations manually.'); + + /*eslint-enable max-len*/ + if (this.mode === 'edit') { - this.wizard.setNotificationMessage($.mage.__('When you remove or add an attribute, we automatically ' + - 'update all configurations and you will need to recreate current configurations manually.')); + this.wizard.setNotificationMessage(msg); } }, doSelectSavedAttributes: function () { diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml index 517b86c5c2831..073090ed8edf8 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml @@ -104,7 +104,8 @@ require([ 'mage/template', 'jquery/file-uploader', 'mage/mage', - 'prototype' + 'prototype', + 'mage/translate' ], function(jQuery, registry, mageTemplate){ registry.get('downloadable', function (Downloadable) { var linkTemplate = '