Skip to content

Commit

Permalink
rebrand ethereum#2
Browse files Browse the repository at this point in the history
  • Loading branch information
iquidus committed Feb 13, 2017
1 parent 65d6e54 commit 4138f3c
Show file tree
Hide file tree
Showing 18 changed files with 164 additions and 160 deletions.
36 changes: 20 additions & 16 deletions app/client/lib/helpers/helperFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Helpers.getDefaultContractExample = function(withoutPragma) {
} else {
var solcVersion;

// Keep this for now as the Mist-API object will only be availabe from Mist version >= 0.8.9
// Keep this for now as the Mist-API object will only be availabe from Mist version >= 0.8.9
// so that older versions that will query code from wallet.ethereum.org won't use broken example code.
if (typeof mist !== 'undefined' && mist.solidity && mist.solidity.version) {
solcVersion = mist.solidity.version;
Expand Down Expand Up @@ -182,7 +182,7 @@ Helpers.showNotification = function(i18nText, values, callback) {
// icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png',
body: TAPi18n.__(i18nText +'.text', values),
});

if(_.isFunction(callback))
notification.onclick = callback;
}
Expand Down Expand Up @@ -227,8 +227,8 @@ Gets the docuement matching the given addess from the EthAccounts or Wallets col
Helpers.getAccountNameByAddress = function(address) {
if (typeof address != 'undefined')
var doc = Helpers.getAccountByAddress(address.toLowerCase());
return doc ? doc.name : address;

return doc ? doc.name : address;
};

/**
Expand Down Expand Up @@ -262,7 +262,7 @@ Formats a timestamp to any format given.
@return {String} The formated time
**/
Helpers.formatTime = function(time, format) { //parameters

// make sure not existing values are not Spacebars.kw
if(format instanceof Spacebars.kw)
format = null;
Expand Down Expand Up @@ -312,20 +312,24 @@ Helpers.formatTransactionBalance = function(value, exchangeRates, unit) {

if(unit === 'btc')
format += '[000000]';
else
else
format += '[0]';

var price = new BigNumber(String(web3.fromWei(value, 'ether')), 10).times(exchangeRates[unit].price);
return EthTools.formatNumber(price, format) + ' '+ unit.toUpperCase();
} else {
if (unit === 'ether') {
return EthTools.formatBalance(value, format + '[0000000000000000]') + ' UBQ';
} else {
return EthTools.formatBalance(value, format + '[0000000000000000] UNIT');
}
}
};


/**
Formats an input and prepares it to be a template
Formats an input and prepares it to be a template
Helpers.createTemplateDataFromInput(abiFunctionInput);
@method createTemplateDataFromInput
Expand All @@ -342,7 +346,7 @@ Helpers.createTemplateDataFromInput = function (input, key){
input.displayName = input.name
.replace(/([A-Z])/g, ' $1')
.replace(/([\-\_])/g, '&thinsp;<span class="punctuation">$1</span>&thinsp;');

if(input.type.indexOf('[') === -1 &&
(input.typeShort === 'string' ||
input.typeShort === 'uint' ||
Expand All @@ -356,12 +360,12 @@ Helpers.createTemplateDataFromInput = function (input, key){
input.template = 'elements_input_json';
}

return input;
return input;
};

/**
Adds the input value from a form field to the inputs array
@method addInputValue
@param {object} inputs The current inputs
@param {object} currentInput The current input
Expand All @@ -373,7 +377,7 @@ Helpers.addInputValue = function (inputs, currentInput, formField){
var value = _.isUndefined(input.value) ? '' : input.value;

if(currentInput.name === input.name &&
currentInput.type === input.type &&
currentInput.type === input.type &&
currentInput.index === input.index ) {

if(input.type.indexOf('[') !== -1) {
Expand Down Expand Up @@ -411,13 +415,13 @@ Takes a camelcase and shows it with spaces
@return {string} sentence The same name, sanitized, with spaces
**/
Helpers.toSentence = function (inputString, noHTML) {
if (typeof inputString == 'undefined')
if (typeof inputString == 'undefined')
return false;
else {
inputString = inputString.replace(/[^a-zA-Z0-9_]/g, '');
if (noHTML === true) // only consider explicit true
return inputString.replace(/([A-Z]+|[0-9]+)/g, ' $1').trim();
else
else
return inputString.replace(/([A-Z]+|[0-9]+)/g, ' $1').trim().replace(/([\_])/g, '<span class="dapp-punctuation">$1</span>');
}
}
Expand All @@ -427,7 +431,7 @@ Helpers.toSentence = function (inputString, noHTML) {
Returns true if Main is the current network.
@method isOnMainNetwork
@return {Bool}
@return {Bool}
**/
Helpers.isOnMainNetwork = function () {
return Session.get('network') == 'main';
Expand Down
4 changes: 2 additions & 2 deletions app/client/templates/views/modals/sendTransactionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Template['views_modals_sendTransactionInfo'].helpers({
*/
'estimatedFee': function() {
if(this.estimatedGas && this.gasPrice)
return EthTools.formatBalance(new BigNumber(this.estimatedGas, 10).times(new BigNumber(this.gasPrice, 10)), '0,0.0[0000000] unit', 'ether');
return EthTools.formatBalance(new BigNumber(this.estimatedGas, 10).times(new BigNumber(this.gasPrice, 10)), '0,0.0[0000000]', 'ether') + ' ubiq';
}
});
});
30 changes: 15 additions & 15 deletions app/client/templates/views/send.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- we use a form, which posts into the "dapp-form-helper-iframe" iframe, so that the browser stores inout fields for native autocpmplete -->
<form class="account-send-form" action="about:blank" target="dapp-form-helper-iframe" autocomplete="on">

{{#if deployContract}}
<h1>{{{i18n 'wallet.contracts.deployContract'}}}</h1>
{{else}}
Expand Down Expand Up @@ -69,19 +69,19 @@ <h3>{{i18n 'wallet.send.amount'}}</h3>
{{sendExplanation}}
{{/if}}
</p>

</div>

<div class="col col-6 mobile-full">
<br><br>

{{#if hasTokens}}
<ul class="select-token">
<li>
<input type="radio" id="ether" value="ether" name="choose-token" {{tokenSelectedAttr 'ether'}}>
<label for="ether">
<input type="radio" id="ether" value="ether" name="choose-token" {{tokenSelectedAttr 'ether'}}>
<label for="ether">
<span class="ether-symbol">Ξ</span>
<span class="token-name">ETHER</span>
<span class="token-name">UBQ</span>
<span class="balance">
{{#if $neq unit 'ether'}}
{{dapp_formatBalance selectedAccount.balance "0,0.00 UNIT"}} ({{dapp_formatBalance selectedAccount.balance "0,0.00[0000000000000000] UNIT" "ether"}})
Expand All @@ -94,9 +94,9 @@ <h3>{{i18n 'wallet.send.amount'}}</h3>
{{#each tokens}}
{{#if formattedCoinBalance}}
<li>
<input type="radio" id="token-{{address}}" value="{{address}}" name="choose-token" {{tokenSelectedAttr address}}>
<label for="token-{{address}}">
{{> dapp_identicon identity=address class="dapp-tiny"}}
<input type="radio" id="token-{{address}}" value="{{address}}" name="choose-token" {{tokenSelectedAttr address}}>
<label for="token-{{address}}">
{{> dapp_identicon identity=address class="dapp-tiny"}}
<span class="token-name">{{name}}</span>
<span class="balance">{{formattedCoinBalance}}</span>
</label>
Expand All @@ -105,7 +105,7 @@ <h3>{{i18n 'wallet.send.amount'}}</h3>
{{/each}}
</ul>
{{else}}
<div class="token-ether">
<div class="token-ether">
<span class="ether-symbol">Ξ</span>
<span class="token-name">ETHER</span>
<span class="balance">
Expand Down Expand Up @@ -135,7 +135,7 @@ <h3>{{i18n 'wallet.send.fee'}}</h3>

{{> dapp_selectGasPrice gas=(TemplateVar.get "estimatedGas") gasPrice=latestBlock.gasPrice}}
</div>

<div class="col col-5 mobile-full send-info">
<br><br>
{{{i18n 'wallet.send.texts.sendFee' timetext=timeText}}}
Expand Down Expand Up @@ -176,11 +176,11 @@ <h3>{{i18n "commonWords.total"}}</h3>
</div>

<hr>

<!-- a button type="submit" will send the form -->

<button type="submit" class="dapp-block-button">
{{#if TemplateVar.get "sending"}}
{{#if TemplateVar.get "sending"}}
{{i18n 'buttons.sending'}}
{{else}}
{{#if deployContract}}
Expand All @@ -190,7 +190,7 @@ <h3>{{i18n "commonWords.total"}}</h3>
{{/if}}
{{/if}}
</button>

</form>

</template>
</template>
12 changes: 6 additions & 6 deletions app/i18n/wallet.de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"texts": {
"note": "Notiz",
"balance": "Kontostand",
"connectionErrorMist": "Verbindung konnte nicht hergestellt werden. Bitte starten Sie Geth mit folgendem Kommando:<br><br><small><code>__node__</code><br><br>Stellen Sie sicher, dass Sie Ihren IPC Pfad zum einen Standardpfad festgelegt haben, wenn Sie einen anderen <code>datadir</code> verwenden, z.B. <br><code>geth --datadir ... --ipcpath /Users/&lt;yourUser&gt;/Library/Ethereum/geth.ipc</code><br>oder<br><code>geth --datadir ... --ipcpath /Users/&lt;yourUser&gt;/.ethereum/geth.ipc</code>. <br><br>Alternative Option: <code>--unlock &lt;yourAccount&gt;.</code></small>",
"connectionErrorBrowser": "Verbindung konnte nicht hergestellt werden. Bitte starten Sie Geth mit den folgenden Optionen:<br><br><small><code>__node__</code><br><br>Alternative Optionen: <code>--unlock &lt;yourAccount&gt;.</code></small>",
"connectionErrorMist": "Verbindung konnte nicht hergestellt werden. Bitte starten Sie Gubiq mit folgendem Kommando:<br><br><small><code>__node__</code><br><br>Stellen Sie sicher, dass Sie Ihren IPC Pfad zum einen Standardpfad festgelegt haben, wenn Sie einen anderen <code>datadir</code> verwenden, z.B. <br><code>gubiq --datadir ... --ipcpath /Users/&lt;yourUser&gt;/Library/Ubiq/gubiq.ipc</code><br>oder<br><code>gubiq --datadir ... --ipcpath /Users/&lt;yourUser&gt;/.ubiq/gubiq.ipc</code>. <br><br>Alternative Option: <code>--unlock &lt;yourAccount&gt;.</code></small>",
"connectionErrorBrowser": "Verbindung konnte nicht hergestellt werden. Bitte starten Sie Gubiq mit den folgenden Optionen:<br><br><small><code>__node__</code><br><br>Alternative Optionen: <code>--unlock &lt;yourAccount&gt;.</code></small>",
"pendingConfirmationsBadge": "Ausstehende Bestätigung!",
"nodeSyncing": "__blockDiff__ ausstehende Blöcke",
"blockReceived": "Neuen Block empfangen",
Expand All @@ -37,7 +37,7 @@
}
},
"error": {
"wrongChain": "Sie folgen nicht der Hauptblockchain, bitte starten Sie die Ethereum Wallet App neu!"
"wrongChain": "Sie folgen nicht der Hauptblockchain, bitte starten Sie die Ubiq Wallet App neu!"
},
"warnings": {
"txOriginVulnerabilityWallet": "Diese intelligente Vertrag Geldbörse hat veraltete Code und unterliegt Phishing-Attacken. ",
Expand Down Expand Up @@ -88,7 +88,7 @@
"owners": "Eigentümer",
"walletsDescription": "Verträge werden auf der Blockchain gespeichert und dienen der Verwaltung von Ether. Ein Vertrag kann mehrere Konten als Eigentümer haben. Verträge zeigen im Gegensatz zu Konten immer eine vollständige Transaktionshistorie.",
"walletsDescriptionNotEnoughFunds": "Es wird mindestens 1 Ether benötigt, um komplexe Verträge zu erstellen.",
"accountsDescription": "Konten können Ether, Ethereum-basierte Token oder Coins enthalten. Darüber hinaus können Konten Verträge kontrollieren. Im Gegensatz zu Wallets können Konten keine einkommenden Transaktionen anzeigen.",
"accountsDescription": "Konten können Ether, Ubiq-basierte Token oder Coins enthalten. Darüber hinaus können Konten Verträge kontrollieren. Im Gegensatz zu Wallets können Konten keine einkommenden Transaktionen anzeigen.",
"buttons": {
"deposit": "Ether hinterlegen",
"depositBitcoin": "Ether mit Bitcoin hinterlegen",
Expand Down Expand Up @@ -276,7 +276,7 @@
"title": "Eigene <strong>Token</strong>",
"subTitle": "Hinzugefügte Token",
"admin": "__name__ (Admin Seite)",
"description": "Token sind Währungen oder Tauschgegenstände, die auf der Ethereum-Plattform aufsetzen. Damit ein Konto ein Token beobachten oder versenden kann, müssen Sie die Kontoadressen in die folgende Liste einfügen. Sie können Ihren eigenen Token erzeugen, in dem Sie z.B. folgendes <a href=\"http://chriseth.github.io/browser-solidity/?gist=0d1a998d949e26942212\" target=\"_blank\">Beispiel eines Token Vertrags</a> anpassen, oder mehr über <a href=\"https://www.ethereum.org/token#the-code\" target=\"_blank\">Ethereum Token</a> lernen.",
"description": "Token sind Währungen oder Tauschgegenstände, die auf der Ubiq-Plattform aufsetzen. Damit ein Konto ein Token beobachten oder versenden kann, müssen Sie die Kontoadressen in die folgende Liste einfügen. Sie können Ihren eigenen Token erzeugen, in dem Sie z.B. folgendes <a href=\"http://chriseth.github.io/browser-solidity/?gist=0d1a998d949e26942212\" target=\"_blank\">Beispiel eines Token Vertrags</a> anpassen, oder mehr über <a href=\"https://www.ubiqsmart.com/token#the-code\" target=\"_blank\">Ubiq Token</a> lernen.",
"deleteToken": "Möchten Sie den Token <strong>__token__</strong> von Ihrer Liste entfernen?",
"addedToken": "__token__ wurde Ihrer Beobachtungsliste hinzugefügt",
"editedToken": "Token __token__ wurde bearbeitet",
Expand Down Expand Up @@ -304,7 +304,7 @@
"writeToContract": "In Vertrag schreiben",
"pickContract": "Wähle einen Vertrag",
"pickFunction": "Wähle eine Funktion",
"noContract": "<p>Fügen Sie den Quellcode eines Vertrags hier ein. Beispiele finden Sie unter <a href=\"http://ethereum.org\" target=\"_blank\">ethereum.org</a>: </p> <ul><li><a href=\"http://ethereum.org/token#the-code\" target=\"_blank\">Token erzeugen</a></li><li><a href=\"http://ethereum.org/crowdsale#the-code\" target=\"_blank\">Crowdsale starten</a></li><li><a href=\"http://ethereum.org/dao#the-code\" target=\"_blank\">Blockchain-Organisation erzeugen</a></li></ul>",
"noContract": "<p>Fügen Sie den Quellcode eines Vertrags hier ein. Beispiele finden Sie unter <a href=\"http://ubiqsmart.com\" target=\"_blank\">ubiqsmart.com</a>: </p> <ul><li><a href=\"http://ubiqsmart.com/token#the-code\" target=\"_blank\">Token erzeugen</a></li><li><a href=\"http://ubiqsmart.com/crowdsale#the-code\" target=\"_blank\">Crowdsale starten</a></li><li><a href=\"http://ubiqsmart.com/dao#the-code\" target=\"_blank\">Blockchain-Organisation erzeugen</a></li></ul>",
"buttons": {
"showContractInfo": "Zeige Vertragsinformationen",
"hideContractInfo": "Schließe Vertragsinformationen",
Expand Down
Loading

0 comments on commit 4138f3c

Please sign in to comment.