Skip to content

Commit c10c168

Browse files
committed
Merge branch '2.2-develop' of github.com:magento/magento2ce into MAGETWO-70651
2 parents 9d114df + d63d7e7 commit c10c168

File tree

36 files changed

+478
-292
lines changed

36 files changed

+478
-292
lines changed

app/code/Magento/Analytics/etc/di.xml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -181,28 +181,28 @@
181181
<type name="Magento\Analytics\Model\Config\Source\Vertical">
182182
<arguments>
183183
<argument name="verticals" xsi:type="array">
184-
<item name="0" xsi:type="string">Apps and Games</item>
185-
<item name="1" xsi:type="string">Athletic/Sporting Goods</item>
186-
<item name="2" xsi:type="string">Art and Design</item>
187-
<item name="3" xsi:type="string">Auto Parts</item>
188-
<item name="4" xsi:type="string">Baby/Children’s Apparel, Gear and Toys</item>
189-
<item name="5" xsi:type="string">Beauty and Cosmetics</item>
190-
<item name="6" xsi:type="string">Books, Music and Magazines</item>
191-
<item name="7" xsi:type="string">Crafts and Stationery</item>
192-
<item name="8" xsi:type="string">Consumer Electronics</item>
193-
<item name="9" xsi:type="string">Deal Site</item>
194-
<item name="10" xsi:type="string">Fashion Apparel and Accessories</item>
195-
<item name="11" xsi:type="string">Food, Beverage and Grocery</item>
196-
<item name="12" xsi:type="string">Home Goods and Furniture</item>
197-
<item name="13" xsi:type="string">Home Improvement</item>
198-
<item name="14" xsi:type="string">Jewelry and Watches</item>
199-
<item name="15" xsi:type="string">Mass Merchant</item>
200-
<item name="16" xsi:type="string">Office Supplies</item>
201-
<item name="17" xsi:type="string">Outdoor and Camping Gear</item>
202-
<item name="18" xsi:type="string">Pet Goods</item>
203-
<item name="19" xsi:type="string">Pharma and Medical Devices</item>
204-
<item name="20" xsi:type="string">Technology B2B</item>
205-
<item name="21" xsi:type="string">Other</item>
184+
<item name="0" xsi:type="string" translatable="true">Apps and Games</item>
185+
<item name="1" xsi:type="string" translatable="true">Athletic/Sporting Goods</item>
186+
<item name="2" xsi:type="string" translatable="true">Art and Design</item>
187+
<item name="3" xsi:type="string" translatable="true">Auto Parts</item>
188+
<item name="4" xsi:type="string" translatable="true">Baby/Children’s Apparel, Gear and Toys</item>
189+
<item name="5" xsi:type="string" translatable="true">Beauty and Cosmetics</item>
190+
<item name="6" xsi:type="string" translatable="true">Books, Music and Magazines</item>
191+
<item name="7" xsi:type="string" translatable="true">Crafts and Stationery</item>
192+
<item name="8" xsi:type="string" translatable="true">Consumer Electronics</item>
193+
<item name="9" xsi:type="string" translatable="true">Deal Site</item>
194+
<item name="10" xsi:type="string" translatable="true">Fashion Apparel and Accessories</item>
195+
<item name="11" xsi:type="string" translatable="true">Food, Beverage and Grocery</item>
196+
<item name="12" xsi:type="string" translatable="true">Home Goods and Furniture</item>
197+
<item name="13" xsi:type="string" translatable="true">Home Improvement</item>
198+
<item name="14" xsi:type="string" translatable="true">Jewelry and Watches</item>
199+
<item name="15" xsi:type="string" translatable="true">Mass Merchant</item>
200+
<item name="16" xsi:type="string" translatable="true">Office Supplies</item>
201+
<item name="17" xsi:type="string" translatable="true">Outdoor and Camping Gear</item>
202+
<item name="18" xsi:type="string" translatable="true">Pet Goods</item>
203+
<item name="19" xsi:type="string" translatable="true">Pharma and Medical Devices</item>
204+
<item name="20" xsi:type="string" translatable="true">Technology B2B</item>
205+
<item name="21" xsi:type="string" translatable="true">Other</item>
206206
</argument>
207207
</arguments>
208208
</type>

app/code/Magento/Analytics/i18n/en_US.csv

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"These arguments can't be empty ""%1""","These arguments can't be empty ""%1"""
1717
"Cannot find predefined integration user!","Cannot find predefined integration user!"
1818
"File is not ready yet.","File is not ready yet."
19+
"Your Base URL has been changed and your reports are being updated. Advanced Reporting will be available once this change has been processed. Please try again later.","Your Base URL has been changed and your reports are being updated. Advanced Reporting will be available once this change has been processed. Please try again later."
1920
"Failed to synchronize data to the Magento Business Intelligence service. ","Failed to synchronize data to the Magento Business Intelligence service. "
2021
"<a href=""%1"">Retry Synchronization</a>","<a href=""%1"">Retry Synchronization</a>"
2122
TestMessage,TestMessage
@@ -49,6 +50,24 @@ Industry,Industry
4950
href=""https://dashboard.rjmetrics.com/v2/magento/signup/"">BI Essentials</a> tier.","Magento Business Intelligence provides you with a simple and clear path to
5051
becoming more data driven.</br> Learn more about <a target=""_blank""
5152
href=""https://dashboard.rjmetrics.com/v2/magento/signup/"">BI Essentials</a> tier."
53+
"Auto Parts","Auto Parts"
54+
"Baby/Children’s Apparel, Gear and Toys","Baby/Children’s Apparel, Gear and Toys"
55+
"Beauty and Cosmetics","Beauty and Cosmetics"
56+
"Books, Music and Magazines","Books, Music and Magazines"
57+
"Crafts and Stationery","Crafts and Stationery"
58+
"Consumer Electronics","Consumer Electronics"
59+
"Deal Site","Deal Site"
60+
"Fashion Apparel and Accessories","Fashion Apparel and Accessories"
61+
"Food, Beverage and Grocery","Food, Beverage and Grocery"
62+
"Home Goods and Furniture","Home Goods and Furniture"
63+
"Home Improvement","Home Improvement"
64+
"Jewelry and Watches","Jewelry and Watches"
65+
"Mass Merchant","Mass Merchant"
66+
"Office Supplies","Office Supplies"
67+
"Outdoor and Camping Gear","Outdoor and Camping Gear"
68+
"Pet Goods","Pet Goods"
69+
"Pharma and Medical Devices","Pharma and Medical Devices"
70+
"Technology B2B","Technology B2B"
5271
"Analytics Subscription","Analytics Subscription"
5372
"powered by Magento Business Intelligence","powered by Magento Business Intelligence"
5473
"<p>When you turn on Advanced

app/code/Magento/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function getOptionText($value)
2424
if (sizeof($options) > 0) {
2525
foreach ($options as $option) {
2626
if (isset($option['value']) && $option['value'] == $value) {
27-
return $option['label'];
27+
return __($option['label']);
2828
}
2929
}
3030
}

app/code/Magento/Catalog/etc/adminhtml/di.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
<arguments>
2121
<argument name="imageTypes" xsi:type="array">
2222
<item name="small" xsi:type="array">
23-
<item name="title" xsi:type="string">Small</item>
23+
<item name="title" xsi:type="string" translatable="true">Small</item>
2424
<item name="attribute" xsi:type="string">small_image</item>
2525
</item>
2626
<item name="main" xsi:type="array">
27-
<item name="title" xsi:type="string">Main</item>
27+
<item name="title" xsi:type="string" translatable="true">Main</item>
2828
<item name="attribute" xsi:type="string">image</item>
2929
</item>
3030
<item name="cart" xsi:type="array">
31-
<item name="title" xsi:type="string">Thumbnail</item>
31+
<item name="title" xsi:type="string" translatable="true">Thumbnail</item>
3232
<item name="attribute" xsi:type="string">thumbnail</item>
3333
</item>
3434
<item name="custom" xsi:type="array">
35-
<item name="title" xsi:type="string">Custom image</item>
35+
<item name="title" xsi:type="string" translatable="true">Custom image</item>
3636
<item name="attribute" xsi:type="string">custom_image</item>
3737
</item>
3838
</argument>

app/code/Magento/Catalog/etc/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@
144144
<argument name="options" xsi:type="array">
145145
<item name="option1" xsi:type="array">
146146
<item name="value" xsi:type="string">container1</item>
147-
<item name="label" xsi:type="string">Product Info Column</item>
147+
<item name="label" xsi:type="string" translatable="true">Product Info Column</item>
148148
</item>
149149
<item name="option2" xsi:type="array">
150150
<item name="value" xsi:type="string">container2</item>
151-
<item name="label" xsi:type="string">Block after Info Column</item>
151+
<item name="label" xsi:type="string" translatable="true">Block after Info Column</item>
152152
</item>
153153
</argument>
154154
</arguments>

app/code/Magento/Catalog/i18n/en_US.csv

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ Catalog,Catalog
210210
"An attribute with this code already exists.","An attribute with this code already exists."
211211
"An attribute with the same code (%1) already exists.","An attribute with the same code (%1) already exists."
212212
"The value of Admin must be unique.","The value of Admin must be unique."
213+
"The value of Admin scope can't be empty.","The value of Admin scope can't be empty."
213214
"You duplicated the product.","You duplicated the product."
214215
"This product doesn't exist.","This product doesn't exist."
215216
"Invalid product id. Should be numeric value greater than 0","Invalid product id. Should be numeric value greater than 0"
@@ -622,9 +623,13 @@ OK,OK
622623
"Image Detail","Image Detail"
623624
Adding...,Adding...
624625
Added,Added
626+
"does not implement Storage Interface","does not implement Storage Interface"
625627
"unselect all","unselect all"
626628
Inventory,Inventory
627629
"Catalog Section","Catalog Section"
630+
Small,Small
631+
Main,Main
632+
"Custom image","Custom image"
628633
"Product Fields Auto-Generation","Product Fields Auto-Generation"
629634
"Mask for SKU","Mask for SKU"
630635
"Use {{name}} as Product Name placeholder","Use {{name}} as Product Name placeholder"
@@ -633,6 +638,10 @@ Inventory,Inventory
633638
"Use {{name}} as Product Name or {{sku}} as Product SKU placeholders","Use {{name}} as Product Name or {{sku}} as Product SKU placeholders"
634639
"Mask for Meta Description","Mask for Meta Description"
635640
"Use {{name}} and {{description}} as Product Name and Product Description placeholders","Use {{name}} and {{description}} as Product Name and Product Description placeholders"
641+
"Recently Viewed/Compared Products","Recently Viewed/Compared Products"
642+
"Lifetime of products in Recently Viewed Widget","Lifetime of products in Recently Viewed Widget"
643+
"Lifetime of products in Recently Compared Widget","Lifetime of products in Recently Compared Widget"
644+
"Synchronize widget products with backend storage","Synchronize widget products with backend storage"
636645
Storefront,Storefront
637646
"List Mode","List Mode"
638647
"Products per Page on Grid Allowed Values","Products per Page on Grid Allowed Values"
@@ -666,6 +675,8 @@ Comma-separated.,Comma-separated.
666675
"Use Static URLs for Media Content in WYSIWYG for Catalog","Use Static URLs for Media Content in WYSIWYG for Catalog"
667676
"This applies only to catalog products and categories. Media content will be inserted into the editor as a static URL. Media content is not updated if the system configuration base URL changes.","This applies only to catalog products and categories. Media content will be inserted into the editor as a static URL. Media content is not updated if the system configuration base URL changes."
668677
"Top Level Category","Top Level Category"
678+
"Product Info Column","Product Info Column"
679+
"Block after Info Column","Block after Info Column"
669680
"Product Flat Data","Product Flat Data"
670681
"Reorganize EAV product structure to flat structure","Reorganize EAV product structure to flat structure"
671682
"Category Flat Data","Category Flat Data"
@@ -709,6 +720,22 @@ Template,Template
709720
"If empty, we'll use the category name here.","If empty, we'll use the category name here."
710721
"Category Link Block Template","Category Link Block Template"
711722
"Category Link Inline Template","Category Link Inline Template"
723+
"Recently Viewed Products","Recently Viewed Products"
724+
"List of Products Recently Viewed by Visitor","List of Products Recently Viewed by Visitor"
725+
"UI Component","UI Component"
726+
"Number of Products to display","Number of Products to display"
727+
"Product attributes to show","Product attributes to show"
728+
Image,Image
729+
"Learn More Link","Learn More Link"
730+
"Buttons to show","Buttons to show"
731+
"Add to Wishlist","Add to Wishlist"
732+
"Viewed Products Grid Template","Viewed Products Grid Template"
733+
"Viewed Products List Template","Viewed Products List Template"
734+
"Viewed Products Sidebar Template","Viewed Products Sidebar Template"
735+
"Recently Compared Products","Recently Compared Products"
736+
"List of Products Recently Compared by Visitor","List of Products Recently Compared by Visitor"
737+
"Compared Products Grid Template","Compared Products Grid Template"
738+
"Compared Products List Template","Compared Products List Template"
712739
Set,Set
713740
"Category Information","Category Information"
714741
"Enable Category","Enable Category"
@@ -763,3 +790,8 @@ Overview,Overview
763790
"Skip to the end of the images gallery","Skip to the end of the images gallery"
764791
"Skip to the beginning of the images gallery","Skip to the beginning of the images gallery"
765792
Details,Details
793+
"Recently Compared","Recently Compared"
794+
"Add To Cart","Add To Cart"
795+
"Add To Compare","Add To Compare"
796+
"Learn more","Learn more"
797+
"Recently Viewed","Recently Viewed"

app/code/Magento/Checkout/etc/frontend/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<arguments>
3434
<argument name="clientSideSections" xsi:type="array">
3535
<item name="checkout-data" xsi:type="string">checkout-data</item>
36+
<item name="cart-data" xsi:type="string">cart-data</item>
3637
</argument>
3738
</arguments>
3839
</type>

app/code/Magento/Customer/Model/Address/AbstractAddress.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ public function getStreetLine($number)
230230
*/
231231
public function getStreetFull()
232232
{
233-
return $this->getData('street');
233+
$street = $this->getData('street');
234+
return is_array($street) ? implode("\n", $street) : $street;
234235
}
235236

236237
/**

app/code/Magento/Customer/Model/EmailNotification.php

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ class EmailNotification implements EmailNotificationInterface
6060
self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
6161
];
6262

63-
/**
64-
* Map of templates. Use for backward compatibility
65-
*/
66-
const TEMPLATE_MAP = [
67-
self::XML_PATH_FORGOT_EMAIL_TEMPLATE => self::XML_PATH_RESET_PASSWORD_TEMPLATE
68-
];
69-
7063
/**#@-*/
7164

7265
/**
@@ -248,7 +241,7 @@ private function sendEmailTemplate(
248241
$storeId = null,
249242
$email = null
250243
) {
251-
$templateId = $this->getTemplateId($template, 'store', $storeId);
244+
$templateId = $this->scopeConfig->getValue($template, 'store', $storeId);
252245
if ($email === null) {
253246
$email = $customer->getEmail();
254247
}
@@ -384,23 +377,4 @@ public function newAccount(
384377
$storeId
385378
);
386379
}
387-
388-
/**
389-
* Get templateId include considering template map
390-
*
391-
* @param string $template
392-
* @param string $scopeType
393-
* @param string $storeId
394-
* @return string
395-
*/
396-
private function getTemplateId($template, $scopeType, $storeId)
397-
{
398-
if (array_key_exists($template, self::TEMPLATE_MAP)) {
399-
$templateId = $this->scopeConfig->getValue(self::TEMPLATE_MAP[$template], $scopeType, $storeId);
400-
if ($templateId) {
401-
return $templateId;
402-
}
403-
}
404-
return $this->scopeConfig->getValue($template, $scopeType, $storeId);
405-
}
406380
}

app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,4 +377,27 @@ public function validateDataProvider()
377377
'validated' => [array_merge($data, ['country_id' => $countryId++]), true],
378378
];
379379
}
380+
381+
/**
382+
* @dataProvider getStreetFullDataProvider
383+
*/
384+
public function testGetStreetFullAlwaysReturnsString($expectedResult, $street)
385+
{
386+
$this->model->setData('street', $street);
387+
$this->assertEquals($expectedResult, $this->model->getStreetFull());
388+
}
389+
390+
/**
391+
* @return array
392+
*/
393+
public function getStreetFullDataProvider()
394+
{
395+
return [
396+
[null, null],
397+
['', []],
398+
["first line\nsecond line", ['first line', 'second line']],
399+
['single line', ['single line']],
400+
['single line', 'single line'],
401+
];
402+
}
380403
}

0 commit comments

Comments
 (0)