From 3e98390af95532b1acb8d436ccac48cc6f97d823 Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 12:30:36 +0100 Subject: [PATCH] fix a problem with the theme, render Market Price and other values with thousand decimal with QTLocal --- res/silentdragonlite_de.qm | Bin 42377 -> 40558 bytes res/silentdragonlite_de.ts | 345 +++++++++++++++++++++------------- src/controller.cpp | 168 ++++++++++++----- src/scripts/dotranslations.sh | 4 +- src/settings.ui | 4 +- 5 files changed, 348 insertions(+), 173 deletions(-) diff --git a/res/silentdragonlite_de.qm b/res/silentdragonlite_de.qm index 4f4738314f354aabadc52e5528e2082d1c7f15e0..4ab35f9667f338c8f8b286801e526059c160493a 100644 GIT binary patch delta 2944 zcmXArd0bRw7sr1ybMLHoW)KvR2p2>JQ&ch)6-_`y#Mnd@Q&d1eTo4S+WDr?g5QBk| zqTW(W5(9L?GzEDLcOxp^H?X8dY*Eux%%Y@ze(oReox7d$oO6EXJkO5H$~&i&mg&b6 zoiE+3s`zx6>*<7do370U^v3~=2Mm*BX4a6e0Mj=CVm*+sKxUeo%z{5;T2p{I<$U!m zASjBwMs6dU$aCalVD404%hSNTeSoEqe{(UVjZ`{5$+; z0EC(YbbK1Z|91mIr%eA3WM+N}q3cDU^dQ9PGXa+~GN(V5nLbWtX(zY81^))5%+unj1l z4d;eSz?cVc>#hSPwZf|?6VSTC>!d(N!K>W^(7gb!+svqL3#R@U1`NA}px0V~ygmzp zzU7MpXCWjpgEV1&<#J%qV42H+@X$Yj-GPYMc#384l{xsK%=}A;s~rgVbt3LI%a!{9 z;?r2FF`po9K?^YaFxKuJ2dr3)^^Y0YRtq*4RRfy&*m5ow7;5RqjT2me_aNL{$y!O? z_}w&%AO51SJ50wf4^+6`Fwt+QVshmsAjMaaG@>7P?ua61LLwL3swmO0?n&nrb^072 z@_og`RikFEfdxggRWZv{ROMw=e0BtdzftDm zSXDv-6&_!!TKO>@49!tl@>a1sDpY%33IIG)Rr~I^Go`hvLq(!vKz>g5}0J7ty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}J<^s+}Ge_s@OByq$NLg(xo1Y7@C~zM6CMevO1m z!R2QXTg502Ovl0$kO;^8%RPQRXGqcfNx1z7;CA47p`-+neDmwO;}0zOfGYpP4XRwh zg#f;o`bF{Js4rz>ixZZyV_SK^I#2-U0ZXONl`!SGoStI4AX=SHKf}HyEBp8k*Y{HU z#p7Z6EA<0pslF%m;RY6M;KZTjeinT(4PjahW#C9K+E&zXK*(yL0^ecCIMK}CfAvi=E`ps+=%w-~H@wog}_V2JcY;GF_2q?{2oK+6HlZU4h zc+Tn)O2!Say4@9GTy(U>X%?gYeRM>boza1o82<08(P1UL=oYIT<^hQbVg*0j!HMo_ zyD)A5=SJTQw+L_t@3%`F=W$pBm)+(N;$a!P(-jvs0{==%;s+#77I>F~o8oi{3DG#k zk(dz8<5Pi;RAqFaa$ncRU|F4S@tSa7c4L0q`Zr4C-D1$hW>Dz2zTekyg>U@peSG BalancesTableModel - + Address Adresse - + Amount Betrag @@ -47,29 +47,29 @@ Controller - + Wallet Password Wallet Passwort - + Your wallet is encrypted. Please enter your wallet password Ihr Wallet ist verschlüsselt. Bitte geben Sie das Passwort ein - - + + Wallet Decryption Failed Entschlüsslung gescheitert - + Please enter a valid password Bitte geben Sie ein gültiges Passwort ein - + Failed to unlock wallet Konnte das Wallet nicht entsperren @@ -217,8 +217,8 @@ Please enter your wallet password - - + + Memo Nachricht hinzufügen @@ -280,9 +280,8 @@ Please enter your wallet password Sichtbare Adresse - New Address - Neue Adresse + Neue Adresse @@ -311,7 +310,7 @@ Please enter your wallet password - + Export Private Key Private Key exportieren @@ -321,47 +320,45 @@ Please enter your wallet password Transaktionen - Hush Daemon - Hush Daemon + Hush Daemon - blockHeight - Blockhöhe + Blockhöhe - + Version hushlightd Hushdlight Version - + &Send DenioD Feedback Sende DenioD Feedback - + &Export seed phrase Seed exportieren - + Encrypt Wallet Wallet verschlüsseln - + Remove Wallet Encryption Verschlüsslung entfernen - + Rescan Neu Scannen - + This is a Lightwallet, you cant mine with it! Dies ist ein Lightwallet, sie können damit nicht Minen! @@ -371,9 +368,18 @@ Please enter your wallet password - - - + + + + + + + + + + + + Loading... Lade... @@ -386,126 +392,205 @@ Please enter your wallet password Version hushd light - + Vendor Vendor - - - + + + + + + + + + + + + | - + + Next Address + + + + + Information about Hush + + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Hush Blockchain Information</span></p></body></html> + + + + + Next Halving + + + + + Difficulty + + + + + Last Notarized Block + + + + + Total Supply + + + + + Longestchain + + + + + BlockHeight + + + + + Supply zAddr + + + + + Supply tAddr + + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Hush Market Information</span></p></body></html> + + + + + Market Cap + + + + + Volume on Exchanges + + + + &File Datei - + &Help Hilfe - + &Apps Smartphone - + &Edit Bearbeiten - + E&xit Beenden - + &About Über - + &Settings Einstellungen - + Ctrl+P Ctrl+P - + &Hush Discord &Hush Discord - + &Hush Website &Hush Website - + Check github.com for &updates Überprüfe Github für Updates - + &Export all private keys Alle private Keys exportieren - + Address &book Adressbuch - + Ctrl+B Ctrl+B - - + + Export transactions Transaktionen exportieren - + Pay hush &URI... Zahlungs Hush &URI... - + Connect mobile &app Smartphone verbinden - + Ctrl+M Ctrl+M - + &Recurring Payments Wiederkehrende Zahlung - + Request hush... Hush anfordern... - + File a bug... Fehler melden... - + Copy txid Transaktions ID kopieren @@ -520,12 +605,12 @@ Please enter your wallet password Aktualisieren - + Restart Neustart - + Please restart Silentdragonlite to have the theme apply Bitte starten sie SilentDragonLite neu @@ -534,68 +619,72 @@ Please enter your wallet password Starte SilentDragonLite neu - + Some feedback about SilentDragonlite or Hush... Etwas Feedback über SilentDragonLite... - Send Duke some private and shielded feedback about - Sende DenioD anonym Feedback über + Sende DenioD anonym Feedback über - + or SilentDragonLite oder SilentDragonLite - + + Send DenioD some private and shielded feedback about + + + + Paste HUSH URI Hush URI einfügen - + Error paying HUSH URI Fehler bei HUSH URI - + URI should be of the form 'hush:<addr>?amt=x&memo=y Die URI sollte folgendemaßen aussehen 'hush:<addr>?amt=x&memo=y - + Error Fehler - + Error exporting transactions, file was not saved Fehler beim exportieren der Transaktionen. Die Datei wurde nicht gespeichert - + Error getting private keys Fehler beim empfangen der private Keys - + Error loading private keys: Fehler beim laden der private Keys: - + These are all the private keys for all the addresses in your wallet Dies sind alle private Keys für ihr Wallet - + Private key for Private Key für - - + + Save File Datei sichern @@ -681,82 +770,86 @@ Please use 'Remove Wallet Encryption' if you want to remove the wallet SilentDragonLite wurde erfolgreich entschlüsselt. Sie benötigen Ihr Passwort nicht mehr. - + Currency Change Währungszeichen wechseln - + + This change can take a few seconds. + + + Please restart SilentDragonLite to have new currencies apply - Bitte starten sie SilentDragonLite neu + Bitte starten sie SilentDragonLite neu - + This is your wallet seed. Please back it up carefully and safely. Dies ist Ihr SilentDragonLite Seed. Bitte sichern Sie ihn sorgfältig. - - + + Unable to open file Konnte die Datei nicht öffnen - - + + Copy address Adresse kopieren - - - + + + Copied to clipboard In die Zwischenablage kopiert - + Get private key Private Key erhalten - - + + View on block explorer Auf dem Blockexplorer anschauen - + View Payment Request Zahlungsanforderung ansehen - + View Memo Nachricht ansehen - + Reply to Antworten an - + Created new t-Addr Neue sichtbare Adresse erstellen - + Copy Address Adresse kopieren - + Address has been previously used Diese Adresse wurde schon einmal benutzt - + Address is unused Adresse ist unbenutzt @@ -1092,13 +1185,13 @@ Anmerkung: Sie bnötigen 2 Bestätigungen - + Connection Error Verbsindungsfehler - + Transaction Error Transaktionsfehler @@ -1115,43 +1208,43 @@ Anmerkung: Sie bnötigen 2 Bestätigungen keine Verbindung - + There was an error connecting to hushd. The error was Es gab einen Fehler zum server zu verbinden - + Tx Transaktion - + failed gescheitert - + The transaction with id Die Transaktion mit der ID - + failed. The error was ist gescheitert - + Update Available Update verfügbar - + A new release v%1 is available! You have v%2. Would you like to visit the releases page? @@ -1160,22 +1253,22 @@ Would you like to visit the releases page? Möchten Sie die Release Seite besuchen? - + No updates available keine Updates verfügbar - + You already have the latest release v%1 Sie haben bereits die neueste Version v%1 - + Please wait for SilentDragonLite to exit Bitte warten Sie bis SilentDragonLite beendet ist - + Waiting for hushd to exit Warten auf beendigung der Serververbindung @@ -1211,7 +1304,7 @@ Möchten Sie die Release Seite besuchen? Alle geplanten zukünftigen Zahlungen werden nicht durchgeführt. - + Tx submitted (right click to copy) txid: Transaktions ID übermittelt (Rechtsklick zum anschauen) : @@ -1241,22 +1334,22 @@ Möchten Sie die Release Seite besuchen? Betrag - + Connected directly Direkt verbunden - + Connected over the internet via silentdragon wormhole service Über das Internet verbunden - + Node is still syncing. SilentDragonLite synchronisiert noch. - + No sapling or transparent addresses with enough balance to spend. Nicht genügend Guthaben verfügbar. @@ -1646,7 +1739,7 @@ Möchten Sie die Release Seite besuchen? default - Normal + default @@ -1660,17 +1753,17 @@ Möchten Sie die Release Seite besuchen? blue - Blau + blue light - Hell + light dark - Dark + dark @@ -1843,17 +1936,16 @@ Möchten Sie die Release Seite besuchen? Konfiguriere HUSH3.conf - + Your hush node will be configured for you automatically Ihr Hush Node wird automatisch für Sie konfiguriert - Enable Fast Sync - Schneller synchronisieren + Schneller synchronisieren - + Show Advanced Configuration Erweiterte Einstellungen anzeigen @@ -1862,44 +1954,43 @@ Möchten Sie die Release Seite besuchen? Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken)... - + Allow connections to the internet to check for updates, get hush prices etc... Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken)... - + Use custom datadir Benutzerdefinierten Datei Pfad benutzen - + Choose directory Wählen Sie einen Ordner - + Please note that you'll need to already have a Tor service configured on port 9050 Stellen Sie sicher, dass der Tor Service bereits für den Port 9050 konfiguriert ist - + Connect to the internet for updates and price feeds Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken) - + Please choose a directory to store your wallet.dat and blockchain Wählen Sie einen Ordner aus, wo Ihre wallet.dat und Blockhain gespeichert wird - + Connect over Tor Verbinden über Tor - <html><head/><body><p>Skips the most expensive checks during the initial block download. <a href="https://docs.silentdragon.co/using-silentdragon/#fastsync"><span style=" text-decoration: underline; color:#0000ff;">Learn More</span></a></p></body></html> - Überspringt die meisten Checks beim Start + Überspringt die meisten Checks beim Start diff --git a/src/controller.cpp b/src/controller.cpp index 587ed7d..cdd071c 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -170,14 +170,36 @@ void Controller::getInfoThenRefresh(bool force) { sprintf(halving_days, "%.2f", (double) (blocks_until_halving * 150) / (60*60*24) ); bool doUpdate = force || (model->getLatestBlock() != curBlock); model->setLatestBlock(curBlock); - ui->blockHeight->setText(QString::number(curBlock)); - ui->last_notarized->setText(QString::number(notarized)); - ui->longestchain->setText(QString::number(longestchain)); - ui->difficulty->setText(QString::number(difficulty)); + + if (Settings::getInstance()->get_currency_name() == "EUR") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else if (Settings::getInstance()->get_currency_name() == "CHF") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else if (Settings::getInstance()->get_currency_name() == "RUB") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else + ui->blockHeight->setText(QLocale(QLocale::English).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::English).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::English).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty)); + + ui->halvingTime->setText( QString::number(blocks_until_halving) % " blocks, " % QString::fromStdString(halving_days) % " days" ); ui->Version->setText(QString::fromStdString(reply["version"].get())); ui->Vendor->setText(QString::fromStdString(reply["vendor"].get())); - ui->volumeExchange->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCVolume() ,'f',8)); + main->logger->write(QString("Refresh. curblock ") % QString::number(curBlock) % ", update=" % (doUpdate ? "true" : "false") ); @@ -191,49 +213,92 @@ void Controller::getInfoThenRefresh(bool force) { // use currency ComboBox as input if (Settings::getInstance()->get_currency_name() == "USD") { - main->statusLabel->setText(" HUSH/USD=$ " + QString::number( (double) Settings::getInstance()->getZECPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDCAP() ,'f',2)); + double price = Settings::getInstance()->getZECPrice(); + double volume = Settings::getInstance()->getUSDVolume(); + double cap = Settings::getInstance()->getUSDCAP(); + main->statusLabel->setText(" HUSH/USD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "EUR") { - main->statusLabel->setText(" HUSH/EUR= " + QString::number( (double) Settings::getInstance()->getEURPrice() ,'f',2) + " €"); - ui->volumeExchange->setText(QString::number((double) Settings::getInstance()->getEURVolume() ,'f',2) + " €"); - ui->marketcapTab->setText(QString::number((double) Settings::getInstance()->getEURCAP() ,'f',2)+ " €"); + double price = Settings::getInstance()->getEURPrice(); + double volume = Settings::getInstance()->getEURVolume(); + double cap = Settings::getInstance()->getEURCAP(); + main->statusLabel->setText("HUSH/EUR "+(QLocale(QLocale::German).toString(price,'f', 2))+ " €"); + ui->volumeExchange->setText(QLocale(QLocale::German).toString(volume,'f', 2)+ " €"); + ui->marketcapTab->setText(QLocale(QLocale::German).toString(cap,'f', 2)+ " €"); + } else if (Settings::getInstance()->get_currency_name() == "BTC") { - main->statusLabel->setText(" HUSH/BTC=BTC " + QString::number((double) Settings::getInstance()->getBTCPrice() ,'f',8)); - ui->volumeExchange->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCVolume() ,'f',8)); - ui->marketcapTab->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCCAP() ,'f',8)); + double price = Settings::getInstance()->getBTCPrice(); + double volume = Settings::getInstance()->getBTCVolume(); + double cap = Settings::getInstance()->getBTCCAP(); + main->statusLabel->setText(" HUSH/BTC=BTC " + (QLocale(QLocale::English).toString(price, 'f',8))); + ui->volumeExchange->setText(" BTC " + (QLocale(QLocale::English).toString(volume, 'f',8))); + ui->marketcapTab->setText(" BTC " + (QLocale(QLocale::English).toString(cap, 'f',8))); + } else if (Settings::getInstance()->get_currency_name() == "CNY") { - main->statusLabel->setText(" HUSH/CNY=¥ /元 " + QString::number( (double) Settings::getInstance()->getCNYPrice() ,'f',2)); - ui->volumeExchange->setText(" ¥ /元 " + QString::number((double) Settings::getInstance()->getCNYVolume() ,'f',2)); - ui->marketcapTab->setText(" ¥ /元 " + QString::number((double) Settings::getInstance()->getCNYCAP() ,'f',2)); + double price = Settings::getInstance()->getCNYPrice(); + double volume = Settings::getInstance()->getCNYVolume(); + double cap = Settings::getInstance()->getCNYCAP(); + main->statusLabel->setText(" HUSH/CNY=¥ /元 " + (QLocale(QLocale::Chinese).toString(price,'f', 2))); + ui->volumeExchange->setText(" ¥ /元 " + (QLocale(QLocale::Chinese).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ¥ /元 " + (QLocale(QLocale::Chinese).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "RUB") { - main->statusLabel->setText(" HUSH/RUB=₽ " + QString::number((double) Settings::getInstance()->getRUBPrice() ,'f',2)); - ui->volumeExchange->setText(" ₽ " + QString::number((double) Settings::getInstance()->getRUBVolume() ,'f',2)); - ui->marketcapTab->setText(" ₽ " + QString::number((double) Settings::getInstance()->getRUBCAP() ,'f',2)); + double price = Settings::getInstance()->getRUBPrice(); + double volume = Settings::getInstance()->getRUBVolume(); + double cap = Settings::getInstance()->getRUBCAP(); + main->statusLabel->setText(" HUSH/RUB=₽ " + (QLocale(QLocale::German).toString(price,'f', 2))); + ui->volumeExchange->setText(" ₽ " + (QLocale(QLocale::German).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ₽ " + (QLocale(QLocale::German).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "CAD") { - main->statusLabel->setText(" HUSH/CAD=$ " + QString::number( (double) Settings::getInstance()->getCADPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getCADVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getCADCAP() ,'f',2)); + double price = Settings::getInstance()->getCADPrice(); + double volume = Settings::getInstance()->getCADVolume(); + double cap = Settings::getInstance()->getCADCAP(); + main->statusLabel->setText(" HUSH/CAD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "SGD") { - main->statusLabel->setText(" HUSH/SGD=$ " + QString::number((double) Settings::getInstance()->getSGDPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getSGDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getSGDCAP() ,'f',2)); + double price = Settings::getInstance()->getSGDPrice(); + double volume = Settings::getInstance()->getSGDVolume(); + double cap = Settings::getInstance()->getSGDCAP(); + main->statusLabel->setText(" HUSH/SGD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "CHF") { - main->statusLabel->setText(" HUSH/CHF=CHF " + QString::number((double) Settings::getInstance()->getCHFPrice() ,'f',2)); - ui->volumeExchange->setText(" CHF " + QString::number((double) Settings::getInstance()->getCHFVolume() ,'f',2)); - ui->marketcapTab->setText(" CHF " + QString::number((double) Settings::getInstance()->getCHFCAP() ,'f',2)); + double price = Settings::getInstance()->getCHFPrice(); + double volume = Settings::getInstance()->getCHFVolume(); + double cap = Settings::getInstance()->getCHFCAP(); + main->statusLabel->setText(" HUSH/CHF= " + (QLocale(QLocale::German).toString(price,'f', 2))+ "CHF"); + ui->volumeExchange->setText(QLocale(QLocale::German).toString(volume,'f', 2)+ " CHF"); + ui->marketcapTab->setText(QLocale(QLocale::German).toString(cap,'f', 2)+ " CHF"); + } else if (Settings::getInstance()->get_currency_name() == "INR") { - main->statusLabel->setText(" HUSH/INR=₹ " + QString::number( (double) Settings::getInstance()->getINRPrice() ,'f',2)); - ui->volumeExchange->setText(" ₹ " + QString::number((double) Settings::getInstance()->getINRVolume() ,'f',2)); - ui->marketcapTab->setText(" ₹ " + QString::number((double) Settings::getInstance()->getINRCAP() ,'f',2)); + double price = Settings::getInstance()->getINRPrice(); + double volume = Settings::getInstance()->getINRVolume(); + double cap = Settings::getInstance()->getINRCAP(); + main->statusLabel->setText(" HUSH/INR=₹ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" ₹ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ₹ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "GBP") { - main->statusLabel->setText(" HUSH/GBP=£ " + QString::number((double) Settings::getInstance()->getGBPPrice() ,'f',2)); - ui->volumeExchange->setText(" £ " + QString::number((double) Settings::getInstance()->getGBPVolume() ,'f',2)); - ui->marketcapTab->setText(" £ " + QString::number((double) Settings::getInstance()->getRUBCAP() ,'f',2)); + double price = Settings::getInstance()->getGBPPrice(); + double volume = Settings::getInstance()->getGBPVolume(); + double cap = Settings::getInstance()->getGBPCAP(); + main->statusLabel->setText(" HUSH/GBP=£ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" £ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" £ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + }else if (Settings::getInstance()->get_currency_name() == "AUD") { - main->statusLabel->setText(" HUSH/AUD=$ " + QString::number((double) Settings::getInstance()->getAUDPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getAUDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getAUDCAP() ,'f',2)); + double price = Settings::getInstance()->getAUDPrice(); + double volume = Settings::getInstance()->getAUDVolume(); + double cap = Settings::getInstance()->getAUDCAP(); + main->statusLabel->setText(" HUSH/AUD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); } else { main->statusLabel->setText(" HUSH/USD=$" + QString::number(Settings::getInstance()->getZECPrice(),'f',2 )); @@ -253,15 +318,34 @@ void Controller::getInfoThenRefresh(bool force) { model->setEncryptionStatus(isEncrypted, isLocked); }); - + // Get the total supply and render it with thousand decimal zrpc->fetchSupply([=] (const json& reply) { int supply = reply["supply"].get(); - ui->supply_taddr->setText(QString::number(supply)); int zfunds = reply["zfunds"].get(); - ui->supply_zaddr->setText(QString::number(zfunds)); int total = reply["total"].get(); - ui->supply_total->setText(QString::number(total)); + + if (Settings::getInstance()->get_currency_name() == "EUR") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else if (Settings::getInstance()->get_currency_name() == "CHF") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else if (Settings::getInstance()->get_currency_name() == "RUB") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else + ui->supply_taddr->setText((QLocale(QLocale::English).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::English).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::English).toString(total))); + + }); if ( doUpdate ) { diff --git a/src/scripts/dotranslations.sh b/src/scripts/dotranslations.sh index 7e7ad24..5909023 100755 --- a/src/scripts/dotranslations.sh +++ b/src/scripts/dotranslations.sh @@ -11,7 +11,7 @@ $QT_STATIC/bin/lrelease silentdragon-lite.pro # Then update the qt base translations. First, get all languages ls res/*.qm | awk -F '[_.]' '{print $4}' | while read -r language ; do if [ -f $QT_STATIC/translations/qtbase_$language.qm ]; then - $QT_STATIC/bin/lconvert -o res/silentdragonlite_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/silentdragonlite_$language.qm - mv res/silentdragonlite_$language.qm res/silentdragonlite_$language.qm + $QT_STATIC/bin/lconvert -o res/zec_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/silentdragonlite_$language.qm + mv res/zec_$language.qm res/silentdragonlite_$language.qm fi done diff --git a/src/settings.ui b/src/settings.ui index 5f2bf52..c9cec4c 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -182,7 +182,7 @@ 10 180 - 500 + 691 16 @@ -201,7 +201,7 @@ 9 90 - 297 + 601 17