diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index 9521071027e7e..c290177baeaf6 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -211,9 +211,12 @@ protected function _renderItemCssClass($menuItem, $level) protected function _renderAnchor($menuItem, $level) { if ($level == 1 && $menuItem->getUrl() == '#') { - $output = '' - . '' . $this->_getAnchorLabel($menuItem) . '' - . ''; + $output = ''; + if ($menuItem->hasChildren()) { + $output = '' + . '' . $this->_getAnchorLabel($menuItem) . '' + . ''; + } } else { $output = '_renderItemAnchorTitle( $menuItem diff --git a/app/code/Magento/Braintree/i18n/en_US.csv b/app/code/Magento/Braintree/i18n/en_US.csv index f5e2d36e1e9bb..bce38100b9e33 100644 --- a/app/code/Magento/Braintree/i18n/en_US.csv +++ b/app/code/Magento/Braintree/i18n/en_US.csv @@ -165,4 +165,5 @@ Debug,Debug "credit_card","Credit card" "apple_pay_card","Apple pay card" "android_pay_card","Android pay card" -"Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase." \ No newline at end of file +"Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase." +"Save for later use.","Save for later use." diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml index b039d4287a2e8..76a4a28307e26 100644 --- a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml +++ b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml @@ -84,7 +84,7 @@ $ccType = $block->getInfoData('cc_type'); name="payment[is_active_payment_token_enabler]" class="admin__control-checkbox"/> diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php index d82f595600ce2..2307e848f00b4 100644 --- a/app/code/Magento/Catalog/Setup/InstallSchema.php +++ b/app/code/Magento/Catalog/Setup/InstallSchema.php @@ -674,7 +674,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, ['unsigned' => true, 'nullable' => false, 'default' => '0'], - 'Attriute Set ID' + 'Attribute Set ID' ) ->addColumn( 'parent_id', diff --git a/app/code/Magento/Catalog/view/base/web/js/price-utils.js b/app/code/Magento/Catalog/view/base/web/js/price-utils.js index 36269ab1d241b..4d3747a108068 100644 --- a/app/code/Magento/Catalog/view/base/web/js/price-utils.js +++ b/app/code/Magento/Catalog/view/base/web/js/price-utils.js @@ -70,7 +70,7 @@ define([ am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision)); r = (j ? i.substr(0, j) + groupSymbol : '') + i.substr(j).replace(re, '$1' + groupSymbol) + - (precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : ''); + (precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : ''); return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 7b435db200f19..26c601a4e9f38 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -104,7 +104,7 @@ - + diff --git a/app/code/Magento/Directory/etc/zip_codes.xml b/app/code/Magento/Directory/etc/zip_codes.xml index 18e13ca5bb48b..c4899636b4b30 100644 --- a/app/code/Magento/Directory/etc/zip_codes.xml +++ b/app/code/Magento/Directory/etc/zip_codes.xml @@ -81,6 +81,7 @@ ^[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}\s[0-9]{1}[a-zA-z]{1}[0-9]{1}$ + ^[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}[0-9]{1}$ diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv index 4686c4a9004f3..02eb325a808d0 100644 --- a/app/code/Magento/Paypal/i18n/en_US.csv +++ b/app/code/Magento/Paypal/i18n/en_US.csv @@ -680,3 +680,4 @@ User,User "payflowpro","Payflow Pro" "Payments Pro","Payments Pro" "Website Payments Pro","Website Payments Pro" +"Save for later use.","Save for later use." diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml index 8b050405cdaf2..8fdee5264bf62 100644 --- a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml +++ b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml @@ -135,7 +135,7 @@ $ccExpMonth = $block->getInfoData('cc_exp_month'); name="payment[is_active_payment_token_enabler]" class="admin__control-checkbox"/> diff --git a/app/code/Magento/Review/etc/adminhtml/menu.xml b/app/code/Magento/Review/etc/adminhtml/menu.xml index 2ed92a48ad421..e3532483f88af 100644 --- a/app/code/Magento/Review/etc/adminhtml/menu.xml +++ b/app/code/Magento/Review/etc/adminhtml/menu.xml @@ -9,7 +9,7 @@ - + diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php index d18060abe2245..1fcabe71bd5d8 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php @@ -55,7 +55,7 @@ protected function _prepareLayoutFeatures() } if ($this->_getProduct()->getId()) { - $this->_addProductLinkBlock($this->_getProduct()); + $this->_addProductLinkBlock(); } if ($this->_getCategory()->getId()) { diff --git a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php index 9a4c174c3b88e..747c16b8d3179 100644 --- a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php +++ b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php @@ -39,7 +39,7 @@ class Generator extends AbstractSchemaGenerator const UNAUTHORIZED_DESCRIPTION = '401 Unauthorized'; /** Array signifier */ - const ARRAY_SIGNIFIER = '[]'; + const ARRAY_SIGNIFIER = '[0]'; /** * Swagger factory instance. diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php index ad2e6c6c4e235..d2274c2169145 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php @@ -42,6 +42,48 @@ public function testPostCodesThrowsExceptionIfCountryDoesNotExist() $this->validator->validate('12345', 'INVALID-CODE'); } + /** + * @dataProvider getCanadaInvalidPostCodes + */ + public function testInvalidCanadaZipCode($countryId, $invalidPostCode) + { + $this->assertFalse($this->validator->validate($invalidPostCode, $countryId)); + } + + /** + * @dataProvider getCanadaValidPostCodes + */ + public function testValidCanadaZipCode($countryId, $validPostCode) + { + $this->assertTrue($this->validator->validate($validPostCode, $countryId)); + } + + /** + * @return array + */ + public function getCanadaInvalidPostCodes() + { + return [ + ['countryId' => 'CA', 'postcode' => '12345'], + ['countryId' => 'CA', 'postcode' => 'A1B2C3D'], + ['countryId' => 'CA', 'postcode' => 'A1B2C'], + ['countryId' => 'CA', 'postcode' => 'A1B 2C3'], + ]; + } + + /** + * @return array + */ + public function getCanadaValidPostCodes() + { + return [ + ['countryId' => 'CA', 'postcode' => 'A1B2C3'], + ['countryId' => 'CA', 'postcode' => 'A1B 2C3'], + ['countryId' => 'CA', 'postcode' => 'Z9Y 8X7'], + ['countryId' => 'CA', 'postcode' => 'Z9Y8X7'], + ]; + } + /** * @return array * @SuppressWarnings(PHPMD.ExcessiveMethodLength) diff --git a/lib/internal/Magento/Framework/Data/SearchResultProcessor.php b/lib/internal/Magento/Framework/Data/SearchResultProcessor.php index 5321ce06755cf..fc7cc2f98a1ef 100644 --- a/lib/internal/Magento/Framework/Data/SearchResultProcessor.php +++ b/lib/internal/Magento/Framework/Data/SearchResultProcessor.php @@ -188,8 +188,8 @@ public function toArray($arrRequiredFields = []) } /** - * @param null $valueField - * @param null $labelField + * @param string|null $valueField + * @param string|null $labelField * @param array $additional * @return array */ diff --git a/lib/internal/Magento/Framework/Locale/Config.php b/lib/internal/Magento/Framework/Locale/Config.php index 2f4b0fcee01a5..84424b558bab8 100644 --- a/lib/internal/Magento/Framework/Locale/Config.php +++ b/lib/internal/Magento/Framework/Locale/Config.php @@ -72,6 +72,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface 'mk_MK', /*Macedonian (Macedonia)*/ 'mn_Cyrl_MN', /*Mongolian (Mongolia)*/ 'ms_Latn_MY', /*Malaysian (Malaysia)*/ + 'ms_MY', /*Malaysian (Malaysia)*/ 'nl_BE', /*Dutch (Belgium)*/ 'nl_NL', /*Dutch (Netherlands)*/ 'nb_NO', /*Norwegian BokmГ_l (Norway)*/ @@ -98,6 +99,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface 'lo_LA', /*Laotian*/ 'es_VE', /*Spanish (Venezuela)*/ 'en_IE', /*English (Ireland)*/ + 'es_BO', /*Spanish (Bolivia)*/ ]; /** diff --git a/lib/web/css/docs/source/docs.less b/lib/web/css/docs/source/docs.less index 4039d0562da53..952beb5c0f970 100644 --- a/lib/web/css/docs/source/docs.less +++ b/lib/web/css/docs/source/docs.less @@ -21,7 +21,6 @@ @import '_icons.less'; @import '_loaders.less'; @import '_messages.less'; -//@import 'navigation.less'; @import '_layout.less'; @import '_pages.less'; @import '_popups.less';