From cd80749c80380bd0870a1b85e75ec8147545a13c Mon Sep 17 00:00:00 2001 From: Julia Beck <j4lib@users.noreply.github.com> Date: Thu, 20 Jul 2017 14:50:57 +0200 Subject: [PATCH] Add option 'translationTextDomain' to renderSimple (#1009) --- .../src/VuFind/View/Helper/Root/RecordDataFormatter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php index cf5e262c106..80645778afa 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php @@ -276,6 +276,8 @@ class RecordDataFormatter extends AbstractHelper $view = $this->getView(); $escaper = (isset($options['translate']) && $options['translate']) ? $view->plugin('transEsc') : $view->plugin('escapeHtml'); + $transDomain = isset($options['translationTextDomain']) + ? $options['translationTextDomain'] : ''; $separator = isset($options['separator']) ? $options['separator'] : '<br />'; $retVal = ''; @@ -283,7 +285,7 @@ class RecordDataFormatter extends AbstractHelper $remaining = count($data); foreach ($array as $line) { $remaining--; - $text = $escaper($line); + $text = $escaper($transDomain . $line); $retVal .= ($link = $this->getLink($line, $options)) ? '<a href="' . $link . '">' . $text . '</a>' : $text; if ($remaining > 0) { -- GitLab