Skip to content

Update CAPTCHA labels to reflect the symbols in the CAPTCHA image #12387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/code/Magento/Captcha/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Always,Always
"Incorrect CAPTCHA","Incorrect CAPTCHA"
"Incorrect CAPTCHA.","Incorrect CAPTCHA."
"The account is locked. Please wait and try again or contact %1.","The account is locked. Please wait and try again or contact %1."
"Please enter the letters from the image","Please enter the letters from the image"
"Please enter the letters and numbers from the image","Please enter the letters and numbers from the image"
"<strong>Attention</strong>: Captcha is case sensitive.","<strong>Attention</strong>: Captcha is case sensitive."
"Reload captcha","Reload captcha"
"Please type the letters below","Please type the letters below"
"Please type the letters and numbers below","Please type the letters and numbers below"
"Attention: Captcha is case sensitive.","Attention: Captcha is case sensitive."
CAPTCHA,CAPTCHA
"Enable CAPTCHA in Admin","Enable CAPTCHA in Admin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $captcha = $block->getCaptchaModel();
?>
<div class="admin__field _required">
<label for="captcha" class="admin__field-label">
<span><?= $block->escapeHtml(__('Please enter the letters from the image')) ?></span>
<span><?= $block->escapeHtml(__('Please enter the letters and numbers from the image')) ?></span>
</label>
<div class="admin__field-control">
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$captcha = $block->getCaptchaModel();
?>
<div class="field captcha required" role="<?= $block->escapeHtmlAttr($block->getFormId()) ?>">
<label for="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?= $block->escapeHtml(__('Please type the letters below')) ?></span></label>
<label for="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?= $block->escapeHtml(__('Please type the letters and numbers below')) ?></span></label>
<div class="control captcha">
<input name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtmlAttr($block->getFormId()) ?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" />
<div class="nested">
Expand All @@ -23,7 +23,7 @@ $captcha = $block->getCaptchaModel();
"imageLoader": "<?= $block->escapeUrl($block->getViewFileUrl('images/loader-2.gif')) ?>",
"type": "<?= $block->escapeHtmlAttr($block->getFormId()) ?>"}}'>
<div class="control captcha-image">
<img alt="<?= $block->escapeHtmlAttr(__('Please type the letters below')) ?>" class="captcha-img" height="<?= /* @noEscape */ (float) $block->getImgHeight() ?>" src="<?= $block->escapeUrl($captcha->getImgSrc()) ?>"/>
<img alt="<?= $block->escapeHtmlAttr(__('Please type the letters and numbers below')) ?>" class="captcha-img" height="<?= /* @noEscape */ (float) $block->getImgHeight() ?>" src="<?= $block->escapeUrl($captcha->getImgSrc()) ?>"/>
<button type="button" class="action reload captcha-reload" title="<?= $block->escapeHtmlAttr(__('Reload captcha')) ?>"><span><?= $block->escapeHtml(__('Reload captcha')) ?></span></button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
-->
<!-- ko if: (isRequired() && getIsVisible())-->
<div class="field captcha required" data-bind="blockLoader: getIsLoading()">
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="i18n: 'Please type the letters below'"></span></label>
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="i18n: 'Please type the letters and numbers below'"></span></label>
<div class="control captcha">
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" />
<input name="captcha_form_id" type="hidden" data-bind="value: formId, attr: {'data-scope': dataScope}" />
<div class="nested">
<div class="field captcha no-label">
<div class="control captcha-image">
<img data-bind="attr: {
alt: $t('Please type the letters below'),
alt: $t('Please type the letters and numbers below'),
height: imageHeight(),
src: getImageSource(),
}"
Expand Down