Skip to content

Commit

Permalink
fix(formanswer): translate section name for targets
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 22, 2024
1 parent 8268814 commit cb9ce0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,8 @@ public function getFullForm($richText = false): string {
$formFk = PluginFormcreatorForm::getForeignKeyField();
$fields = $this->getQuestionFields($this->fields[$formFk]);

$domain = PluginFormcreatorForm::getTranslationDomain($this->fields[$formFk]);

$this->deserializeAnswers();

// TODO: code very close to PluginFormcreatorAbstractTarget::parseTags() (factorizable ?)
Expand Down Expand Up @@ -1168,9 +1170,9 @@ public function getFullForm($richText = false): string {
$output .= ($richText ? '<p>&nbsp;</p>' : $eol);
}
if ($richText) {
$output .= '<h2>' . $question_line['section_name'] . '</h2>';
$output .= '<h2>' . __($question_line['section_name'], $domain) . '</h2>';
} else {
$output .= $eol . $question_line['section_name'] . $eol;
$output .= $eol . __($question_line['section_name'], $domain) . $eol;
$output .= '---------------------------------' . $eol;
}
$last_section = $question_line[$sectionFk];
Expand Down

0 comments on commit cb9ce0f

Please sign in to comment.