0

2.2 in a drupal 10 solution. I am trying translate via the UI the following error that I can see at WebformElementBase.php

  $form_state->setError($element, t('The value %value sdsadad %name element. You may have already submitted this webform, or you need to use a different value.', $t_args));

I search both under admin/config/regional/translate and admin/structure/webform/config/advanced.

I have already loaded the page with the string so it should appear under translations if that was the case.

6
  • Are you sure thats the code from WebformElementBase.php? specifically this bit? sdsadad Commented Jul 10 at 13:22
  • I added that part to see if it would load in the UI so I know it is the correct string I am loading. Commented Jul 10 at 13:25
  • 4
    Assuming it is the right code (and the gibberish is something you've added to try and shake it into doing something), make sure you've actually seen this message in the front end, in the language you're trying to translate into. It won't be in the translation table until it's been first rendered
    – Clive
    Commented Jul 10 at 13:26
  • It has been rendered, maybe a bug in t(' function. _/ Commented Jul 10 at 13:42
  • 2
    Ok so the part that I missed was the on @Clive point out. It needs to be seen in the specific language. Thanks! You wanna make it an answer and I'll accept it? Commented Jul 11 at 6:53

1 Answer 1

1

Assuming it is the right code (and the gibberish is something you've added to try and shake it into doing something), make sure you've actually seen this message in the front end, in the language you're trying to translate into.

It won't be in the translation table until it's been first rendered.

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.