Skip to content

Commit

Permalink
[BUGFIX] Make AdvancedPassword confirmation error translatable
Browse files Browse the repository at this point in the history
Resolves: #87722
Releases: master, 9.5
Change-Id: Icabb810a67a900ff0632256d36fb05b888912f83
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60581
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
  • Loading branch information
Michael Waack authored and waldhacker1 committed Apr 26, 2019
1 parent 333cd85 commit 591d8e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion typo3/sysext/form/Classes/Hooks/FormElementHooks.php
Expand Up @@ -20,6 +20,7 @@
use TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface;
use TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface;
use TYPO3\CMS\Form\Domain\Runtime\FormRuntime;
use TYPO3\CMS\Form\Service\TranslationService;

/**
* Scope: frontend
Expand Down Expand Up @@ -48,7 +49,11 @@ public function afterSubmit(FormRuntime $formRuntime, RenderableInterface $rende
$processingRule = $renderable->getRootForm()->getProcessingRule($renderable->getIdentifier());
$processingRule->getProcessingMessages()->addError(
GeneralUtility::makeInstance(ObjectManager::class)
->get(Error::class, 'Password doesn\'t match confirmation', 1334768052)
->get(
Error::class,
TranslationService::getInstance()->translate('validation.error.1521293688', null, 'EXT:form/Resources/Private/Language/locallang.xlf'),
1556283177
)
);
}
$elementValue = $elementValue['password'];
Expand Down
3 changes: 3 additions & 0 deletions typo3/sysext/form/Resources/Private/Language/locallang.xlf
Expand Up @@ -97,6 +97,9 @@
<trans-unit id="validation.error.1521293687" xml:space="preserve">
<source>You must select a date after %s.</source>
</trans-unit>
<trans-unit id="validation.error.1556283177" xml:space="preserve">
<source>Password does not match confirmation</source>
</trans-unit>
<trans-unit id="form_new_wizard_title" xml:space="preserve">
<source>Form</source>
</trans-unit>
Expand Down

0 comments on commit 591d8e9

Please sign in to comment.