Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from BaranekD/v1.0
Browse files Browse the repository at this point in the history
Whole module now uses a dictionary
  • Loading branch information
vyskocilpavel authored Aug 8, 2018
2 parents 07aa523 + 31bcfcd commit c1906fa
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.

## [Unreleased]
[Changed]
- Whole module now uses a dictionary

## [v1.0.1]
[Changed]
Expand Down
36 changes: 36 additions & 0 deletions dictionaries/elixir.definition.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"error_report_email_message": {
"en": "Please provide your mail so that we can contact you for further information or let you know the issue was fixed."
},
"error_number": {
"en": "Error number: "
},
"more": {
"en": "more "
},
"error_id": {
"en": "Error ID"
},
"note": {
"en": "Note:"
},
"browser_not_support_javascript": {
"en": " Since your browser does not support JavaScript, you must press the button below once to proceed."
},
"submit": {
"en": "Submit"
},
"previous_selection": {
"en": "your previous selection"
},
"cannot_find_institution": {
"en": "Still can't find your institution? Contact us at "
},
"cannot_find_institution_extended": {
"en": "Can't find your institution? Select it in extended list and help us "
},
"add_institution": {
"en": "add your institution"
},
"or": {
"en": "or"
},
"post": {
"en": "POST data"
}
}
6 changes: 3 additions & 3 deletions themes/elixir/default/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<?php
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
?>
<a href="#moreInfo" data-toggle="collapse">more <span class="caret"></span></a>
<a href="#moreInfo" data-toggle="collapse"><?php echo $this->t('{elixir:elixir:more}'); ?><span class="caret"></span></a>

</p>

Expand All @@ -26,7 +26,7 @@
}
?>
<div id="moreInfo" class="collapse">
<p id="trackid" class="input-left">Error number: <?php echo $this->data['error']['trackId']; ?></p>
<p id="trackid" class="input-left"><?php echo $this->t('{elixir:elixir:error_number}'); ?><?php echo $this->data['error']['trackId']; ?></p>
<?php
// print out exception only if the exception is available
if ($this->data['showerrors']) {
Expand Down Expand Up @@ -55,7 +55,7 @@
<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post" class="form-horizontal">

<div class="form-group">
<label class="col-sm-2 control-label" for="reportId">Error ID</label>
<label class="col-sm-2 control-label" for="reportId"><?php echo $this->t('{elixir:elixir:error_id}'); ?></label>
<div class="col-sm-10">
<input name="reportId" type="text" class="form-control" id="reportId" value="<?php echo $this->data['error']['reportId']; ?>" readonly>
</div>
Expand Down
6 changes: 3 additions & 3 deletions themes/elixir/default/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>POST data</title>
<title><?php echo $this->t('{elixir:elixir:post}'); ?></title>
</head>
<body onload="document.getElementsByTagName('input')[0].click();">

<noscript>
<p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the button below once to proceed.</p>
<p><strong><?php echo $this->t('{elixir:elixir:note}'); ?></strong><?php echo $this->t('{elixir:elixir:browser_not_support_javascript}'); ?></p>
</noscript>

<form method="post" action="<?php echo htmlspecialchars($this->data['destination']); ?>">
Expand Down Expand Up @@ -62,7 +62,7 @@ function printItem($name, $value) {
?>

<noscript>
<button type="submit" class="btn">Submit</button>
<button type="submit" class="btn"><?php echo $this->t('{elixir:elixir:submit}'); ?></button>
</noscript>
</form>

Expand Down
14 changes: 7 additions & 7 deletions themes/elixir/perun/disco-tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

if (!empty($this->getPreferredIdp())) {

echo '<p class="descriptionp">your previous selection</p>';
echo '<p class="descriptionp">' . $this->t('{elixir:elixir:previous_selection}') . '?></p>';
echo '<div class="metalist list-group">';
echo showEntry($this, $this->getPreferredIdp(), true);
echo '</div>';


echo getOr();
echo getOr($this);
}


Expand All @@ -51,7 +51,7 @@



echo getOr();
echo getOr($this);



Expand Down Expand Up @@ -80,9 +80,9 @@

echo '<div class="no-idp-found alert alert-info">';
if ($this->isOriginalSpNonFilteringIdPs()) {
echo 'Still can\'t find your institution? Contact us at <a href="mailto:[email protected]?subject=Request%20for%20adding%20new%20IdP">[email protected]</a>';
echo $this->t('{elixit:elixir:cannot_find_institution}') . '<a href="mailto:[email protected]?subject=Request%20for%20adding%20new%20IdP">[email protected]</a>';
} else {
echo 'Can\'t find your institution? Select it in extended list and help us <a class="btn btn-primary" href="https://perun.elixir-czech.cz/add-institution/">add your institution</a>';
echo $this->t('{elixir:elixir:cannot_find_institution_extended}') . '<a class="btn btn-primary" href="https://perun.elixir-czech.cz/add-institution/">' . $this->t('{elixir:elixir:add_institution}') . '</a>';
}
echo '</div>';

Expand Down Expand Up @@ -174,9 +174,9 @@ function showIcon($metadata) {
}


function getOr() {
function getOr($t) {
$or = '<div class="hrline">';
$or .= ' <span>or</span>';
$or .= ' <span>' . $t->t('{elixir:elixir:or}') . '</span>';
$or .= '</div>';
return $or;
}
Expand Down

0 comments on commit c1906fa

Please sign in to comment.