I spotted a bug in the checkbox, it doesn't contain the translate function for the title.

old:

    $form['conditional_logic']['states_clear'] = [
      '#type' => 'checkbox',
      '#title' => 'Clear value(s) when hidden',
      '#return_value' => TRUE,
      '#description' => ($this instanceof ContainerBase) ?
        $this->t("When this container is hidden all this container's subelement values will be cleared.")
        :
        $this->t("When this element is hidden, this element's value will be cleared."),
    ];

fixed:

    $form['conditional_logic']['states_clear'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('Clear value(s) when hidden'),
      '#return_value' => TRUE,
      '#description' => ($this instanceof ContainerBase) ?
        $this->t("When this container is hidden all this container's subelement values will be cleared.")
        :
        $this->t("When this element is hidden, this element's value will be cleared."),
    ];

I noticed this, tested it, and with the fix I can translate it. I'll see if I can add the patch myself, not my strong point, in a bit of a rush.

Comments

bskibinski created an issue. See original summary.

  • e9278b5 committed on 8.x-5.x
    Issue #3160285: "Clear value(s) when hidden" Untranslatable, missing T...

  • e9278b5 committed on 6.x
    Issue #3160285: "Clear value(s) when hidden" Untranslatable, missing T...
jrockowitz’s picture

Status: Active » Fixed
bskibinski’s picture

Awesome! thanks jrockowitz, didn't have clone rights for webforms, need to sort some things out to be able to make proper patch :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.