From 0c6cd70b810c5d0b9c212d5135953a90db9f8104 Mon Sep 17 00:00:00 2001
From: Jan Oppolzer <jan.oppolzer@gmail.com>
Date: Fri, 2 May 2014 14:25:53 +0200
Subject: [PATCH] Expirycheck module changes for translation

Dictionaries files in expirycheck module renamed in order to solve
collision with dictionaries files in preprodwarning module.
---
 ...nition.json => expwarning.definition.json} |  0
 ...ation.json => expwarning.translation.json} |  0
 .../expirycheck/templates/about2expire.php    | 28 +++++++++----------
 modules/expirycheck/templates/expired.php     | 10 +++----
 4 files changed, 19 insertions(+), 19 deletions(-)
 rename modules/expirycheck/dictionaries/{warning.definition.json => expwarning.definition.json} (100%)
 rename modules/expirycheck/dictionaries/{warning.translation.json => expwarning.translation.json} (100%)

diff --git a/modules/expirycheck/dictionaries/warning.definition.json b/modules/expirycheck/dictionaries/expwarning.definition.json
similarity index 100%
rename from modules/expirycheck/dictionaries/warning.definition.json
rename to modules/expirycheck/dictionaries/expwarning.definition.json
diff --git a/modules/expirycheck/dictionaries/warning.translation.json b/modules/expirycheck/dictionaries/expwarning.translation.json
similarity index 100%
rename from modules/expirycheck/dictionaries/warning.translation.json
rename to modules/expirycheck/dictionaries/expwarning.translation.json
diff --git a/modules/expirycheck/templates/about2expire.php b/modules/expirycheck/templates/about2expire.php
index eadb4bb86..953cbf2e6 100644
--- a/modules/expirycheck/templates/about2expire.php
+++ b/modules/expirycheck/templates/about2expire.php
@@ -18,15 +18,15 @@
  */
 
 
-//$this->data['header'] = $this->t('{expirycheck:warning:warning_header}');
+//$this->data['header'] = $this->t('{expirycheck:expwarning:warning_header}');
 
 # netid will expire today
 if ($this->data['daysleft'] == 0) {
-	$this->data['header'] = $this->t('{expirycheck:warning:warning_header_today}', array(
+	$this->data['header'] = $this->t('{expirycheck:expwarning:warning_header_today}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId'])
 			));
 
-	$warning = $this->t('{expirycheck:warning:warning_today}', array(
+	$warning = $this->t('{expirycheck:expwarning:warning_today}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId'])
 			));
 
@@ -34,37 +34,37 @@ if ($this->data['daysleft'] == 0) {
 # netid will expire in one day
 elseif ($this->data['daysleft'] == 1) {
 
-	$this->data['header'] = $this->t('{expirycheck:warning:warning_header}', array(
+	$this->data['header'] = $this->t('{expirycheck:expwarning:warning_header}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId']),
-				'%DAYS%' => $this->t('{expirycheck:warning:day}'),
+				'%DAYS%' => $this->t('{expirycheck:expwarning:day}'),
 				'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
 			));
 
-	$warning = $this->t('{expirycheck:warning:warning}', array(
+	$warning = $this->t('{expirycheck:expwarning:warning}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId']),
-				'%DAYS%' => $this->t('{expirycheck:warning:day}'),
+				'%DAYS%' => $this->t('{expirycheck:expwarning:day}'),
 				'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
 			));
 
 }
 # netid will expire in next <daysleft> days
 else {
-	$this->data['header'] = $this->t('{expirycheck:warning:warning_header}', array(
+	$this->data['header'] = $this->t('{expirycheck:expwarning:warning_header}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId']),
-				'%DAYS%' => $this->t('{expirycheck:warning:days}'),
+				'%DAYS%' => $this->t('{expirycheck:expwarning:days}'),
 				'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
 			));
 
-	$warning = $this->t('{expirycheck:warning:warning}', array(
+	$warning = $this->t('{expirycheck:expwarning:warning}', array(
 				'%NETID%' => htmlspecialchars($this->data['netId']),
-				'%DAYS%' => $this->t('{expirycheck:warning:days}'),
+				'%DAYS%' => $this->t('{expirycheck:expwarning:days}'),
 				'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
 			));
 
 
 }
 
-//$this->data['header'] = str_replace("%DAYSLEFT%", $this->data['daysleft'], str_replace("%NETID%", $this->data['netId'], $this->t('{expirycheck:warning:warning_header}')));
+//$this->data['header'] = str_replace("%DAYSLEFT%", $this->data['daysleft'], str_replace("%NETID%", $this->data['netId'], $this->t('{expirycheck:expwarning:warning_header}')));
 $this->data['autofocus'] = 'yesbutton';
 
 $this->includeAtTemplateBase('includes/header.php');
@@ -80,9 +80,9 @@ $this->includeAtTemplateBase('includes/header.php');
 		}
 	?>
 	<h3><?php echo $warning; ?></h3>
-	<p><?php echo $this->t('{expirycheck:warning:expiry_date_text}') . " " . $this->data['expireOnDate']; ?></p>
+	<p><?php echo $this->t('{expirycheck:expwarning:expiry_date_text}') . " " . $this->data['expireOnDate']; ?></p>
 
-	<input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{expirycheck:warning:btn_continue}')) ?>" />
+	<input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{expirycheck:expwarning:btn_continue}')) ?>" />
 
 </form>
 
diff --git a/modules/expirycheck/templates/expired.php b/modules/expirycheck/templates/expired.php
index 0edd9aaad..817589f5d 100644
--- a/modules/expirycheck/templates/expired.php
+++ b/modules/expirycheck/templates/expired.php
@@ -1,12 +1,12 @@
 <?php
-$this->data['header'] = $this->t('{expirycheck:warning:access_denied}');
+$this->data['header'] = $this->t('{expirycheck:expwarning:access_denied}');
 $this->includeAtTemplateBase('includes/header.php');
 ?>
 
-		<h2><?php echo $this->t('{expirycheck:warning:access_denied}');?></h2>
-		<p><?php echo $this->t('{expirycheck:warning:no_access_to}', array('%NETID%' => htmlspecialchars($this->data['netId'])));?></p> 
-		<p><?php echo $this->t('{expirycheck:warning:expiry_date_text}');?> <b><?php echo htmlspecialchars($this->data['expireOnDate']);?></b></p>
-		<p><?php echo $this->t('{expirycheck:warning:contact_home}');?></p>
+		<h2><?php echo $this->t('{expirycheck:expwarning:access_denied}');?></h2>
+		<p><?php echo $this->t('{expirycheck:expwarning:no_access_to}', array('%NETID%' => htmlspecialchars($this->data['netId'])));?></p> 
+		<p><?php echo $this->t('{expirycheck:expwarning:expiry_date_text}');?> <b><?php echo htmlspecialchars($this->data['expireOnDate']);?></b></p>
+		<p><?php echo $this->t('{expirycheck:expwarning:contact_home}');?></p>
 <?php
 $this->includeAtTemplateBase('includes/footer.php');
 ?>
-- 
GitLab