Skip to content

Commit c8915b0

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-87619
2 parents 3afa7f2 + 87a4f92 commit c8915b0

File tree

659 files changed

+3747
-1565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

659 files changed

+3747
-1565
lines changed

app/code/Magento/Analytics/Model/Config/Backend/CollectionTime.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public function afterSave()
6666
$result = preg_match('#(?<hour>\d{2}),(?<min>\d{2}),(?<sec>\d{2})#', $this->getValue(), $time);
6767

6868
if (!$result) {
69-
throw new LocalizedException(__('Time value has an unsupported format'));
69+
throw new LocalizedException(
70+
__('The time value is using an unsupported format. Enter a supported format and try again.')
71+
);
7072
}
7173

7274
$cronExprArray = [

app/code/Magento/Analytics/Model/Cryptographer.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ public function encode($source)
5656
try {
5757
$source = (string)$source;
5858
} catch (\Exception $e) {
59-
throw new LocalizedException(__('Input data must be string or convertible into string.'));
59+
throw new LocalizedException(
60+
__(
61+
'The data is invalid. '
62+
. 'Enter the data as a string or data that can be converted into a string and try again.'
63+
)
64+
);
6065
}
6166
} elseif (!$source) {
62-
throw new LocalizedException(__('Input data must be non-empty string.'));
67+
throw new LocalizedException(__('The data is invalid. Enter the data as a string and try again.'));
6368
}
6469
if (!$this->validateCipherMethod($this->cipherMethod)) {
65-
throw new LocalizedException(__('Not valid cipher method.'));
70+
throw new LocalizedException(__('The data is invalid. Use a valid cipher method and try again.'));
6671
}
6772
$initializationVector = $this->getInitializationVector();
6873

@@ -90,7 +95,7 @@ private function getKey()
9095
{
9196
$token = $this->analyticsToken->getToken();
9297
if (!$token) {
93-
throw new LocalizedException(__('Encryption key can\'t be empty.'));
98+
throw new LocalizedException(__('Enter the encryption key and try again.'));
9499
}
95100
return hash('sha256', $token);
96101
}

app/code/Magento/Analytics/Model/ExportDataHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private function pack($source, $destination)
195195
private function validateSource(WriteInterface $directory, $path)
196196
{
197197
if (!$directory->isExist($path)) {
198-
throw new LocalizedException(__('Source "%1" is not exist', $directory->getAbsolutePath($path)));
198+
throw new LocalizedException(__('The "%1" source doesn\'t exist.', $directory->getAbsolutePath($path)));
199199
}
200200

201201
return $directory->getAbsolutePath($path);

app/code/Magento/Authorization/Model/Acl/AclRetriever.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getAllowedResourcesByUser($userType, $userId)
8484
$role = $this->_getUserRole($userType, $userId);
8585
if (!$role) {
8686
throw new AuthorizationException(
87-
__('We can\'t find the role for the user you wanted.')
87+
__("The role wasn't found for the user. Verify the role and try again.")
8888
);
8989
}
9090
$allowedResources = $this->getAllowedResourcesByRole($role->getId());

app/code/Magento/Authorization/Test/Unit/Model/Acl/AclRetrieverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testGetAllowedResourcesByUserTypeCustomer()
6060

6161
/**
6262
* @expectedException \Magento\Framework\Exception\AuthorizationException
63-
* @expectedExceptionMessage We can't find the role for the user you wanted.
63+
* @expectedExceptionMessage The role wasn't found for the user. Verify the role and try again.
6464
*/
6565
public function testGetAllowedResourcesByUserRoleNotFound()
6666
{

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Authorizenet\Controller\Directpost\Payment;
78

89
use Magento\Authorizenet\Controller\Directpost\Payment;
@@ -147,7 +148,7 @@ protected function placeCheckoutOrder()
147148
$result->setData('error', true);
148149
$result->setData(
149150
'error_messages',
150-
__('An error occurred on the server. Please try to place the order again.')
151+
__('A server error stopped your order from being placed. Please try to place your order again.')
151152
);
152153
}
153154
if ($response instanceof Http) {

app/code/Magento/Authorizenet/Model/TransactionService.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Authorizenet\Model;
78

89
use Magento\Framework\Exception\LocalizedException;
@@ -124,15 +125,15 @@ protected function loadTransactionDetails(Authorizenet $context, $transactionId)
124125
$responseXmlDocument = new Element($responseBody);
125126
libxml_use_internal_errors(false);
126127
} catch (\Exception $e) {
127-
throw new LocalizedException(__('Unable to get transaction details. Try again later.'));
128+
throw new LocalizedException(__('The transaction details are unavailable. Please try again later.'));
128129
} finally {
129130
$context->debugData($debugData);
130131
}
131132

132133
if (!isset($responseXmlDocument->messages->resultCode)
133134
|| $responseXmlDocument->messages->resultCode != static::PAYMENT_UPDATE_STATUS_CODE_SUCCESS
134135
) {
135-
throw new LocalizedException(__('Unable to get transaction details. Try again later.'));
136+
throw new LocalizedException(__('The transaction details are unavailable. Please try again later.'));
136137
}
137138

138139
$this->transactionDetails[$transactionId] = $responseXmlDocument;

app/code/Magento/Authorizenet/Test/Unit/Controller/Directpost/Payment/PlaceTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Authorizenet\Test\Unit\Controller\Directpost\Payment;
78

89
use Magento\Authorizenet\Controller\Directpost\Payment\Place;
@@ -297,7 +298,9 @@ public function textExecuteFailedPlaceOrderDataProvider()
297298
$objectFailed1 = new \Magento\Framework\DataObject(
298299
[
299300
'error' => true,
300-
'error_messages' => __('An error occurred on the server. Please try to place the order again.')
301+
'error_messages' => __(
302+
'A server error stopped your order from being placed. Please try to place your order again.'
303+
)
301304
]
302305
);
303306
$generalException = new \Exception('Exception logging will save the world!');

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Backend\Block\Widget\Grid\Massaction;
78

89
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
@@ -57,7 +58,7 @@ protected function _construct()
5758
{
5859
parent::_construct();
5960

60-
$this->setErrorText($this->escapeHtml(__('Please select items.')));
61+
$this->setErrorText($this->escapeHtml(__('An item needs to be selected. Select and try again.')));
6162

6263
if (null !== $this->getOptions()) {
6364
foreach ($this->getOptions() as $optionId => $option) {

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Backend\Block\Widget\Grid\Massaction;
78

89
/**
@@ -69,7 +70,7 @@ public function __construct(
6970
public function _construct()
7071
{
7172
parent::_construct();
72-
$this->setErrorText($this->escapeHtml(__('Please select items.')));
73+
$this->setErrorText($this->escapeHtml(__('An item needs to be selected. Select and try again.')));
7374
}
7475

7576
/**

0 commit comments

Comments
 (0)