From c16b96734c4ea382cdfe3fed03a8068f3c0336bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Thu, 1 Jan 2009 16:03:56 +0000
Subject: [PATCH] Added support for translation of iframe SLO. Thanks for
 Anders Lund and Cato Olsen for this contribution.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1078 44740490-163a-0410-bde0-09ae8108e29a
---
 templates/default/logout-iframe.php         | 30 ++++++++++-----------
 www/saml2/idp/SingleLogoutServiceiFrame.php |  6 -----
 2 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/templates/default/logout-iframe.php b/templates/default/logout-iframe.php
index c55eead09..b9ec98fc2 100644
--- a/templates/default/logout-iframe.php
+++ b/templates/default/logout-iframe.php
@@ -76,7 +76,6 @@ function sendResponse() {
 	
 ?>
 
-
 <!-- Proper fallback for browsers that do not support javascript or have javascript turned off -->
 <noscript> 
 	<div id="nojavascriptframe">
@@ -101,13 +100,12 @@ function sendResponse() {
 	
 	$requestername = is_array($this->data['requesterName']) ? 
 		$this->getTranslation($this->data['requesterName']) : $this->data['requesterName'];
+
+	echo('<p>' . $this->t('{logout:description}', array('%REQUESTERNAME%' => $requestername)) . '</p>');
 	
 	?>
-	<p>You have initiated a <strong>global logout</strong> from the service <strong><?php echo $requestername; ?></strong>. Global logout means you will be logged out from all of the services listed below.</p>
-
-
 
-	<!-- <div class="loggedout">Logout was started from <?php echo $requestername; ?>.</div> -->
+	<!-- <div class="loggedout"><?php echo($this->t('{logout:logged_out}', array('%REQUESTERNAME%' => $requestername))); ?></div> -->
 
 	<?php
 
@@ -119,7 +117,7 @@ function sendResponse() {
 		echo '<tr class="initiated" id="e' . sha1($spentityid) . '">' . "\n";
 		echo '	<td><img style="float: left; margin: 3px" src="/' . $this->data['baseurlpath'] . 
 			'resources/icons/silk/accept.png" alt="Initiated from" /></td>' . "\n";
-		echo '	<td>Initiated logout</td>';
+		echo '	<td>' . $this->t('{logout:initiated}') . '</td>';
 		echo '	<td>' . $requestername . '</td>' ."\n";
 		echo '</tr>' . "\n";
 		
@@ -150,10 +148,10 @@ function sendResponse() {
 			echo '	</td>' . "\n";
 			
 			echo '	<td class="statustext">';
-			echo '		<span class="completed">Completed</span>' . "\n";
-			echo '		<span class="onhold">On hold</span>' . "\n";
-			echo '		<span class="inprogress">Logging out…</span>' . "\n";
-			echo '		<span class="failed">Logout failed</span>' . "\n";
+			echo '		<span class="completed">' . $this->t('{logout:completed}') . '</span>' . "\n";
+			echo '		<span class="onhold">' . $this->t('{logout:hold}') . '</span>' . "\n";
+			echo '		<span class="inprogress">' . $this->t('{logout:progress}') . '</span>' . "\n";
+			echo '		<span class="failed">' . $this->t('{logout:failed}') . '</span>' . "\n";
 			echo '	</td>';
 			echo '	<td>' . $spname . '</td>' ."\n";
 			
@@ -172,9 +170,9 @@ function sendResponse() {
 
 	?>
 
-	<p id="confirmation" style="margin-top: 1em" >Do you want to continue global logout? <br />
-		<input type="button" id="ok" name="ok" value="Yes, continue logout" />
-		<input type="button" id="cancel" name="cancel" value="Cancel logout" />
+	<p id="confirmation" style="margin-top: 1em" ><?php echo $this->t('{logout:continue}'); ?> <br />
+		<input type="button" id="ok" name="ok" value="<?php echo $this->t('{logout:do_continue}'); ?>" />
+		<input type="button" id="cancel" name="cancel" value="<?php echo $this->t('{logout:cancel}'); ?>" />
 	</p>
 	
 	<div id="interrupt" style="margin-top: 1em; border: 1px solid #ccc; padding: 1em; background: #eaeaea" >
@@ -182,8 +180,8 @@ function sendResponse() {
 			<img src="/<?php echo($this->data['baseurlpath']); ?>resources/icons/timeout.png" 
 				style="float: left; margin: 0px 5px 0px 0px"
 				/>
-			If some of the service providers do not respond in reasonable time, you are encouraged to close your browser to ensure sessions are closed. <br />
-			<input type="button" id="interruptbutton" name="interrupt" value="Return to service" />
+			<?php echo $this->t('{logout:respond_info}'); ?> <br />
+			<input type="button" id="interruptbutton" name="interrupt" value="<?php echo $this->t('{logout:return}'); ?>" />
 		</p>
 	</div>
 	
@@ -196,7 +194,7 @@ function sendResponse() {
 		</p>
 
 		<div class="completedButWarnings">
-			<input type="button" id="returnanyway" name="ok" value="Return to service" />
+			<input type="button" id="returnanyway" name="ok" value="<?php echo $this->t('{logout:return}'); ?>" />
 		</div>
 
 	</div>
diff --git a/www/saml2/idp/SingleLogoutServiceiFrame.php b/www/saml2/idp/SingleLogoutServiceiFrame.php
index 49f26b476..88b746a0e 100644
--- a/www/saml2/idp/SingleLogoutServiceiFrame.php
+++ b/www/saml2/idp/SingleLogoutServiceiFrame.php
@@ -331,12 +331,6 @@ try {
 }
 
 
-#SimpleSAML_Logger::debug('SAML2.0 - SP Counter. other SPs with SLO support (' . count($sparray) . ')  without SLO support (' . count($sparrayNoLogout) . ')');
-
-
-
-
-
 
 
 $spmeta = $metadata->getMetaData($requester, 'saml20-sp-remote');
-- 
GitLab