Skip to content

Commit

Permalink
Merge pull request #48 from thofmann/translations-dev
Browse files Browse the repository at this point in the history
Translation Dev
  • Loading branch information
trevinhofmann committed Oct 2, 2016
2 parents 926c3a8 + 6769204 commit 9240580
Show file tree
Hide file tree
Showing 22 changed files with 502 additions and 235 deletions.
3 changes: 3 additions & 0 deletions src/locales/cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
190 changes: 190 additions & 0 deletions src/locales/en.json

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions src/public/lib/i18n.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import en from '../../locales/en.json';
import cn from '../../locales/cn.json';

const languages = ['en', 'cn'];

function addLanguageFallback(target, fallback) {
Object.keys(fallback).forEach(function(key) {
if (!fallback.hasOwnProperty(key)) {
return;
}
if (typeof fallback[key] === 'object') {
if (typeof target[key] !== 'object') {
target[key] = {};
}
addLanguageFallback(target[key], fallback[key]);
} else if (typeof target[key] !== 'string') {
target[key] = fallback[key];
}
});
}

addLanguageFallback(cn, en);

let language = en;

export function switchLanguage(newLanguage) {
switch (newLanguage) {
case 'en':
language = en;
break;
case 'cn':
language = cn;
break;
default:
throw new Error('Language "' + newLanguage + '" is not supported.');
}
}

export function strings() {
return language;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import React from 'react';
import { strings } from '../../../lib/i18n';

export default React.createClass({

Expand All @@ -12,8 +13,8 @@ export default React.createClass({
</div>
</div>
<div className='col-sm-8'>
<h2 className='red'>Experimental Releases </h2>
NONE
<h2 className='red'>{strings().experimental.releases}</h2>
{strings().experimental.none}
{/*
<h3>Binary Downloads</h3>
<br />
Expand Down
45 changes: 26 additions & 19 deletions src/public/views/components/download/official-release.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import React from 'react';
import { strings } from '../../../lib/i18n';

export default React.createClass({

Expand All @@ -13,36 +14,42 @@ export default React.createClass({
</div>
</div>
<div className='col-sm-8'>
<p>The Bitcoin Unlimited project maintains an enhanced version of the Bitcoin Core "Satoshi" client.
We are currently supporting the 0.12.1 release and have older releases on 0.11.2 and 0.12.0.
<p>
{strings().official.satoshi}
{' '}
{strings().official.supporting}
</p>
<br />
<div className='red'>Please verify binary signatures before installation! Scroll down to the Signatures section to see the SHA-256 checksums of the binaries and our signatures on that statement.</div>
<h2 className='green'>Official Release </h2>
<h3>Binary Downloads</h3>
<div className='red'>
{strings().official.verify}
{' '}
{strings().official.signatures}
</div>
<h2 className='green'>{strings().official.release}</h2>
<h3>{strings().official.binary}</h3>
<br />
<h4>Windows</h4>
<p>64-bit: Version: 0.12.1, Aug 14, 2016: <a href='/downloads/bitcoinUnlimited-0.12.1-win64-setup.exe'> bitcoinUnlimited-0.12.1-win64-setup.exe</a> <a href='/downloads/bitcoinUnlimited-0.12.1-win64.zip'> (zip)</a></p>
<p>32-bit: Version: 0.12.1, Aug 14, 2016: <a href='/downloads/bitcoinUnlimited-0.12.1-win32-setup.exe'> bitcoinUnlimited-0.12.1-win32-setup.exe</a> <a href='/downloads/bitcoinUnlimited-0.12.1-win32.zip'> (zip)</a></p>
<h4>{strings().official.windows}</h4>
<p>{strings().official.bit64}: {strings().official.version}: 0.12.1, {strings().official.august14}: <a href='/downloads/bitcoinUnlimited-0.12.1-win64-setup.exe'> bitcoinUnlimited-0.12.1-win64-setup.exe</a> <a href='/downloads/bitcoinUnlimited-0.12.1-win64.zip'> (zip)</a></p>
<p>{strings().official.bit32}: {strings().official.version}: 0.12.1, {strings().official.august14}: <a href='/downloads/bitcoinUnlimited-0.12.1-win32-setup.exe'> bitcoinUnlimited-0.12.1-win32-setup.exe</a> <a href='/downloads/bitcoinUnlimited-0.12.1-win32.zip'> (zip)</a></p>
<br />
<h4>Linux</h4>
<p>64-bit: Version: 0.12.1, Aug 14, 2016:<a href='/downloads/bitcoinUnlimited-0.12.1-linux64.tar.gz'> bitcoinUnlimited-0.12.1-linux64.tar.gz</a></p>
<p>32-bit: Version: 0.12.1, Aug 14, 2016: <a href='/downloads/bitcoinUnlimited-0.12.1-linux32.tar.gz'> bitcoinUnlimited-0.12.1-linux32.tar.gz</a></p>
<h4>{strings().official.linux}</h4>
<p>{strings().official.bit64}: {strings().official.version}: 0.12.1, {strings().official.august14}:<a href='/downloads/bitcoinUnlimited-0.12.1-linux64.tar.gz'> bitcoinUnlimited-0.12.1-linux64.tar.gz</a></p>
<p>{strings().official.bit32}: {strings().official.version}: 0.12.1, {strings().official.august14}: <a href='/downloads/bitcoinUnlimited-0.12.1-linux32.tar.gz'> bitcoinUnlimited-0.12.1-linux32.tar.gz</a></p>
<br />
<h4>Mac OSX</h4>
<p>64-bit: Version: 0.12.1, Aug 14, 2016:<a href='/downloads/bitcoinUnlimited-0.12.1-osx64.tar.gz'> bitcoinUnlimited-0.12.1-osx64.tar.gz</a></p>
<p>32-bit: Version: 0.12.1, Aug 14, 2016:<a href='/downloads/bitcoinUnlimited-0.12.1-osx.tar.gz'> bitcoinUnlimited-0.12.1-osx.tar.gz</a></p>
<p>DMG: Version: 0.12.0, Aug 14, 2016:<a href='/downloads/bitcoinUnlimited-0.12.1-osx.dmg'> bitcoinUnlimited-0.12.1-osx.dmg</a></p>
<h4>{strings().official.osx}</h4>
<p>{strings().official.bit64}: {strings().official.version}: 0.12.1, {strings().official.august14}:<a href='/downloads/bitcoinUnlimited-0.12.1-osx64.tar.gz'> bitcoinUnlimited-0.12.1-osx64.tar.gz</a></p>
<p>{strings().official.bit32}: {strings().official.version}: 0.12.1, {strings().official.august14}:<a href='/downloads/bitcoinUnlimited-0.12.1-osx.tar.gz'> bitcoinUnlimited-0.12.1-osx.tar.gz</a></p>
<p>DMG: {strings().official.version}: 0.12.0, {strings().official.august14}:<a href='/downloads/bitcoinUnlimited-0.12.1-osx.dmg'> bitcoinUnlimited-0.12.1-osx.dmg</a></p>
<br />

<h4>Linux Installation Instructions</h4>
<p>Download the file and then open a terminal window. Type:</p>
<h4>{strings().official.installation}</h4>
<p>{strings().official.terminal}</p>
<p>tar xvf ~/Downloads/bitcoinUnlimited-0.12.1-linux64.tar.gz</p>
<p>cd bitcoinUnlimited-0.12.1/bin/</p>
<p>nohup ./bitcoin-qt &amp; </p>
<br />
<h4>Source Code</h4>
<p>Github branch 0.12.1bu <a href='https://github.com/BitcoinUnlimited/BitcoinUnlimited/tree/0.12.1bu'>here</a></p>
<h4>{strings().official.source}</h4>
<p>{strings().official.branch} 0.12.1bu <a href='https://github.com/BitcoinUnlimited/BitcoinUnlimited/tree/0.12.1bu'>{strings().official.here}</a></p>
</div>
</div>
);
Expand Down
55 changes: 35 additions & 20 deletions src/public/views/components/download/signatures.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import React from 'react';
import { strings } from '../../../lib/i18n';

const CHECKSUMS = `
{
Expand Down Expand Up @@ -63,42 +64,56 @@ export default React.createClass({
<h2>Signatures</h2>
<div className='signatures'>
<div className='signatureText'>
These signatures attest that the individual named compiled Bitcoin Unlimited from Github source and produced the following files with the corresponding sha256 hashes.
{strings().signatures.signatures}
<br /><br />
<div id='signatureHelp'>
To validate these signatures, use 'File->verify signatures' on any Satoshi Client. Paste the signer's address into the first field, the signature statement into the second field, and the signature into the third one. Note: do not change the whitespace of the signature statement. Finally run 'sha256sum' on your downloaded file to make sure it matches. You can check these signatures on the users' profile page on the <a href='http://www.bitco.in/forum'>bitco.in forum</a>.<br/>
{strings().signatures.helpOne}
{' '}
{strings().signatures.helpTwo}
{' '}
{strings().signatures.helpThree}
{' '}
{strings().signatures.helpFour}
{' '}
{strings().signatures.helpFive}
{' '}
<a href='http://www.bitco.in/forum'>{strings().signatures.forum}</a>.<br/>
</div>
<br /><br />
0.12.1 Signed Statement:<br /><br />
0.12.1 {strings().signatures.statement}:<br /><br />
<pre>{CHECKSUMS0121b}</pre>
<br />
Do not add a final return character to the statement above when verifying the signature in the Bitcoin client<br/>
{strings().signatures.tip}
<br/>
<br />
By: Andrew Stone (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3 - verify address on bitco.in user thezerg)<br/>
Signature:<br />G1W1Uq8QagCARx0eK895+5ZBQzwFqpQmRVOP+yPNDkCuAh8yC9BUxp59BtIP0ieHZvZBeHpvdkvepAC4YOkgwu4=
{strings().signatures.andrew} (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3 - {strings().signatures.thezerg})
<br/>
{strings().signatures.signature}:<br />G1W1Uq8QagCARx0eK895+5ZBQzwFqpQmRVOP+yPNDkCuAh8yC9BUxp59BtIP0ieHZvZBeHpvdkvepAC4YOkgwu4=
<br/><br/>
By: sickpig (1LwvkQTWmotqTosgBcK8kFPCKzW2BPiE1G)<br/>
Signature:<br />H0YIZtMm92ntSh321FRIG6Js7TYDDTmTsXoRYwh48UilQzh5uadFz9VHsLqoHshr0wpULEWqeE1WyH6ME9FB+Ec=
{strings().signatures.sickpig} (1LwvkQTWmotqTosgBcK8kFPCKzW2BPiE1G)<br/>
{strings().signatures.signature}:<br />H0YIZtMm92ntSh321FRIG6Js7TYDDTmTsXoRYwh48UilQzh5uadFz9VHsLqoHshr0wpULEWqeE1WyH6ME9FB+Ec=
<br/><br/>
0.12.0 Signed Statement:<br /><br />
0.12.0 {strings().signatures.statement}:<br /><br />
<pre>{CHECKSUMS12}</pre>
<br />
By: Andrew Stone (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3)
Signature:<br />HIoKBs2zqpn5yXpTlu1IQ6raPbHBmfyZLpDX8PG1xjXadtAHJbVv6MD8CXMcJddjOmDSLXRwCbI7W/JrY/fX/Wk=
{strings().signatures.andrew} (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3)
<br/>
{strings().signatures.signature}:<br />HIoKBs2zqpn5yXpTlu1IQ6raPbHBmfyZLpDX8PG1xjXadtAHJbVv6MD8CXMcJddjOmDSLXRwCbI7W/JrY/fX/Wk=
<br /><br />
0.11.2 Signed Statement:<br /><br />
0.11.2 {strings().signatures.statement}:<br /><br />
<pre>{CHECKSUMS}</pre>
<br />
By: Andrew Stone (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3)
Signature: G75i+ydDAY9K/9go5tgac+SwTZi8mZZhj/0apZf1Gww5LsrWnLozR7e+MC0fMQqGfftVQ0nkrjNcnpVnJ6kXeHQ=
<br/><br/><br/>
By: sickpig (1LwvkQTWmotqTosgBcK8kFPCKzW2BPiE1G)
{strings().signatures.andrew} (1zerg12nRXZ41Pw4tfCTqgtdiJx6D1We3)
<br/>
Signature: IG+bTcn/bbm2m0eXXTnJZOTWop3vQ+hi1G2q2ZBfB9BIa9+qFNr0WfuuFLi1Xng3VPP4meYnVMWkuXWs402BORc=
{strings().signatures.signature}: G75i+ydDAY9K/9go5tgac+SwTZi8mZZhj/0apZf1Gww5LsrWnLozR7e+MC0fMQqGfftVQ0nkrjNcnpVnJ6kXeHQ=
<br/><br/>
By: awemany (1BCnpopAZ4xFSxdX8NvVqUaSvsPffQhNRd)

Signature: IH1gTO8LfLt3ZiGef5GO2tgI87PgT7mLf8+JHwN8n4a5YswQgg7RqmgDYNAiCa3S2EtaWOjluJYwzIdfBB4/wx4=
{strings().signatures.sickpig} (1LwvkQTWmotqTosgBcK8kFPCKzW2BPiE1G)
<br/>
{strings().signatures.signature}: IG+bTcn/bbm2m0eXXTnJZOTWop3vQ+hi1G2q2ZBfB9BIa9+qFNr0WfuuFLi1Xng3VPP4meYnVMWkuXWs402BORc=
<br/><br/>
{strings().signatures.awemany} (1BCnpopAZ4xFSxdX8NvVqUaSvsPffQhNRd)
<br/>
{strings().signatures.signature}: IH1gTO8LfLt3ZiGef5GO2tgI87PgT7mLf8+JHwN8n4a5YswQgg7RqmgDYNAiCa3S2EtaWOjluJYwzIdfBB4/wx4=
</div>
</div>
</div>
Expand Down
13 changes: 10 additions & 3 deletions src/public/views/components/index/call-to-action.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import React from 'react';
import { Link } from 'react-router';
import { strings } from '../../../lib/i18n';

export default React.createClass({

Expand All @@ -12,8 +13,14 @@ export default React.createClass({
<div className="row">
<div className="col-md-12">
<div className="calltoaction-wrapper">
<h3>The Only Bitcoin Client That Gives <u>You</u> Complete Freedom!</h3>
<Link to='/download' className="btn btn-orange">Download here!</Link>
<h3>
{strings().calltoaction.partOne}
{' '}
<u>{strings().calltoaction.partTwo}</u>
{' '}
{strings().calltoaction.partThree}
</h3>
<Link to='/download' className="btn btn-orange">{strings().calltoaction.download}</Link>
</div>
</div>
</div>
Expand All @@ -22,4 +29,4 @@ export default React.createClass({
);
}

});
});

0 comments on commit 9240580

Please sign in to comment.