translatable title

This commit is contained in:
Michael Muré 2014-07-13 14:56:30 +02:00
parent 343e526679
commit 439380c71f
6 changed files with 24 additions and 8 deletions

View file

@ -51,7 +51,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GitHub Repository: https://github.com/MichaelMure/WalletGenerator.net
-->
<title>WalletGenerator.net - Paper wallet generator for BitCoins and other cryptocurrencies</title>
<title>WalletGenerator.net - Universal Paper wallet generator for Bitcoin and other cryptocurrencies</title>
<script type="text/javascript">
// Array.prototype.map function is in the public domain.
@ -10230,8 +10230,8 @@ janin.currency = {
document.getElementById("coinLogoImg").src = coinImgUrl;
// Update title depending on currency
document.title = janin.currency.name() + "'s paper wallet generator";
document.getElementById("siteTitle").alt = janin.currency.name() + " Paper Wallet Generator";
document.title = janin.currency.name() + " " + ninja.translator.get("title");
document.getElementById("siteTitle").alt = janin.currency.name() + " " + ninja.translator.get("title");
if(ninja.seeder.isDone())
{
@ -10975,6 +10975,8 @@ ninja.translator = {
},
staticID: [
"defaultTitle",
"title",
"brainalertpassphrasewarning",
"brainalertpassphrasetooshort",
"brainalertpassphrasedoesnotmatch",
@ -12186,6 +12188,11 @@ for(i = 0; i < janin.currencies.length; i++) {
if (janin.currencies[i].name.toLowerCase() == currency)
janin.currency.useCurrency(i);
}
// Reset title if no currency is choosen
if(ninja.getQueryString()["currency"] == null) {
document.title = ninja.translator.get("defaultTitle");
document.getElementById("siteTitle").alt = ninja.translator.get("defaultTitle");
}
// populate currency dropdown list
var select = document.getElementById("currency");
var options = "";

View file

@ -2,6 +2,8 @@
"paperlabelbitcoinaddress": "Bitcoin Address:",
"paperlabelprivatekey": "Private Key (Wallet Import Format):",
"paperlabelencryptedkey": "Encrypted Private Key (Password required)",
"defaultTitle" : "WalletGenerator.net - Universal Paper wallet generator for Bitcoin and other cryptocurrencies",
"title" : "Paper Wallet Generator",
"bulkgeneratingaddresses": "Generating addresses... ",
"brainalertpassphrasetooshort": "The passphrase you entered is too short.\n\n",
"brainalertpassphrasewarning": "Warning: Choosing a strong passphrase is important to avoid brute force attempts to guess your passphrase and steal your bitcoins.",

View file

@ -51,7 +51,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GitHub Repository: https://github.com/MichaelMure/WalletGenerator.net
-->
<title>WalletGenerator.net - Paper wallet generator for BitCoins and other cryptocurrencies</title>
<title>WalletGenerator.net - Universal Paper wallet generator for Bitcoin and other cryptocurrencies</title>
<script type="text/javascript">
//array.map.js

View file

@ -40,8 +40,8 @@ janin.currency = {
document.getElementById("coinLogoImg").src = coinImgUrl;
// Update title depending on currency
document.title = janin.currency.name() + "'s paper wallet generator";
document.getElementById("siteTitle").alt = janin.currency.name() + " Paper Wallet Generator";
document.title = janin.currency.name() + " " + ninja.translator.get("title");
document.getElementById("siteTitle").alt = janin.currency.name() + " " + ninja.translator.get("title");
if(ninja.seeder.isDone())
{

View file

@ -14,6 +14,11 @@ for(i = 0; i < janin.currencies.length; i++) {
if (janin.currencies[i].name.toLowerCase() == currency)
janin.currency.useCurrency(i);
}
// Reset title if no currency is choosen
if(ninja.getQueryString()["currency"] == null) {
document.title = ninja.translator.get("defaultTitle");
document.getElementById("siteTitle").alt = ninja.translator.get("defaultTitle");
}
// populate currency dropdown list
var select = document.getElementById("currency");
var options = "";

View file

@ -42,6 +42,8 @@ ninja.translator = {
},
staticID: [
"defaultTitle",
"title",
"brainalertpassphrasewarning",
"brainalertpassphrasetooshort",
"brainalertpassphrasedoesnotmatch",