Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2020 at 11:45 UTC
Updated:
3 Aug 2020 at 14:59 UTC
Jump to comment: Most recent
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
Comment #4
jrockowitz commentedComment #5
bskibinskiAwesome! thanks jrockowitz, didn't have clone rights for webforms, need to sort some things out to be able to make proper patch :)