When importing translation while drupal installation, throwing ERROR: "SOME_TRANSLATED_STRING" was skipped because of disallowed or malformed HTML.
We notice the cause is this lines of code in commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php
$form_state->setError($name_element, $this->t('Too many failed login attempts for this account. It is temporarily blocked. Try again later or <a href=":url">request a new password</a>.', [':url' => $password_url]));
and
$form_state->setError($name_element, $this->t('Unrecognized username or password. <a href=":url">Have you forgotten your password?</a>', [':url' => $password_url]));
This two lines bring the link tag which is disallowed in drupal core strategies.
Comments
Comment #2
jsacksick commentedMight be due to a custom import do a format disallowing HTML? In which case this might be due to how your format is configured... Not so much we can do from Commerce. Plenty of modules, including core define translatable strings containing HTML.
Comment #3
geek-merlinA small thing that annoys me on every config import on deploy.
In german, it's this:
Count the quotes! (Contrary to the asian translators, the germans copied over the wrong quoting. The problem is the quoting of the source though.)
Who wants to roll a patch: Go to that file and s/":url"">/":url">/
Comment #4
santanu mondal commentedComment #6
santanu mondal commentedComment #7
geek-merlin700 changed files? Sth gotten messed up.
Comment #8
geek-merlinMaybe it's a branch issue?
Comment #9
geek-merlinComment #10
geek-merlinMust be rebased onto 3.x manually.
Comment #12
jsacksick commentedFixed this, thanks!