From 7cfb91c38435f69eb439559305e4715d45304df7 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Sun, 10 Apr 2022 15:14:57 +0200 Subject: [PATCH] Translate Minting Page and fix sync --- qortal-ui-core/language/cn.json | 41 +++++ qortal-ui-core/language/de.json | 40 +++++ qortal-ui-core/language/fr.json | 41 +++++ qortal-ui-core/language/pl.json | 40 +++++ qortal-ui-core/language/sp.json | 40 +++++ qortal-ui-core/language/us.json | 40 +++++ qortal-ui-core/src/components/app-info.js | 2 +- .../plugins/core/minting/minting-info.src.js | 142 ++++++++++-------- 8 files changed, 322 insertions(+), 64 deletions(-) diff --git a/qortal-ui-core/language/cn.json b/qortal-ui-core/language/cn.json index 62fa96fd..96a3fd48 100644 --- a/qortal-ui-core/language/cn.json +++ b/qortal-ui-core/language/cn.json @@ -121,5 +121,46 @@ "create": "創造", "continue": "繼續", "save": "節省" + }, + "mintingpage": { + "mintingpage": { + "mchange1": "General Minting Details", + "mchange2": "Blockchain Statistics", + "mchange3": "Avg. Qortal Blocktime", + "mchange4": "Avg. Blocks Per Day", + "mchange5": "Avg. Created QORT Per Day", + "mchange6": "Minting Account Details", + "mchange7": "Not A Minter", + "mchange8": "Minting", + "mchange9": "Not Minting", + "mchange10": "Activate Account Details", + "mchange11": "Not Activated", + "mchange12": "Activate Your Account", + "mchange13": "Introduction", + "mchange14": "To activate your account, an OUTGOING transaction needs to take place. Name Registration is the most common method. You can ask someone in Q-Chat to send you a small amount of QORT so that you may activate your account, or buy QORT within the Trade Portal then make an OUTGOING transaction of any kind and secure your public key on the blockchain. Until you do this, your public key is only known by you, in your UI, and no one else can pull your public key from the chain.", + "mchange15": "Current Status", + "mchange16": "Current Level", + "mchange17": "Blocks To Next Level", + "mchange18": "If you continue minting 24/7 you will reach level", + "mchange19": "Minting Rewards Info", + "mchange20": "Current Tier", + "mchange21": "Total Minters in The Tier", + "mchange22": "Tier Share Per Block", + "mchange23": "Est. Reward Per Block", + "mchange24": "Est. Reward Per Day", + "mchange25": "Seconds", + "mchange26": "Blocks", + "mchange27": "Level", + "mchange28": "Tier", + "mchange29": "days", + "mchange30": "Minters", + "mchange31": "Press for help", + "mchange32": "Become A Minter", + "mchange33": "Introduction", + "mchange34": "In Qortal, in order to become a minter and begin earning QORT rewards with your increase in Minter Level, you must first become ‘sponsored’. A sponsor in Qortal is any other minter of level 5 or higher, or a Qortal Founder. You will obtain a sponsorship key from the sponsor, and use that key to get to level 1. Once you have reached level 1, you will be able to create your own minting key and start earning rewards for helping secure the Qortal Blockchain.", + "mchange35": "Sponsorship", + "mchange36": "Your sponsor will issue you a ‘Sponsorship Key’ which you will use to add to your node, and begin minting (for no rewards until reaching level 1.) Once you reach level 1, you create/assign your own ‘Minting Key’ and begin earning rewards. You have XXXX blocks remaining in your sponsorship period.", + "mchange37": "Simply reach out to a minter in Qortal who is high enough level to issue a sponsorship key, obtain that key, then come back here and input the key to begin your minting journey !", + "mchange38": "in" } } \ No newline at end of file diff --git a/qortal-ui-core/language/de.json b/qortal-ui-core/language/de.json index 66f83767..f13f98ea 100644 --- a/qortal-ui-core/language/de.json +++ b/qortal-ui-core/language/de.json @@ -121,5 +121,45 @@ "create": "Erstellen", "continue": "Fortsetzen", "save": "Speichern" + }, + "mintingpage": { + "mchange1": "Allgemeine Prägedetails", + "mchange2": "Blockchain-Statistik", + "mchange3": "Durchschn. Qortal-Blockzeit", + "mchange4": "Durchschn. Blöcke pro Tag", + "mchange5": "Durchschn. QORT pro Tag erstellt", + "mchange6": "Minting-Kontodetails", + "mchange7": "Kein Minter", + "mchange8": "Prägung", + "mchange9": "Nicht am prägen", + "mchange10": "Kontodetails aktivieren", + "mchange11": "Nicht aktiviert", + "mchange12": "Aktiviere deinen Account", + "mchange13": "Einführung", + "mchange14": "Um Ihr Konto zu aktivieren, muss eine AUSGEHENDE Transaktion stattfinden. Die Namensregistrierung ist die häufigste Methode. Sie können jemanden in Q-Chat bitten, Ihnen eine kleine Menge QORT zu senden, damit Sie Ihr Konto aktivieren können, oder QORT im Handelsportal kaufen, dann eine AUSGEHENDE Transaktion jeglicher Art durchführen und Ihren öffentlichen Schlüssel in der Blockchain sichern. Bis Sie dies tun, ist Ihr öffentlicher Schlüssel nur Ihnen in Ihrer Benutzeroberfläche bekannt, und niemand sonst kann Ihren öffentlichen Schlüssel aus der Kette ziehen.", + "mchange15": "Aktueller Status", + "mchange16": "Aktuelle Stufe", + "mchange17": "Blöcke bis zur nächsten Stufe", + "mchange18": "Wenn Sie rund um die Uhr prägen, erreichen Sie die Stufe", + "mchange19": "Informationen zu Minting-Belohnungen", + "mchange20": "Aktuelle Ebene", + "mchange21": "Totale Minters in dieser Ebene", + "mchange22": "Ebenen-Anteil pro Block", + "mchange23": "Gesch. Belohnung pro Block", + "mchange24": "Gesch. Belohnung pro Tag", + "mchange25": "Sekunden", + "mchange26": "Blöcke", + "mchange27": "Stufe", + "mchange28": "Ebene", + "mchange29": "tagen", + "mchange30": "Minters", + "mchange31": "Drücken Sie für Hilfe", + "mchange32": "Werde ein Minter", + "mchange33": "Einführung", + "mchange34": "Um in Qortal ein Minter zu werden und QORT-Belohnungen mit Ihrer Erhöhung des Minter-Levels zu verdienen, müssen Sie zuerst „gesponsert“ werden. Ein Sponsor in Qortal ist jeder andere Minter der Stufe 5 oder höher oder ein Qortal-Gründer. Sie erhalten einen Sponsoring-Schlüssel vom Sponsor und verwenden diesen Schlüssel, um auf Level 1 zu gelangen. Sobald Sie Level 1 erreicht haben, können Sie Ihren eigenen Prägeschlüssel erstellen und beginnen, Belohnungen für die Unterstützung bei der Sicherung der Qortal-Blockkette zu verdienen.", + "mchange35": "Sponsoring", + "mchange36": "Ihr Sponsor stellt Ihnen einen „Sponsorship Key“ aus, den Sie zum Hinzufügen zu Ihrem Knoten verwenden und mit dem Prägen beginnen (keine Belohnungen bis zum Erreichen von Level 1). Sobald Sie Level 1 erreicht haben, erstellen/weisen Sie Ihren eigenen „Minting Key“ und Beginnen Sie mit dem Verdienen von Belohnungen. Sie haben noch XXXX-Blöcke in Ihrem Sponsoring-Zeitraum.", + "mchange37": "Wenden Sie sich einfach an einen Minter in Qortal, der hoch genug ist, um einen Sponsoring-Schlüssel auszustellen, erhalten Sie diesen Schlüssel, kommen Sie dann hierher zurück und geben Sie den Schlüssel ein, um Ihre Minting-Reise zu beginnen!", + "mchange38": "in" } } \ No newline at end of file diff --git a/qortal-ui-core/language/fr.json b/qortal-ui-core/language/fr.json index a316af5c..506ee0eb 100644 --- a/qortal-ui-core/language/fr.json +++ b/qortal-ui-core/language/fr.json @@ -121,5 +121,46 @@ "create": "Créer", "continue": "Continuez", "save": "Sauver" + }, + "mintingpage": { + "mintingpage": { + "mchange1": "General Minting Details", + "mchange2": "Blockchain Statistics", + "mchange3": "Avg. Qortal Blocktime", + "mchange4": "Avg. Blocks Per Day", + "mchange5": "Avg. Created QORT Per Day", + "mchange6": "Minting Account Details", + "mchange7": "Not A Minter", + "mchange8": "Minting", + "mchange9": "Not Minting", + "mchange10": "Activate Account Details", + "mchange11": "Not Activated", + "mchange12": "Activate Your Account", + "mchange13": "Introduction", + "mchange14": "To activate your account, an OUTGOING transaction needs to take place. Name Registration is the most common method. You can ask someone in Q-Chat to send you a small amount of QORT so that you may activate your account, or buy QORT within the Trade Portal then make an OUTGOING transaction of any kind and secure your public key on the blockchain. Until you do this, your public key is only known by you, in your UI, and no one else can pull your public key from the chain.", + "mchange15": "Current Status", + "mchange16": "Current Level", + "mchange17": "Blocks To Next Level", + "mchange18": "If you continue minting 24/7 you will reach level", + "mchange19": "Minting Rewards Info", + "mchange20": "Current Tier", + "mchange21": "Total Minters in The Tier", + "mchange22": "Tier Share Per Block", + "mchange23": "Est. Reward Per Block", + "mchange24": "Est. Reward Per Day", + "mchange25": "Seconds", + "mchange26": "Blocks", + "mchange27": "Level", + "mchange28": "Tier", + "mchange29": "days", + "mchange30": "Minters", + "mchange31": "Press for help", + "mchange32": "Become A Minter", + "mchange33": "Introduction", + "mchange34": "In Qortal, in order to become a minter and begin earning QORT rewards with your increase in Minter Level, you must first become ‘sponsored’. A sponsor in Qortal is any other minter of level 5 or higher, or a Qortal Founder. You will obtain a sponsorship key from the sponsor, and use that key to get to level 1. Once you have reached level 1, you will be able to create your own minting key and start earning rewards for helping secure the Qortal Blockchain.", + "mchange35": "Sponsorship", + "mchange36": "Your sponsor will issue you a ‘Sponsorship Key’ which you will use to add to your node, and begin minting (for no rewards until reaching level 1.) Once you reach level 1, you create/assign your own ‘Minting Key’ and begin earning rewards. You have XXXX blocks remaining in your sponsorship period.", + "mchange37": "Simply reach out to a minter in Qortal who is high enough level to issue a sponsorship key, obtain that key, then come back here and input the key to begin your minting journey !", + "mchange38": "in" } } \ No newline at end of file diff --git a/qortal-ui-core/language/pl.json b/qortal-ui-core/language/pl.json index 5c8ee6ce..3103cec5 100644 --- a/qortal-ui-core/language/pl.json +++ b/qortal-ui-core/language/pl.json @@ -121,5 +121,45 @@ "create": "Tworzyć", "continue": "Kontyntynuj", "save": "Ratować" + }, + "mintingpage": { + "mchange1": "General Minting Details", + "mchange2": "Blockchain Statistics", + "mchange3": "Avg. Qortal Blocktime", + "mchange4": "Avg. Blocks Per Day", + "mchange5": "Avg. Created QORT Per Day", + "mchange6": "Minting Account Details", + "mchange7": "Not A Minter", + "mchange8": "Minting", + "mchange9": "Not Minting", + "mchange10": "Activate Account Details", + "mchange11": "Not Activated", + "mchange12": "Activate Your Account", + "mchange13": "Introduction", + "mchange14": "To activate your account, an OUTGOING transaction needs to take place. Name Registration is the most common method. You can ask someone in Q-Chat to send you a small amount of QORT so that you may activate your account, or buy QORT within the Trade Portal then make an OUTGOING transaction of any kind and secure your public key on the blockchain. Until you do this, your public key is only known by you, in your UI, and no one else can pull your public key from the chain.", + "mchange15": "Current Status", + "mchange16": "Current Level", + "mchange17": "Blocks To Next Level", + "mchange18": "If you continue minting 24/7 you will reach level", + "mchange19": "Minting Rewards Info", + "mchange20": "Current Tier", + "mchange21": "Total Minters in The Tier", + "mchange22": "Tier Share Per Block", + "mchange23": "Est. Reward Per Block", + "mchange24": "Est. Reward Per Day", + "mchange25": "Seconds", + "mchange26": "Blocks", + "mchange27": "Level", + "mchange28": "Tier", + "mchange29": "days", + "mchange30": "Minters", + "mchange31": "Press for help", + "mchange32": "Become A Minter", + "mchange33": "Introduction", + "mchange34": "In Qortal, in order to become a minter and begin earning QORT rewards with your increase in Minter Level, you must first become ‘sponsored’. A sponsor in Qortal is any other minter of level 5 or higher, or a Qortal Founder. You will obtain a sponsorship key from the sponsor, and use that key to get to level 1. Once you have reached level 1, you will be able to create your own minting key and start earning rewards for helping secure the Qortal Blockchain.", + "mchange35": "Sponsorship", + "mchange36": "Your sponsor will issue you a ‘Sponsorship Key’ which you will use to add to your node, and begin minting (for no rewards until reaching level 1.) Once you reach level 1, you create/assign your own ‘Minting Key’ and begin earning rewards. You have XXXX blocks remaining in your sponsorship period.", + "mchange37": "Simply reach out to a minter in Qortal who is high enough level to issue a sponsorship key, obtain that key, then come back here and input the key to begin your minting journey !", + "mchange38": "in" } } diff --git a/qortal-ui-core/language/sp.json b/qortal-ui-core/language/sp.json index fcd8ad57..48cedc00 100644 --- a/qortal-ui-core/language/sp.json +++ b/qortal-ui-core/language/sp.json @@ -121,5 +121,45 @@ "create": "Crear", "continue": "Continuar", "save": "Guardar" + }, + "mintingpage": { + "mchange1": "General Minting Details", + "mchange2": "Blockchain Statistics", + "mchange3": "Avg. Qortal Blocktime", + "mchange4": "Avg. Blocks Per Day", + "mchange5": "Avg. Created QORT Per Day", + "mchange6": "Minting Account Details", + "mchange7": "Not A Minter", + "mchange8": "Minting", + "mchange9": "Not Minting", + "mchange10": "Activate Account Details", + "mchange11": "Not Activated", + "mchange12": "Activate Your Account", + "mchange13": "Introduction", + "mchange14": "To activate your account, an OUTGOING transaction needs to take place. Name Registration is the most common method. You can ask someone in Q-Chat to send you a small amount of QORT so that you may activate your account, or buy QORT within the Trade Portal then make an OUTGOING transaction of any kind and secure your public key on the blockchain. Until you do this, your public key is only known by you, in your UI, and no one else can pull your public key from the chain.", + "mchange15": "Current Status", + "mchange16": "Current Level", + "mchange17": "Blocks To Next Level", + "mchange18": "If you continue minting 24/7 you will reach level", + "mchange19": "Minting Rewards Info", + "mchange20": "Current Tier", + "mchange21": "Total Minters in The Tier", + "mchange22": "Tier Share Per Block", + "mchange23": "Est. Reward Per Block", + "mchange24": "Est. Reward Per Day", + "mchange25": "Seconds", + "mchange26": "Blocks", + "mchange27": "Level", + "mchange28": "Tier", + "mchange29": "days", + "mchange30": "Minters", + "mchange31": "Press for help", + "mchange32": "Become A Minter", + "mchange33": "Introduction", + "mchange34": "In Qortal, in order to become a minter and begin earning QORT rewards with your increase in Minter Level, you must first become ‘sponsored’. A sponsor in Qortal is any other minter of level 5 or higher, or a Qortal Founder. You will obtain a sponsorship key from the sponsor, and use that key to get to level 1. Once you have reached level 1, you will be able to create your own minting key and start earning rewards for helping secure the Qortal Blockchain.", + "mchange35": "Sponsorship", + "mchange36": "Your sponsor will issue you a ‘Sponsorship Key’ which you will use to add to your node, and begin minting (for no rewards until reaching level 1.) Once you reach level 1, you create/assign your own ‘Minting Key’ and begin earning rewards. You have XXXX blocks remaining in your sponsorship period.", + "mchange37": "Simply reach out to a minter in Qortal who is high enough level to issue a sponsorship key, obtain that key, then come back here and input the key to begin your minting journey !", + "mchange38": "in" } } \ No newline at end of file diff --git a/qortal-ui-core/language/us.json b/qortal-ui-core/language/us.json index a2ac9a7c..4200174c 100644 --- a/qortal-ui-core/language/us.json +++ b/qortal-ui-core/language/us.json @@ -121,5 +121,45 @@ "create": "Create", "continue": "Continue", "save": "Save" + }, + "mintingpage": { + "mchange1": "General Minting Details", + "mchange2": "Blockchain Statistics", + "mchange3": "Avg. Qortal Blocktime", + "mchange4": "Avg. Blocks Per Day", + "mchange5": "Avg. Created QORT Per Day", + "mchange6": "Minting Account Details", + "mchange7": "Not A Minter", + "mchange8": "Minting", + "mchange9": "Not Minting", + "mchange10": "Activate Account Details", + "mchange11": "Not Activated", + "mchange12": "Activate Your Account", + "mchange13": "Introduction", + "mchange14": "To activate your account, an OUTGOING transaction needs to take place. Name Registration is the most common method. You can ask someone in Q-Chat to send you a small amount of QORT so that you may activate your account, or buy QORT within the Trade Portal then make an OUTGOING transaction of any kind and secure your public key on the blockchain. Until you do this, your public key is only known by you, in your UI, and no one else can pull your public key from the chain.", + "mchange15": "Current Status", + "mchange16": "Current Level", + "mchange17": "Blocks To Next Level", + "mchange18": "If you continue minting 24/7 you will reach level", + "mchange19": "Minting Rewards Info", + "mchange20": "Current Tier", + "mchange21": "Total Minters in The Tier", + "mchange22": "Tier Share Per Block", + "mchange23": "Est. Reward Per Block", + "mchange24": "Est. Reward Per Day", + "mchange25": "Seconds", + "mchange26": "Blocks", + "mchange27": "Level", + "mchange28": "Tier", + "mchange29": "days", + "mchange30": "Minters", + "mchange31": "Press for help", + "mchange32": "Become A Minter", + "mchange33": "Introduction", + "mchange34": "In Qortal, in order to become a minter and begin earning QORT rewards with your increase in Minter Level, you must first become ‘sponsored’. A sponsor in Qortal is any other minter of level 5 or higher, or a Qortal Founder. You will obtain a sponsorship key from the sponsor, and use that key to get to level 1. Once you have reached level 1, you will be able to create your own minting key and start earning rewards for helping secure the Qortal Blockchain.", + "mchange35": "Sponsorship", + "mchange36": "Your sponsor will issue you a ‘Sponsorship Key’ which you will use to add to your node, and begin minting (for no rewards until reaching level 1.) Once you reach level 1, you create/assign your own ‘Minting Key’ and begin earning rewards. You have XXXX blocks remaining in your sponsorship period.", + "mchange37": "Simply reach out to a minter in Qortal who is high enough level to issue a sponsorship key, obtain that key, then come back here and input the key to begin your minting journey !", + "mchange38": "in" } } \ No newline at end of file diff --git a/qortal-ui-core/src/components/app-info.js b/qortal-ui-core/src/components/app-info.js index 621559e3..870ea656 100644 --- a/qortal-ui-core/src/components/app-info.js +++ b/qortal-ui-core/src/components/app-info.js @@ -117,7 +117,7 @@ class AppInfo extends connect(store)(LitElement) { return html`${translate("appinfo.minting")}` } else if (this.nodeStatus.isMintingPossible === false && this.nodeStatus.isSynchronizing === true) { this.cssStatus = 'black' - return `(${translate("appinfo.synchronizing")}... ${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''})` + return html`(${translate("appinfo.synchronizing")}... ${this.nodeStatus.syncPercent !== undefined ? this.nodeStatus.syncPercent + '%' : ''})` } else if (this.nodeStatus.isMintingPossible === false && this.nodeStatus.isSynchronizing === false) { this.cssStatus = 'black' return '' diff --git a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js index ef03fa10..8b945e5e 100644 --- a/qortal-ui-plugins/plugins/core/minting/minting-info.src.js +++ b/qortal-ui-plugins/plugins/core/minting/minting-info.src.js @@ -1,6 +1,11 @@ import { LitElement, html, css } from 'lit' import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' +import { use, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' + +registerTranslateConfig({ + loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) +}) import '@material/mwc-icon' import '@material/mwc-button' @@ -205,27 +210,27 @@ class MintingInfo extends LitElement { return html`