- Issue created by @nessunluogo
- last update
about 1 year ago 89 pass - 🇮🇳India Suryakumar1626
Tested. Now the options are translatable. Working Fine.
In the Quiz edit form, Taking options, the keep results field has tree options but two of theese ("The newest" and "All") are not translatable.
Just add the t function in /src/Entity/Quiz.php, baseFieldDefinitions function, rows 228 and 229.
$fields['keep_results'] = BaseFieldDefinition::create('list_integer')
->setDisplayConfigurable('form', TRUE)
->setRevisionable(TRUE)
->setCardinality(1)
->setDefaultValue(2)
->setRequired(TRUE)
->setDisplayOptions('form', [
'type' => 'options_buttons',
])
->setSetting('allowed_values', [
0 => t('The best'),
1 => t('The newest'),
2 => t('All'),
])
->setLabel(t('Store results'))
->setDescription(t('These results should be stored for each user.'));
Attaching patch.
Needs review
6.0
Code - Quiz core
Tested. Now the options are translatable. Working Fine.