Skip to content
Snippets Groups Projects
Commit 0c6cd70b authored by Jan Oppolzer's avatar Jan Oppolzer
Browse files

Expirycheck module changes for translation

Dictionaries files in expirycheck module renamed in order to solve
collision with dictionaries files in preprodwarning module.
parent 8f4f4d16
Branches
Tags
No related merge requests found
...@@ -18,15 +18,15 @@ ...@@ -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 # netid will expire today
if ($this->data['daysleft'] == 0) { 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']) '%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']) '%NETID%' => htmlspecialchars($this->data['netId'])
)); ));
...@@ -34,37 +34,37 @@ if ($this->data['daysleft'] == 0) { ...@@ -34,37 +34,37 @@ if ($this->data['daysleft'] == 0) {
# netid will expire in one day # netid will expire in one day
elseif ($this->data['daysleft'] == 1) { 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']), '%NETID%' => htmlspecialchars($this->data['netId']),
'%DAYS%' => $this->t('{expirycheck:warning:day}'), '%DAYS%' => $this->t('{expirycheck:expwarning:day}'),
'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']), '%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
)); ));
$warning = $this->t('{expirycheck:warning:warning}', array( $warning = $this->t('{expirycheck:expwarning:warning}', array(
'%NETID%' => htmlspecialchars($this->data['netId']), '%NETID%' => htmlspecialchars($this->data['netId']),
'%DAYS%' => $this->t('{expirycheck:warning:day}'), '%DAYS%' => $this->t('{expirycheck:expwarning:day}'),
'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']), '%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
)); ));
} }
# netid will expire in next <daysleft> days # netid will expire in next <daysleft> days
else { 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']), '%NETID%' => htmlspecialchars($this->data['netId']),
'%DAYS%' => $this->t('{expirycheck:warning:days}'), '%DAYS%' => $this->t('{expirycheck:expwarning:days}'),
'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']), '%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']),
)); ));
$warning = $this->t('{expirycheck:warning:warning}', array( $warning = $this->t('{expirycheck:expwarning:warning}', array(
'%NETID%' => htmlspecialchars($this->data['netId']), '%NETID%' => htmlspecialchars($this->data['netId']),
'%DAYS%' => $this->t('{expirycheck:warning:days}'), '%DAYS%' => $this->t('{expirycheck:expwarning:days}'),
'%DAYSLEFT%' => htmlspecialchars($this->data['daysleft']), '%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->data['autofocus'] = 'yesbutton';
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
...@@ -80,9 +80,9 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -80,9 +80,9 @@ $this->includeAtTemplateBase('includes/header.php');
} }
?> ?>
<h3><?php echo $warning; ?></h3> <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> </form>
......
<?php <?php
$this->data['header'] = $this->t('{expirycheck:warning:access_denied}'); $this->data['header'] = $this->t('{expirycheck:expwarning:access_denied}');
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<h2><?php echo $this->t('{expirycheck:warning:access_denied}');?></h2> <h2><?php echo $this->t('{expirycheck:expwarning: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:expwarning: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:expwarning:expiry_date_text}');?> <b><?php echo htmlspecialchars($this->data['expireOnDate']);?></b></p>
<p><?php echo $this->t('{expirycheck:warning:contact_home}');?></p> <p><?php echo $this->t('{expirycheck:expwarning:contact_home}');?></p>
<?php <?php
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment