Skip to content

Commit cb9ce0f

Browse files
committed
fix(formanswer): translate section name for targets
1 parent 8268814 commit cb9ce0f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

inc/formanswer.class.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,8 @@ public function getFullForm($richText = false): string {
11161116
$formFk = PluginFormcreatorForm::getForeignKeyField();
11171117
$fields = $this->getQuestionFields($this->fields[$formFk]);
11181118

1119+
$domain = PluginFormcreatorForm::getTranslationDomain($this->fields[$formFk]);
1120+
11191121
$this->deserializeAnswers();
11201122

11211123
// TODO: code very close to PluginFormcreatorAbstractTarget::parseTags() (factorizable ?)
@@ -1168,9 +1170,9 @@ public function getFullForm($richText = false): string {
11681170
$output .= ($richText ? '<p>&nbsp;</p>' : $eol);
11691171
}
11701172
if ($richText) {
1171-
$output .= '<h2>' . $question_line['section_name'] . '</h2>';
1173+
$output .= '<h2>' . __($question_line['section_name'], $domain) . '</h2>';
11721174
} else {
1173-
$output .= $eol . $question_line['section_name'] . $eol;
1175+
$output .= $eol . __($question_line['section_name'], $domain) . $eol;
11741176
$output .= '---------------------------------' . $eol;
11751177
}
11761178
$last_section = $question_line[$sectionFk];

0 commit comments

Comments
 (0)