Skip to content

Commit

Permalink
Merge pull request #272 from magento-webdev/PR-2
Browse files Browse the repository at this point in the history
[WebDev] Bugfixes
  • Loading branch information
Momotenko,Natalia(nmomotenko) committed Dec 28, 2015
2 parents 8ebcb63 + 60fb8b3 commit 68ffedf
Show file tree
Hide file tree
Showing 77 changed files with 248 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function execute()
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __('Unable to delete store. Please, try again later.'));
$this->messageManager->addException($e, __('Unable to delete the store. Please try again later.'));
}
return $redirectResult->setPath('adminhtml/*/editGroup', ['group_id' => $itemId]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function execute()
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __('Unable to delete store view. Please, try again later.'));
$this->messageManager->addException($e, __('Unable to delete the store view. Please try again later.'));
}
return $redirectResult->setPath('adminhtml/*/editStore', ['store_id' => $itemId]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function execute()
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __('Unable to delete website. Please, try again later.'));
$this->messageManager->addException($e, __('Unable to delete the website. Please try again later.'));
}
return $redirectResult->setPath('*/*/editWebsite', ['website_id' => $itemId]);
}
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="enable_js_bundling" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable Javascript Bundling</label>
<label>Enable JavaScript Bundling</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="minify_files" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
Expand All @@ -215,7 +215,7 @@
<label>Image Adapter</label>
<source_model>Magento\Config\Model\Config\Source\Image\Adapter</source_model>
<backend_model>Magento\Config\Model\Config\Backend\Image\Adapter</backend_model>
<comment>When the adapter was changed, please, flush Catalog Images Cache.</comment>
<comment>When the adapter was changed, please flush Catalog Images Cache.</comment>
</field>
</group>
<group id="static" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="0" showInStore="0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<button onclick="setLocation('<?php /* @escapeNotVerified */ echo $block->getCleanMediaUrl() ?>')" type="button">
<?php /* @escapeNotVerified */ echo __('Flush JavaScript/CSS Cache') ?>
</button>
<span><?php /* @escapeNotVerified */ echo __('Themes JavaScript and CSS files combined to one file.') ?></span>
<span><?php /* @escapeNotVerified */ echo __('Themes JavaScript and CSS files combined to one file') ?></span>
</p>
<?php
if (!$block->isInProductionMode()):
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Braintree/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<config_path>payment/braintree/debug</config_path>
</field>
<field id="capture_action" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Capture action</label>
<label>Capture Action</label>
<source_model>Magento\Braintree\Model\Source\CaptureAction</source_model>
<config_path>payment/braintree/capture_action</config_path>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function validate(array $validationSubject)
$this->validateSuccess($response)
&& $this->validateErrors($response)
&& $this->validateTransactionStatus($response),
[__('Transaction has been declined, please, try again later.')]
[__('Transaction has been declined. Please try again later.')]
);

return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function testValidate(array $validationSubject, $isValid)
->method('create')
->with([
'isValid' => $isValid,
'failsDescription' => ['Transaction has been declined, please, try again later.']
'failsDescription' => ['Transaction has been declined. Please try again later.']
])
->willReturn($resultMock);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function _prepareLayout()
$accordion->addItem(
'price',
[
'title' => __('We saved the price alert subscription.'),
'title' => __('Price Alert Subscriptions'),
'content' => $this->getLayout()->createBlock(
'Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts\Price'
)->toHtml() . '<br />',
Expand All @@ -47,7 +47,7 @@ protected function _prepareLayout()
$accordion->addItem(
'stock',
[
'title' => __('We saved the stock notification.'),
'title' => __('Stock Alert Subscriptions'),
'content' => $this->getLayout()->createBlock(
'Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts\Stock'
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ toggleValueElements($('inventory_use_config_max_sale_qty'), $('inventory_use_con
<?php if (!$block->isVirtual()) : ?>
<div class="field">
<label class="label" for="inventory_is_decimal_divided">
<span><?php /* @escapeNotVerified */ echo __('Allow Multiple Boxes for Shipping.') ?></span>
<span><?php /* @escapeNotVerified */ echo __('Allow Multiple Boxes for Shipping') ?></span>
</label>
<div class="control">
<select id="inventory_is_decimal_divided" name="<?php /* @escapeNotVerified */ echo $block->getFieldSuffix() ?>[stock_data][is_decimal_divided]" <?php /* @escapeNotVerified */ echo $_readonly;?>>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogInventory/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<validate>validate-number</validate>
</field>
<field id="display_product_stock_status" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Display products availability in stock on Storefront.</label>
<label>Display Products Availability in Stock on Storefront</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function saveAddressInformation(
$this->totalsCollector->collectAddressTotals($quote, $address);
} catch (\Exception $e) {
$this->logger->critical($e);
throw new InputException(__('Unable to save address. Please, check input data.'));
throw new InputException(__('Unable to save address. Please check input data.'));
}

if (!$address->getShippingRateByCode($address->getShippingMethod())) {
Expand All @@ -171,7 +171,7 @@ public function saveAddressInformation(
$this->quoteRepository->save($quote);
} catch (\Exception $e) {
$this->logger->critical($e);
throw new InputException(__('Unable to save shipping information. Please, check input data.'));
throw new InputException(__('Unable to save shipping information. Please check input data.'));
}

/** @var \Magento\Checkout\Api\Data\PaymentDetailsInterface $paymentDetails */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function testSaveAddressInformationIfShippingAddressNotSet()

/**
* @expectedException \Magento\Framework\Exception\InputException
* @expectedExceptionMessage Unable to save address. Please, check input data.
* @expectedExceptionMessage Unable to save address. Please check input data.
*/
public function testSaveAddressInformationThrowExceptionWhileAddressSaving()
{
Expand Down Expand Up @@ -494,7 +494,7 @@ public function testSaveAddressInformationIfMinimumAmountIsNotValid()

/**
* @expectedException \Magento\Framework\Exception\InputException
* @expectedExceptionMessage Unable to save shipping information. Please, check input data.
* @expectedExceptionMessage Unable to save shipping information. Please check input data.
*/
public function testSaveAddressInformationIfCanNotSaveQuote()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ define(
emailValidationResult = customer.isLoggedIn();

if (!quote.shippingMethod()) {
this.errorValidationMessage('Please specify a shipping method');
this.errorValidationMessage('Please specify a shipping method.');

return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</div>
<div class="secondary">
<a class="action action-remind" data-bind="attr: { href: forgotPasswordUrl }">
<span data-bind="i18n: 'Forgot Password'"></span>
<span data-bind="i18n: 'Forgot Your Password?'"></span>
</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p data-bind="i18n: 'You can track your order status by creating an account.'"></p>
<p><span data-bind="i18n: 'Email Address'"></span>: <span data-bind="text: getEmailAddress()"></span></p>
<form method="post" data-bind="submit: createAccount">
<input type="submit" class="action primary" data-bind="value: $t('Create Account'), disable: creationStarted" />
<input type="submit" class="action primary" data-bind="value: $t('Create an Account'), disable: creationStarted" />
</form>
<!-- /ko -->
<!-- ko if: accountCreated -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function testGetCurrentPathThrowException()
$this->directoryWriteMock->expects($this->any())
->method('create')
->willThrowException(
new \Magento\Framework\Exception\FileSystemException(__('Could not create directory.'))
new \Magento\Framework\Exception\FileSystemException(__('Could not create a directory.'))
);

$this->imagesHelper->getCurrentPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function prepareDataSource(array $dataSource)
isset($item['_first_store_id']) ? $item['_first_store_id'] : null,
isset($item['store_code']) ? $item['store_code'] : null
),
'label' => __('Preview')
'label' => __('View')
];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,15 @@ define([
switch (section.type()) {
case 'each':
if (!section.attribute()) {
throw new Error($.mage.__('Please, select attribute for the section ' + section.label));
throw new Error($.mage.__('Please select attribute for {section} section.')
.replace('{section}', section.label));
}
break;

case 'single':
if (!section.value()) {
throw new Error($.mage.__('Please fill in the values for the section ' + section.label));
throw new Error($.mage.__('Please fill in the values for {section} section.')
.replace('{section}', section.label));
}
break;
}
Expand All @@ -267,22 +269,22 @@ define([
});

if (!formValid) {
throw new Error($.mage.__('Please, fill correct values'));
throw new Error($.mage.__('Please fill-in correct values.'));
}
},
validateImage: function () {
switch (this.sections().images.type()) {
case 'each':
_.each(this.sections()['images'].attribute().chosen, function (option) {
if (!option.sections().images.images.length) {
throw new Error($.mage.__('Please, select image(s) for your attribute'));
throw new Error($.mage.__('Please select image(s) for your attribute.'));
}
});
break;

case 'single':
if (this.sections().images.value().file == null) {
throw new Error($.mage.__('Please choose image(s)'));
throw new Error($.mage.__('Please choose image(s).'));
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ define([
setNotificationMessage: function () {
if (this.mode === 'edit') {
this.wizard.setNotificationMessage($.mage.__('When you remove or add an attribute, we automatically ' +
'update all configurations and you will need to manually recreate the current configurations.'));
'update all configurations and you will need to recreate current configurations manually.'));
}
},
doSelectSavedAttributes: function () {
Expand Down Expand Up @@ -90,7 +90,7 @@ define([
wizard.data.attributesIds = this.multiselect().selected;

if (!wizard.data.attributesIds() || wizard.data.attributesIds().length === 0) {
throw new Error($.mage.__('Please, select attribute(s)'));
throw new Error($.mage.__('Please select attribute(s).'));
}
this.setNotificationMessage();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function execute()
$data[$currencyCode][$currencyTo] = $value;
if ($value == 0) {
$this->messageManager->addWarning(
__('Please correct the input data for %1 => %2 rate', $currencyCode, $currencyTo)
__('Please correct the input data for "%1 => %2" rate.', $currencyCode, $currencyTo)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function _prepareLayout()
'label' => __('Group Name'),
'title' => __('Group Name'),
'note' => __(
'Maximum length must be less then %1 symbols',
'Maximum length must be less then %1 characters.',
\Magento\Customer\Model\GroupManagement::GROUP_CODE_MAX_LENGTH
),
'class' => $validateClass,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Setup/CustomerSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function getDefaultEntities()
],
'dob' => [
'type' => 'static',
'label' => 'Date Of Birth',
'label' => 'Date of Birth',
'input' => 'date',
'frontend' => 'Magento\Eav\Model\Entity\Attribute\Frontend\Datetime',
'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\Datetime',
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Setup/InstallSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
\Magento\Framework\DB\Ddl\Table::TYPE_DATE,
null,
[],
'Date Of Birth'
'Date of Birth'
)->addColumn(
'password_hash',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<referenceBlock name="page.main.title">
<action method="setPageTitle">
<argument name="title" translate="true" xsi:type="string">You are signed out.</argument>
<argument name="title" translate="true" xsi:type="string">You are signed out</argument>
</action>
</referenceBlock>
<referenceContainer name="content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</div>

<?php if ($block->isDefaultBilling()): ?>
<div class="field note default"><?php /* @escapeNotVerified */ echo __('Default Billing Address') ?></div>
<div class="message info"><?php /* @escapeNotVerified */ echo __("It's a default billing address.") ?></div>
<?php elseif ($block->canSetAsDefaultBilling()): ?>
<div class="field choice set billing">
<input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
Expand All @@ -111,7 +111,7 @@
<?php endif; ?>

<?php if ($block->isDefaultShipping()): ?>
<div class="field note default"><?php /* @escapeNotVerified */ echo __('Default Shipping Address') ?></div>
<div class="message info"><?php /* @escapeNotVerified */ echo __("It's a default shipping address.") ?></div>
<?php elseif ($block->canSetAsDefaultShipping()): ?>
<div class="field choice set shipping">
<input type="checkbox" id="primary_shipping" name="default_shipping" value="1" class="checkbox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</fieldset>
<div class="actions-toolbar">
<div class="primary">
<button type="submit" class="action submit primary"><span><?php /* @escapeNotVerified */ echo __('Submit') ?></span></button>
<button type="submit" class="action submit primary"><span><?php /* @escapeNotVerified */ echo __('Reset My Password') ?></span></button>
</div>
<div class="secondary">
<a class="action back" href="<?php /* @escapeNotVerified */ echo $block->getLoginUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Go back') ?></span></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</div>
<?php echo $block->getChildHtml('form_additional_info'); ?>
<div class="actions-toolbar">
<div class="primary"><button type="submit" class="action login primary" name="send" id="send2"><span><?php /* @escapeNotVerified */ echo __('Login') ?></span></button></div>
<div class="primary"><button type="submit" class="action login primary" name="send" id="send2"><span><?php /* @escapeNotVerified */ echo __('Sign In') ?></span></button></div>
<div class="secondary"><a class="action remind" href="<?php /* @escapeNotVerified */ echo $block->getForgotPasswordUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Forgot Your Password?') ?></span></a></div>
</div>
</fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="actions-toolbar">
<div class="primary">
<a class="action action-register primary" data-bind="attr: {href: registerUrl}">
<span data-bind="i18n: 'Create Account'"></span>
<span data-bind="i18n: 'Create an Account'"></span>
</a>
</div>
</div>
Expand Down
Loading

0 comments on commit 68ffedf

Please sign in to comment.