Skip to content

Commit b78dacf

Browse files
author
Oleksii Korshenko
authored
Merge pull request magento#1618 from magento-engcom/2.2-develop-prs
Public Pull Requests magento#11704 [Backport 2.2-develop] Travis: surround variable TRAVIS_BRANCH with double-quotes instead of single-quotes by @adrian-martinez-interactiv4 magento#11673 [BACKPORT 2.2] [TASK] Removed Typo in Paypal TestCase didgit => digit by @lewisvoncken magento#11675 MAGETWO-77672: in system.xml translate phrase not work, if comment starts from new line. by @nmalevanec magento#11439 [Backport 2.2-develop] magento#11328 : app:config:dump adds extra space every time in multiline array value by @adrian-martinez-interactiv4 magento#11057 Fix first day of week in dob customer field by @joachimVT Fixed Public Issues magento#7591 PayPal module, "didgit" misspelling magento#7767 in system.xml translate phrase not work magento#11328 app:config:dump adds extra space every time in multiline array value
2 parents 2cc846e + 656254d commit b78dacf

File tree

9 files changed

+33
-11
lines changed

9 files changed

+33
-11
lines changed

app/code/Magento/Customer/Block/Widget/Dob.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ public function getFieldHtml()
186186
'max_date' => '-1d',
187187
'change_month' => 'true',
188188
'change_year' => 'true',
189-
'show_on' => 'both'
189+
'show_on' => 'both',
190+
'first_day' => $this->getFirstDay()
190191
]);
191192
return $this->dateElement->getHtml();
192193
}
@@ -307,4 +308,17 @@ public function getMaxDateRange()
307308
}
308309
return null;
309310
}
311+
312+
/**
313+
* Return first day of the week
314+
*
315+
* @return int
316+
*/
317+
public function getFirstDay()
318+
{
319+
return (int)$this->_scopeConfig->getValue(
320+
'general/locale/firstday',
321+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
322+
);
323+
}
310324
}

dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/OnePageCheckoutTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<data name="isVaultPresent" xsi:type="boolean">false</data>
7777
<data name="configData" xsi:type="string">payflowpro</data>
7878
<data name="paymentInfo" xsi:type="array">
79-
<item name="AVS Street Match" xsi:type="string">#Y: Yes. Matched Address and five-didgit ZIP</item>
79+
<item name="AVS Street Match" xsi:type="string">#Y: Yes. Matched Address and five-digit ZIP</item>
8080
</data>
8181
<data name="status" xsi:type="string">Processing</data>
8282
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
@@ -113,7 +113,7 @@
113113
<data name="payment/method" xsi:type="string">payflowpro</data>
114114
<data name="creditCard/dataset" xsi:type="string">visa_default</data>
115115
<data name="paymentInfo" xsi:type="array">
116-
<item name="AVS zip" xsi:type="string">#Y: Yes. Matched Address and five-didgit ZIP</item>
116+
<item name="AVS zip" xsi:type="string">#Y: Yes. Matched Address and five-digit ZIP</item>
117117
</data>
118118
<data name="configData" xsi:type="string">payflowpro, payflowpro_use_avs_zip</data>
119119
<data name="status" xsi:type="string">Processing</data>

dev/travis/before_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ case $TEST_SUITE in
7171
--output-file="$changed_files_ce" \
7272
--base-path="$TRAVIS_BUILD_DIR" \
7373
--repo='https://github.com/magento/magento2.git' \
74-
--branch='$TRAVIS_BRANCH'
74+
--branch="$TRAVIS_BRANCH"
7575
cat "$changed_files_ce" | sed 's/^/ + including /'
7676

7777
cd ../../..

lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ class PhpFormatter implements FormatterInterface
2121
public function format($data, array $comments = [])
2222
{
2323
if (!empty($comments) && is_array($data)) {
24-
return "<?php\nreturn array (\n" . $this->formatData($data, $comments, ' ') . "\n);\n";
24+
return "<?php\nreturn array (\n" . $this->formatData($data, $comments) . "\n);\n";
2525
}
2626
return "<?php\nreturn " . var_export($data, true) . ";\n";
2727
}
2828

2929
/**
3030
* Format supplied data
3131
*
32-
* @param $data
33-
* @param $comments
32+
* @param string[] $data
33+
* @param string[] $comments
3434
* @param string $prefix
3535
* @return string
3636
*/
37-
protected function formatData($data, $comments, $prefix = '')
37+
private function formatData($data, $comments = [], $prefix = ' ')
3838
{
3939
$elements = [];
4040

lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/Writer/PhpFormatterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class PhpFormatterTest extends \PHPUnit\Framework\TestCase
1111
{
1212
/**
1313
* @dataProvider formatWithCommentDataProvider
14-
* @param string|array $data
15-
* @param array $comments
14+
* @param string[] $data
15+
* @param string[] $comments
1616
* @param string $expectedResult
1717
*/
1818
public function testFormat($data, $comments, $expectedResult)

lib/internal/Magento/Framework/View/Element/Html/Date.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ protected function _toHtml()
2626
$changeYear = $this->getChangeYear();
2727
$maxDate = $this->getMaxDate();
2828
$showOn = $this->getShowOn();
29+
$firstDay = $this->getFirstDay();
2930

3031
$html .= '<script type="text/javascript">
3132
require(["jquery", "mage/calendar"], function($){
@@ -59,6 +60,7 @@ protected function _toHtml()
5960
($changeMonth === null ? '' : ', changeMonth: ' . $changeMonth) .
6061
($changeYear === null ? '' : ', changeYear: ' . $changeYear) .
6162
($showOn ? ', showOn: "' . $showOn . '"' : '') .
63+
($firstDay ? ', firstDay: ' . $firstDay : '') .
6264
'})
6365
});
6466
</script>';

setup/src/Magento/Setup/Module/I18n/Parser/Adapter/Xml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private function parseTranslatableNodes(\SimpleXMLElement $attributes, \SimpleXM
6565
{
6666
$nodesDelimiter = strpos($attributes['translate'], ' ') === false ? ',' : ' ';
6767
foreach (explode($nodesDelimiter, $attributes['translate']) as $value) {
68-
$phrase = (string)$element->{$value};
68+
$phrase = trim((string)$element->{$value});
6969
if ($phrase) {
7070
$this->_addPhrase($phrase);
7171
}

setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/Adapter/XmlTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function parseDataProvider()
5353
['phrase' => 'Phrase 2', 'file' => $default, 'line' => '', 'quote' => ''],
5454
['phrase' => 'Phrase 3', 'file' => $default, 'line' => '', 'quote' => ''],
5555
['phrase' => 'Phrase 1', 'file' => $default, 'line' => '', 'quote' => ''],
56+
['phrase' => 'Comment from new line.', 'file' => $default, 'line' => '', 'quote' => ''],
5657
],
5758
],
5859
[

setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/Adapter/_files/default.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
<node2>
1616
<title translate="true">Phrase 1</title>
1717
</node2>
18+
<node3 translate="comment">
19+
<comment>
20+
<![CDATA[Comment from new line.]]>
21+
</comment>
22+
</node3>
1823
</layout>

0 commit comments

Comments
 (0)