Skip to content

Commit c74256b

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-84702: [SE Dev] Error Messages edits, part 1 (966 of 1166 total)
- several messages are updated
1 parent f783440 commit c74256b

File tree

399 files changed

+1841
-865
lines changed

Some content is hidden

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

399 files changed

+1841
-865
lines changed

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
/**

app/code/Magento/Backend/Controller/Adminhtml/Cache.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\Controller\Adminhtml;
78

89
use Magento\Backend\App\Action;
@@ -73,7 +74,7 @@ protected function _validateTypes(array $types)
7374
$allTypes = array_keys($this->_cacheTypeList->getTypes());
7475
$invalidTypes = array_diff($types, $allTypes);
7576
if (count($invalidTypes) > 0) {
76-
throw new LocalizedException(__('Specified cache type(s) don\'t exist: %1', join(', ', $invalidTypes)));
77+
throw new LocalizedException(__('These cache type(s) don\'t exist: %1', join(', ', $invalidTypes)));
7778
}
7879
}
7980
}

app/code/Magento/Backend/Model/Auth.php

Lines changed: 18 additions & 4 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\Backend\Model;
78

89
use Magento\Framework\Exception\AuthenticationException;
@@ -148,7 +149,12 @@ public function getCredentialStorage()
148149
public function login($username, $password)
149150
{
150151
if (empty($username) || empty($password)) {
151-
self::throwException(__('You did not sign in correctly or your account is temporarily disabled.'));
152+
self::throwException(
153+
__(
154+
'The account sign-in was incorrect or your account is disabled temporarily. '
155+
. 'Please wait and try again later.'
156+
)
157+
);
152158
}
153159

154160
try {
@@ -165,7 +171,12 @@ public function login($username, $password)
165171
}
166172

167173
if (!$this->getAuthStorage()->getUser()) {
168-
self::throwException(__('You did not sign in correctly or your account is temporarily disabled.'));
174+
self::throwException(
175+
__(
176+
'The account sign-in was incorrect or your account is disabled temporarily. '
177+
. 'Please wait and try again later.'
178+
)
179+
);
169180
}
170181
} catch (PluginAuthenticationException $e) {
171182
$this->_eventManager->dispatch(
@@ -179,7 +190,10 @@ public function login($username, $password)
179190
['user_name' => $username, 'exception' => $e]
180191
);
181192
self::throwException(
182-
__($e->getMessage()? : 'You did not sign in correctly or your account is temporarily disabled.')
193+
__(
194+
$e->getMessage()? : 'The account sign-in was incorrect or your account is disabled temporarily. '
195+
. 'Please wait and try again later.'
196+
)
183197
);
184198
}
185199
}
@@ -215,7 +229,7 @@ public function isLoggedIn()
215229
public static function throwException(Phrase $msg = null)
216230
{
217231
if ($msg === null) {
218-
$msg = __('Authentication error occurred.');
232+
$msg = __('An authentication error occurred. Verify and try again.');
219233
}
220234
throw new AuthenticationException($msg);
221235
}

app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php

Lines changed: 7 additions & 3 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\Backend\Model\Config\SessionLifetime;
78

89
use Magento\Framework\App\Config\Value;
@@ -26,14 +27,17 @@ class BackendModel extends Value
2627
*/
2728
public function beforeSave()
2829
{
29-
$value = (int) $this->getValue();
30+
$value = (int)$this->getValue();
3031
if ($value > self::MAX_LIFETIME) {
3132
throw new LocalizedException(
32-
__('Admin session lifetime must be less than or equal to 31536000 seconds (one year)')
33+
__(
34+
'The Admin session lifetime is invalid. '
35+
. 'Set the lifetime to 31536000 seconds (one year) or shorter and try again.'
36+
)
3337
);
3438
} elseif ($value < self::MIN_LIFETIME) {
3539
throw new LocalizedException(
36-
__('Admin session lifetime must be greater than or equal to 60 seconds')
40+
__('The Admin session lifetime is invalid. Set the lifetime to 60 seconds or longer and try again.')
3741
);
3842
}
3943
return parent::beforeSave();

0 commit comments

Comments
 (0)