From 674028a7939d67135c22e0a8c6f97c3681fa947c Mon Sep 17 00:00:00 2001
From: Hanne Moa <hanne.moa@uninett.no>
Date: Fri, 28 Oct 2016 11:17:44 +0200
Subject: [PATCH] Add translations to the correct template

---
 modules/consentAdmin/www/consentAdmin.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php
index cf79cbfbb..f41733de3 100644
--- a/modules/consentAdmin/www/consentAdmin.php
+++ b/modules/consentAdmin/www/consentAdmin.php
@@ -187,7 +187,6 @@ if ($action !== null && $sp_entityid !== null) {
     }
     // init template to enable translation of status messages
     $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin');
-    $template->getTranslator()->includeLanguageFile('attributes.php'); // attribute listings translated by this dictionary
     $template->data['res'] = $res;
     $template->show();
     exit;
@@ -207,6 +206,7 @@ $template_sp_content = array();
 // Init template
 $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin');
 $translator = $template->getTranslator();
+$translator->includeLanguageFile('attributes.php'); // attribute listings translated by this dictionary
 $sp_empty_name = $translator->getTag('sp_empty_name');
 $sp_empty_description = $translator->getTag('sp_empty_description');
 
-- 
GitLab