Skip to content

Commit

Permalink
Add Notification, update language files (#274)
Browse files Browse the repository at this point in the history
* update language files

* lint json

* Add Notification
  • Loading branch information
BBK912 authored Mar 8, 2024
1 parent 7e5ccd0 commit 078cc63
Show file tree
Hide file tree
Showing 15 changed files with 393 additions and 58 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build:github-pr": "tauri build --config src-tauri/tauri.conf.pr.json --features carpe-pr",
"build:web": "vite build",
"lint": "svelte-check --tsconfig ./tsconfig.json && eslint src && prettier --check src",
"format": "eslint --fix src/* && prettier --write src"
"format": "eslint --fix src/* && prettier --write src",
"merge:lang": "node ./src/lang/merge.mjs"
},
"devDependencies": {
"@svelte-put/copy": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "carpe"
version = "1.0.2"
version = "1.0.4"
authors = ["0LNetworkCommunity"]
default-run = "carpe"
description = "a light miner and wallet for libra"
Expand Down
15 changes: 10 additions & 5 deletions src/components/miner/Miner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,25 @@
{$_('miner.title')}
</h2>
</div>

<div class="uk-alert-warning" uk-alert>
<a href class="uk-alert-close" uk-close> </a>
<p>
{$_('miner.disable_warning')}
</p>
</div>
{#if isDevTest}
<div class="uk-flex uk-flex-center">
<p class="uk-text-light uk-text-muted uk-text-uppercase">
DEV MODE, RUNNING IN TEST DIFFICULTY
</p>
</div>
{/if}
{#if !$signingAccount.on_chain}
<CantStart />
{/if}
{#if !$signingAccount.on_chain}
<CantStart />
{/if}
<div class="uk-grid uk-margin-small">
{#if ($signingAccount && $signingAccount.on_chain) || ($tower && $tower.progress && $tower.progress.pct_complete)}
<!-- so we don't get a flash of the error card on an intermittent local network connection if we are in fact mining -->
<!-- so we don't get a flash of the error card on an intermittent local network connection if we are in fact mining -->
<div class="uk-width-1-1 uk-align-center">
<ToggleMiner />
<MinerProgress />
Expand Down
2 changes: 1 addition & 1 deletion src/components/wallet/AccountFromPrivateKey.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
type="button"
on:click|preventDefault={initAccount(danger_temp_private_key)}
>
Submit Now
{$_('wallet.account_from_mnem_submit.btn_submit')}
</button>
</div>
</main>
2 changes: 1 addition & 1 deletion src/components/wallet/AddWatchAccount.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
type="button"
on:click|preventDefault={initAccount(address)}
>
Submit Now
{$_('wallet.account_from_mnem_submit.btn_submit')}
</button>
</div>
</main>
56 changes: 50 additions & 6 deletions src/lang/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,34 @@
"events": "Events"
},
"layout": {
"key_error": {
"title": "ERROR: key not configured",
"body": "Your private key could not be found. Maybe this is due to a migration or upgrade. You should enter your mnemonic again save on your operating system's secure keychain."
},
"connection_error": {
"title": "Oops, We Can't Connect to 0L Network",
"body": "<p> This is likely because the upstream peer (server) you use is down.</p> <h3> Don't worry, your account and coins are safe.</h3> <p>If you need to update or refresh your peers you can do so here:</p>"
"body": "<p> This is likely because the upstream peer (server) you use is down.</p> <h3> Don't worry, your account and coins are safe.</h3> <p>If you need to update or refresh your peers you can do so here:</p>",
"dont_worry": "Don't worry, your account and coins are safe",
"refresh_instructions": "If you need to update or refresh your peers you can do so here:"
},
"error_accordion": {
"title": "Error Report",
"category": "Error Category",
"id": "ID"
}
},
"recovery_mode": {
"title": "Recovery Mode",
"body": "The network is up! But we are in Recovery Mode, and no rewards are being paid for proofs yet. Wait until Recovery Mode is finished to send proofs for rewards. Recovery ends when epoch {epoch_recovery_ends} changes to {epoch_recovery_ends_after}"
},
"attempting_to_connect": "Attempting to connect to the blockchain",
"not_connected_to_chain": "Not connected to chain, data may be out of sync"
},
"wallet": {
"wallet": "Wallet",
"carpe": "CARPE",
"btn_new_account": "New Account",
"btn_restore_account": "Restore Account",
"btn_add_watch_account": "Watch Account",
"newbie_message": "Looks like you don't have any accounts",
"reminder_create": {
"card_title": "Onboarding",
Expand All @@ -38,7 +51,8 @@
"offline": "offline",
"loading": "loading",
"account_on_chain": "Account Not On Chain",
"message": " Your balance will go down for every transaction you send, including mining."
"message": " Your balance will go down for every transaction you send, including mining.",
"info_title": "Account Info"
},
"keygen": {
"title": "Create New Account",
Expand All @@ -65,11 +79,27 @@
"description": "Using your recovery words (mnemonic) you can configure Carpe as a wallet to monitor, and send transactions",
"placeholder": "Recovery Mnemonic"
},
"account_from_private": {
"description": "Recover the account using the private key.",
"placeholder": "Private Key",
"accordion_title": "advanced: use private key"
},
"add_watch_account": {
"description": "Add account to \"watch\" without a signing key (read only).",
"placeholder": "address"
},
"account_switcher": {
"select_account": "Select Account",
"switch_account": "Switch Account",
"setting": "Go To Setting",
"developers": "Developers"
},
"settings": {
"title": "Wallet Options",
"slow_label": "Slow Wallet",
"slow_info": "This is a slow wallet, transfers are limited to the amount unlocked. Each day 35,000 coins unlock on Slow Wallets",
"warn": "These changes will appear on blockchain.",
"slow_wallet_warn": "WARNING: SETTING YOUR WALLET TO SLOW OR COMMUNITY IS PERMANENT"
}
},
"about": {
Expand All @@ -79,6 +109,13 @@
"branch": "Branch",
"commit": "Commit"
},
"upgrade": {
"uptodate": "You are on the current version",
"available": "There is an upgrade available",
"download": "Downloading",
"check_again": "Check Upgrade",
"restart": "Success. You can now restart Carpe"
},
"settings": {
"title": "SETTINGS",
"langapp_settings": {
Expand All @@ -92,6 +129,8 @@
"network_settings": {
"title": "NETWORK SETTINGS",
"list_of_peers": "LIST OF PEERS",
"synced_peers": "Synced Peers",
"refresh_peers_button": "Check Fullnodes Sync",
"description": "Choose a playlist of upstream nodes, so you can access the chain. Network connections will try the list in random order until a connection is made. Simply link to any playlist.json file here to update peers.",
"playlist": "Update Playlist of Network Servers",
"override_peers": "OVERRIDE PEERS",
Expand All @@ -117,6 +156,7 @@
},
"miner": {
"title": "Miner",
"disable_warning": "Mining feature will be removed after V7 release.",
"miner_backlog": {
"title": "Sync Tower Proofs",
"subtitle": "Manually resubmit local proofs",
Expand Down Expand Up @@ -210,14 +250,17 @@
"no_balance_body2": "Looks like you have less than 2 coins in your account, this means you won't be able to onboard anyone."
},
"set_wallet_type": {
"title": "Set your Account Type",
"actions_title": "Account Actions",
"set_slow_title": "Make Slow Wallet (danger)",
"subtitle": " Make sure you know what you are doing. This is not reversible. Slow and Community wallets are permanent.",
"btn_slow": "Set Slow Wallet",
"btn_confirm_slow": "Confirm Set Slow Wallet? This is not reversable.",
"slow_confirm": "Set Slow",
"warning": "Warning: this change is forever",
"btn_community": "Set Community Wallet",
"btn_confirm_community": "Set Community",
"community_confirm": "Confirm Set Community Wallet? This is not reversable."
"community_confirm": "Confirm Set Community Wallet? This is not reversable.",
"title": "Set your Account Type",
"slow_confirm": "Set Slow"
},
"transfer": {
"title": "Coin Transfer",
Expand All @@ -238,6 +281,7 @@
"error_amount_greater_than_balance": "Amount cannot be greater than account balance",
"error_receiver_equals_sender": "Receiver address must be different from sender address",
"error_slow_wallet": "Coin transfer is disabled for slow wallets.",
"error_account_does_not_exist": "Recipient account does not exist.",
"success": "Transfer executed with success",
"failed": "Transfer failed. Code: {code}"
}
Expand Down
52 changes: 46 additions & 6 deletions src/lang/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
"events": "Ereignisse"
},
"layout": {
"key_error": {
"title": "ERROR: Schlüssel nicht konfiguriert",
"body": "Ihr privater Schlüssel konnte nicht gefunden werden. Vielleicht ist dies auf eine Migration oder ein Upgrade zurückzuführen. Sie sollten Ihre Mnemonik erneut eingeben und im sicheren Schlüsselbund Ihres Betriebssystems speichern."
},
"connection_error": {
"title": "Ups, wir können keine Verbindung zum 0L-Netzwerk herstellen",
"body": "<p> Dies liegt wahrscheinlich daran, dass der von dir verwendete Upstream-Peer (Server) nicht verfügbar ist.</p> <h3> Keine Sorge, dein Konto und deine Coins sind sicher.</h3> <p>Wenn Du Deine Peers ändern oder aktualisieren musst, kannst Du das hier tun:</p>"
"body": "<p> Dies liegt wahrscheinlich daran, dass der von dir verwendete Upstream-Peer (Server) nicht verfügbar ist.</p> <h3> Keine Sorge, dein Konto und deine Coins sind sicher.</h3> <p>Wenn Du Deine Peers ändern oder aktualisieren musst, kannst Du das hier tun:</p>",
"dont_worry": "Keine Sorge, Ihr Konto und Ihre Münzen sind sicher",
"refresh_instructions": "Wenn Sie Ihre Peers aktualisieren oder auffrischen müssen, können Sie dies hier tun:"
},
"error_accordion": {
"title": "Fehlerbericht",
Expand All @@ -18,13 +24,16 @@
"recovery_mode": {
"title": "Wiederherstellungsmodus",
"body": "Das Netz ist wieder in Betrieb! Aber wir befinden uns im Wiederherstellungsmodus, und es werden noch keine Belohnungen für Proofs gezahlt. Warte, bis der Wiederherstellungsmodus beendet ist, um Proofs für Belohnungen zu senden. Die Wiederherstellung endet, wenn die Epoche {epoch_recovery_ends} auf {epoch_recovery_ends_after} wechselt."
}
},
"attempting_to_connect": "Versuch einer Verbindung mit der Blockchain",
"not_connected_to_chain": "Nicht mit der Kette verbunden, Daten können nicht synchronisiert sein"
},
"wallet": {
"wallet": "Wallet",
"carpe": "CARPE",
"btn_new_account": "Neues Konto",
"btn_restore_account": "Konto wiederherstellen",
"btn_add_watch_account": "Konto beobachten",
"newbie_message": "Sieht aus, als hättest du keine Konten",
"reminder_create": {
"card_title": "Onboarding",
Expand All @@ -42,7 +51,8 @@
"offline": "offline",
"loading": "wird geladen",
"account_on_chain": "Konto nicht auf der Chain",
"message": " Dein Guthaben verringert sich bei jeder Transaktion, die du sendest, einschließlich Mining."
"message": " Dein Guthaben verringert sich bei jeder Transaktion, die du sendest, einschließlich Mining.",
"info_title": "Konto-Informationen"
},
"keygen": {
"title": "Neues Konto anlegen",
Expand All @@ -69,11 +79,27 @@
"description": "Mit deinen Wiederherstellungswörtern (Mnemonik) kannst du Carpe als Wallet zur Überwachung und zum Senden von Transaktionen konfigurieren",
"placeholder": "Wiederherstellungs Mnemonik"
},
"account_from_private": {
"description": "Stellen Sie das Konto mithilfe des privaten Schlüssels wieder her.",
"placeholder": "Privater Schlüssel",
"accordion_title": "fortgeschritten: privaten Schlüssel verwenden"
},
"add_watch_account": {
"description": "Konto zu \"watch\" ohne Signierschlüssel hinzufügen (nur lesen).",
"placeholder": "Adresse"
},
"account_switcher": {
"select_account": "Konto auswählen",
"switch_account": "Konto wechseln",
"setting": "Gehe zu Einstellung",
"developers": "Entwickler"
},
"settings": {
"title": "Portemonnaie-Optionen",
"slow_label": "Langsame Brieftasche",
"slow_info": "Dies ist eine langsame Geldbörse, Überweisungen sind auf die freigeschaltete Menge beschränkt. Jeden Tag werden 35,000 Münzen auf Slow Wallets freigeschaltet",
"warn": "Diese Änderungen werden in der Blockchain angezeigt.",
"slow_wallet_warn": "WARNUNG: DIE EINSTELLUNG IHRER GELDBÖRSE AUF LANGSAM ODER GEMEINSCHAFT IST DAUERHAFT"
}
},
"about": {
Expand All @@ -83,6 +109,13 @@
"branch": "Branch",
"commit": "Commit"
},
"upgrade": {
"uptodate": "Sie sind auf der aktuellen Version",
"available": "Es ist ein Upgrade verfügbar",
"download": "Herunterladen von",
"check_again": "Upgrade prüfen",
"restart": "Erfolgreich. Sie können nun Carpe neu starten"
},
"settings": {
"title": "EINSTELLUNGEN",
"langapp_settings": {
Expand All @@ -96,6 +129,8 @@
"network_settings": {
"title": "NETZWERKEINSTELLUNGEN",
"list_of_peers": "LISTE DER PEERS",
"synced_peers": "Synced Peers",
"refresh_peers_button": "Check Fullnodes Sync",
"description": "Wählen Sie eine Playlist mit vorgelagerten Knoten, damit ein Zugriff auf die Kette möglich ist. Netzwerkverbindungen werden die Liste in zufälliger Reihenfolge ausprobieren, bis eine Verbindung hergestellt ist. Verweise hier einfach auf eine beliebige playlist.json-Datei, um die Peers zu aktualisieren.",
"playlist": "Playlist der Netzwerkserver aktualisieren",
"override_peers": "PEERS ÜBERSCHREIBEN",
Expand All @@ -121,6 +156,7 @@
},
"miner": {
"title": "Miner",
"disable_warning": "Die Mining-Funktion wird nach der Veröffentlichung von V7 entfernt werden.",
"miner_backlog": {
"title": "Sync Tower Proofs",
"subtitle": "Lokale Proofs manuell erneut einreichen",
Expand Down Expand Up @@ -214,14 +250,17 @@
"no_balance_body2": "Sieht so aus, als hättest du weniger als 2 Coins auf deinem Konto, das bedeutet, dass du niemanden onboarden kannst."
},
"set_wallet_type": {
"title": "Kontotyp Auswählen",
"actions_title": "Konto-Aktionen",
"set_slow_title": "Slow Wallet machen (Gefahr)",
"subtitle": " Es ist wichtig, dass du weißt, was du tust. Dies kann nicht mehr rückgängig gemacht werden. Slow und Community Wallets sind unveränderlich.",
"btn_slow": "Slow Wallet Wählen",
"btn_confirm_slow": "Slow Wallet bestätigen? Dies kann nicht rückgängig gemacht werden.",
"slow_confirm": "Slow Wählen",
"warning": "Warnung: Diese Änderung ist für immer",
"btn_community": "Community Wallet Wählen",
"btn_confirm_community": "Community Wählen",
"community_confirm": "Community Wallet bestätigen? Dies kann nicht rückgängig gemacht werden."
"community_confirm": "Community Wallet bestätigen? Dies kann nicht rückgängig gemacht werden.",
"title": "Kontotyp Auswählen",
"slow_confirm": "Slow Wählen"
},
"transfer": {
"title": "Überweisung von Coins",
Expand All @@ -242,6 +281,7 @@
"error_amount_greater_than_balance": "Der Betrag kann nicht größer als der Kontostand sein",
"error_receiver_equals_sender": "Die Empfängeradresse muss sich von der Absenderadresse unterscheiden",
"error_slow_wallet": "Die Überweisung von Coins ist für Slow Wallets deaktiviert.",
"error_account_does_not_exist": "Das Konto des Empfängers ist nicht vorhanden.",
"success": "Überweisung erfolgreich durchgeführt",
"failed": "Überweisung fehlgeschlagen. Code: {code}"
}
Expand Down
7 changes: 5 additions & 2 deletions src/lang/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"settings": {
"title": "Wallet Options",
"slow_label": "Slow Wallet",
"slow_info": "This is a slow wallet, transfers are limited to the amount unlocked. Each day 41,000 coins unlock on Slow Wallets",
"slow_info": "This is a slow wallet, transfers are limited to the amount unlocked. Each day 35,000 coins unlock on Slow Wallets",
"warn": "These changes will appear on blockchain.",
"slow_wallet_warn": "WARNING: SETTING YOUR WALLET TO SLOW OR COMMUNITY IS PERMANENT"
}
Expand Down Expand Up @@ -156,6 +156,7 @@
},
"miner": {
"title": "Miner",
"disable_warning": "Mining feature will be removed after V7 release.",
"miner_backlog": {
"title": "Sync Tower Proofs",
"subtitle": "Manually resubmit local proofs",
Expand Down Expand Up @@ -257,7 +258,9 @@
"warning": "Warning: this change is forever",
"btn_community": "Set Community Wallet",
"btn_confirm_community": "Set Community",
"community_confirm": "Confirm Set Community Wallet? This is not reversible"
"community_confirm": "Confirm Set Community Wallet? This is not reversible",
"title": "Set your Account Type",
"slow_confirm": "Set Slow"
},
"transfer": {
"title": "Coin Transfer",
Expand Down
Loading

0 comments on commit 078cc63

Please sign in to comment.