[BUGFIX] Make AdvancedPassword confirmation error translatable 73/60573/4
authorMichael Waack <m.waack@i-d.de>
Fri, 26 Apr 2019 12:55:44 +0000 (14:55 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 26 Apr 2019 16:41:53 +0000 (18:41 +0200)
Resolves: #87722
Releases: master, 9.5
Change-Id: Icabb810a67a900ff0632256d36fb05b888912f83
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60573
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
typo3/sysext/form/Classes/Hooks/FormElementHooks.php
typo3/sysext/form/Resources/Private/Language/locallang.xlf

index 52ec64d..86e5e87 100644 (file)
@@ -20,6 +20,7 @@ use TYPO3\CMS\Extbase\Validation\Error;
 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
@@ -48,7 +49,11 @@ class FormElementHooks
                 $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'];
index 210993c..7cabb6d 100644 (file)
@@ -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>