1

Where can I find the location to know the exact translation string? I need to translate this sentence "We received too many requests for password resets. Please wait and try again later or contact" to Dutch language.

Regards,

2 Answers 2

0

It seems is a two string sentence that gets built in these files:

vendor/magento/module-security/Model/SecurityChecker/Quantity.php:62:                       
'We received too many requests for password resets. '
vendor/magento/module-security/Model/SecurityChecker/Frequency.php:80:                        
'We received too many requests for password resets. '
vendor/magento/module-security/Model/SecurityChecker/Quantity.php:63:                        
. 'Please wait and try again later or contact %1.',
vendor/magento/module-security/Model/SecurityChecker/Frequency.php:81:                        
. 'Please wait and try again later or contact %1.',

The string is formed like this:

                throw new SecurityViolationException(
                    __(
                        'We received too many requests for password resets. '
                        . 'Please wait and try again later or contact %1.',
                        $this->securityConfig->getCustomerServiceEmail()
                    )
                );

So probably you would have to add it to the translations csv like this: 'We received too many requests for password resets. Please wait and try again later or contact %1.'

Or as two separate strings:
'We received too many requests for password resets. '
'Please wait and try again later or contact %1.'

3
  • I did find those locations also, but what I the correct way to translate them?
    – n00bly
    Jun 5, 2019 at 12:51
  • 1
    Check the answer now, just updated it
    – SantiBM
    Jun 5, 2019 at 12:56
  • Thanks, this is the correct one: "We received too many requests for password resets. Please wait and try again later or contact %1."
    – n00bly
    Jun 5, 2019 at 13:01
0

You Will have to specify the module name at the end of your translation line.

Which in this case is module,Magento_Security

So the complete line for your csv file will be :

"We received too many requests for password resets. Please wait and try again later or contact %1.","The translated string for the given message %1.",module,Magento_Security

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.