From 8f74ef58f856abbb4b9fb8ce1bb315528c5d17c8 Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 10 Jun 2021 15:38:15 -0500 Subject: [PATCH] i18n fixes. --- .../bisq-transactions.component.ts | 5 +- .../api-docs/api-docs.component.html | 158 ++++---- .../api-docs/code-template.component.html | 8 +- frontend/src/locale/messages.xlf | 365 +++++++++++++++++- 4 files changed, 434 insertions(+), 102 deletions(-) diff --git a/frontend/src/app/bisq/bisq-transactions/bisq-transactions.component.ts b/frontend/src/app/bisq/bisq-transactions/bisq-transactions.component.ts index 44c39524e..ab4637e9c 100644 --- a/frontend/src/app/bisq/bisq-transactions/bisq-transactions.component.ts +++ b/frontend/src/app/bisq/bisq-transactions/bisq-transactions.component.ts @@ -160,8 +160,9 @@ export class BisqTransactionsComponent implements OnInit { return outputs.reduce((acc: number, output: BisqOutput) => acc + output.bsqAmount, 0); } - getStringByTxType(id: string) { - return this.txTypeOptions.find((type) => type.id).name; + getStringByTxType(type: string) { + const id = this.txTypes.indexOf(type) + 1; + return this.txTypeOptions.find((type) => id === type.id).name; } trackByFn(index: number) { diff --git a/frontend/src/app/components/api-docs/api-docs.component.html b/frontend/src/app/components/api-docs/api-docs.component.html index f602a1fab..5d4ab2faa 100644 --- a/frontend/src/app/components/api-docs/api-docs.component.html +++ b/frontend/src/app/components/api-docs/api-docs.component.html @@ -17,12 +17,12 @@
-
Description
+
Description
Returns details about an address. Available fields: address, chain_stats, and mempool_stats. {{ '{' }}chain,mempool{{ '}' }}_stats each contain an object with tx_count, funded_txo_count, funded_txo_sum, spent_txo_count, and spent_txo_sum.
@@ -36,11 +36,11 @@
-
Description
+
Description
Get transaction history for the specified address/scripthash, sorted with newest first. Returns up to 50 mempool transactions plus the first 25 confirmed transactions. You can request more confirmed transactions using :last_seen_txid (see below).
@@ -53,11 +53,11 @@
-
Description
+
Description
Get confirmed transaction history for the specified address/scripthash, sorted with newest first. Returns 25 transactions per page. More can be requested by specifying the last txid seen by the previous query.
@@ -71,12 +71,12 @@
-
Description
+
Description
Get unconfirmed transaction history for the specified address/scripthash. Returns up to 50 transactions (no paging).
@@ -91,12 +91,12 @@
-
Description
+
Description
Get the list of unspent transaction outputs associated with the address/scripthash. Available fields: txid, vout, value, and status (with the status of the funding tx).There is also a valuecommitment field that may appear in place of value, plus the following additional fields: asset/assetcommitment, nonce/noncecommitment, surjection_proof, and range_proof.
@@ -117,11 +117,11 @@
-
Endpoint
+
Endpoint
GET /liquid/api/asset/:asset_id
-
Description
+
Description
Returns information about a Liquid asset.
@@ -139,7 +139,7 @@ GET /liquid/api/asset/:asset_id/txs[/mempool|/chain]
-
Description
+
Description
Returns transactions associated with the specified Liquid asset. For the network's native asset, returns a list of peg in, peg out, and burn transactions. For user-issued assets, returns a list of issuance, reissuance, and burn transactions. Does not include regular transactions transferring this asset.
@@ -154,11 +154,11 @@
-
Description
+
Description
Get the current total supply of the specified asset. For the native asset (L-BTC), this is calculated as [chain,mempool]_stats.peg_in_amount - [chain,mempool]_stats.peg_out_amount - [chain,mempool]_stats.burned_amount. For issued assets, this is calculated as [chain,mempool]_stats.issued_amount - [chain,mempool]_stats.burned_amount. Not available for assets with blinded issuances. If /decimal is specified, returns the supply as a decimal according to the asset's divisibility. Otherwise, returned in base units.
@@ -179,11 +179,11 @@
-
Description
+
Description
Returns details about a block. Available fields: id, height, version, timestamp, bits, nonce, merkle_root, tx_count, size, weight, proof, and previousblockhash.
@@ -196,11 +196,11 @@
-
Description
+
Description
Returns the hash of the block currently at :height.
@@ -216,7 +216,7 @@ GET {{ network.val === '' ? '' : '/' + network.val }}/api/block/:hash/raw
-
Description
+
Description
Returns the raw block representation in binary.
@@ -231,11 +231,11 @@
Get Block Status
-
Description
+
Description
Returns the confirmation status of a block. Available fields: in_best_chain (boolean, false for orphaned blocks), next_best (the hash of the next block, only available for blocks in the best chain).
@@ -250,12 +250,12 @@
-
Description
+
Description
Returns the height of the last block.
@@ -270,11 +270,11 @@
-
Description
+
Description
Returns the hash of the last block.
@@ -289,12 +289,12 @@
-
Description
+
Description
Returns the transaction at index :index within the specified block.
@@ -310,11 +310,11 @@
-
Description
+
Description
Returns a list of all txids in the block.
@@ -329,11 +329,11 @@
-
Description
+
Description
Returns a list of transactions in the block (up to 25 transactions beginning at start_index). Transactions returned here do not have the status field, since all the transactions share the same block and confirmation status.
@@ -348,12 +348,12 @@
-
Description
+
Description
Returns the 10 newest blocks starting at the tip or at :start_height if specified.
@@ -376,12 +376,12 @@
-
Endpoint
+
Endpoint
GET /bisq/api/address/:address
-
Description
+
Description
Returns all Bisq transactions belonging to a Bitcoin address, with 'B' prefixed in front of the address.
@@ -396,12 +396,12 @@
-
Endpoint
+
Endpoint
GET /bisq/api/block/:hash
-
Description
+
Description
Returns all Bisq transactions that exist in a Bitcoin block.
@@ -416,11 +416,11 @@
-
Endpoint
+
Endpoint
GET /bisq/api/blocks/tip/height
-
Description
+
Description
Returns the most recently processed Bitcoin block height processed by Bisq.
@@ -435,12 +435,12 @@
-
Endpoint
+
Endpoint
GET /bisq/api/blocks/:index/:length
-
Description
+
Description
Returns :length Bitcoin blocks that contain Bisq transactions, starting from :index.
@@ -456,12 +456,12 @@
-
Endpoint
+
Endpoint
GET /bisq/api/stats
-
Description
+
Description
Returns statistics about all Bisq transactions.
@@ -476,12 +476,12 @@
-
Endpoint
+
Endpoint
GET /bisq/api/tx/:txid
-
Description
+
Description
Returns details about a Bisq transaction.
@@ -497,12 +497,12 @@
Get Mempool Txids
-
Endpoint
+
Endpoint
GET /bisq/api/txs/:index/:length
-
Description
+
Description
Returns :length of latest Bisq transactions, starting from :index.
@@ -523,11 +523,11 @@
-
Description
+
Description
Returns our currently suggested fees for new transactions.
@@ -539,11 +539,11 @@
-
Description
+
Description
Returns current mempool as projected blocks.
@@ -555,11 +555,11 @@
-
Description
+
Description
Returns the ancestors and the best descendant fees for a transaction.
@@ -579,12 +579,12 @@
-
Description
+
Description
Returns current mempool backlog statistics.
@@ -596,11 +596,11 @@
-
Description
+
Description
Get the full list of txids in the mempool as an array. The order of the txids is arbitrary and does not match bitcoind.
@@ -614,11 +614,11 @@
-
Description
+
Description
Get a list of the last 10 transactions to enter the mempool. Each transaction object contains simplified overview data, with the following fields: txid, fee, vsize, and value.
@@ -643,7 +643,7 @@ GET {{ network.val === '' ? '' : '/' + network.val }}/api/tx/:txid
-
Description
+
Description
Returns details about a transaction. Available fields: txid, version, locktime, size, weight, fee, vin, vout, and status.
@@ -658,11 +658,11 @@
-
Description
+
Description
Returns a transaction serialized as hex.
@@ -676,11 +676,11 @@
-
Description
+
Description
Returns a merkle inclusion proof for the transaction using bitcoind's merkleblock format.
@@ -695,12 +695,12 @@
-
Description
+
Description
Returns a merkle inclusion proof for the transaction using Electrum's blockchain.transaction.get_merkle format.
@@ -715,11 +715,11 @@
-
Description
+
Description
Returns the spending status of a transaction output. Available fields: spent (boolean), txid (optional), vin (optional), and status (optional, the status of the spending tx).
@@ -734,11 +734,11 @@
-
Description
+
Description
Returns the spending status of all transaction outputs.
@@ -753,11 +753,11 @@
-
Description
+
Description
Returns a transaction as binary data.
@@ -772,11 +772,11 @@
-
Description
+
Description
Returns the confirmation status of a transaction. Available fields: confirmed (boolean), block_height (optional), and block_hash (optional).
@@ -791,12 +791,12 @@
-
Endpoint
+
Endpoint
POST {{ network.val === '' ? '' : '/' + network.val }}/api/tx
-
Description
+
Description
Broadcast a raw transaction to the network. The transaction should be provided as hex in the request body. The txid will be returned on success.
@@ -811,11 +811,11 @@
-
Endpoint
+
Endpoint
wss://{{ hostname }}{{ network.val === '' ? '' : '/' + network.val }}/api/v1/ws
-
Description
+
Description
Default push: {{ '{' }} action: 'want', data: ['blocks', ...] {{ '}' }} to express what you want pushed. Available: blocks, mempool-blocks, live-2h-chart, and stats.

Push transactions related to address: {{ '{' }} 'track-address': '3PbJ...bF9B' {{ '}' }} to receive all new transactions containing that address as input or output. Returns an array of transactions. address-transactions for new mempool transactions, and block-transactions for new block confirmed transactions.
diff --git a/frontend/src/app/components/api-docs/code-template.component.html b/frontend/src/app/components/api-docs/code-template.component.html index 8a987909e..5e38839e2 100644 --- a/frontend/src/app/components/api-docs/code-template.component.html +++ b/frontend/src/app/components/api-docs/code-template.component.html @@ -3,7 +3,7 @@
  • ES Module -
    Install Package
    +
    Install Package
  • - Common JS + CommonJS
    Code Example
  • - CURL + cURL -
    Code Example
    +
    Code Example
  • diff --git a/frontend/src/locale/messages.xlf b/frontend/src/locale/messages.xlf index 73a81f393..58eb24c9b 100644 --- a/frontend/src/locale/messages.xlf +++ b/frontend/src/locale/messages.xlf @@ -747,7 +747,7 @@ src/app/components/about/about.component.html - 282,288 + 198,202 src/app/components/api-docs/api-docs.component.html @@ -1263,7 +1263,7 @@ The Mempool Open Source Project src/app/components/about/about.component.html - 13,16 + 11,12 about.about-the-project @@ -1271,14 +1271,14 @@ An explorer and API developed and operated for the Bitcoin community, focusing on the emerging transaction fee market to help our transition into a multi-layer ecosystem, without ads, altcoins, or third-party trackers. src/app/components/about/about.component.html - 16,20 + 12,16 Enterprise Sponsors 🚀 src/app/components/about/about.component.html - 47,50 + 31,33 about.sponsors.enterprise.withRocket @@ -1286,7 +1286,7 @@ Community Sponsors ❤️ src/app/components/about/about.component.html - 73,76 + 49,52 about.sponsors.withHeart @@ -1294,7 +1294,7 @@ Become a sponsor ❤️ src/app/components/about/about.component.html - 86,87 + 61,62 about.become-a-sponsor @@ -1302,11 +1302,11 @@ Navigate to https://mempool.space/sponsor to sponsor src/app/components/about/about.component.html - 87 + 62 src/app/components/sponsor/sponsor.component.html - 9 + 6 about.navigate-to-sponsor @@ -1314,7 +1314,7 @@ Community Integrations src/app/components/about/about.component.html - 92,95 + 66,69 about.integrations @@ -1322,7 +1322,7 @@ Community Alliances src/app/components/about/about.component.html - 202,205 + 133,135 about.alliances @@ -1330,7 +1330,7 @@ Project Contributors src/app/components/about/about.component.html - 220,222 + 148,150 about.contributors @@ -1338,7 +1338,7 @@ Project Maintainers src/app/components/about/about.component.html - 236,239 + 162,164 about.maintainers @@ -1453,6 +1453,329 @@ API Docs tab for Addresses api-docs.tab.addresses + + Endpoint + + src/app/components/api-docs/api-docs.component.html + 20,21 + + + src/app/components/api-docs/api-docs.component.html + 39,40 + + + src/app/components/api-docs/api-docs.component.html + 56,57 + + + src/app/components/api-docs/api-docs.component.html + 74,75 + + + src/app/components/api-docs/api-docs.component.html + 94,95 + + + src/app/components/api-docs/api-docs.component.html + 120,121 + + + src/app/components/api-docs/api-docs.component.html + 157,158 + + + src/app/components/api-docs/api-docs.component.html + 182,183 + + + src/app/components/api-docs/api-docs.component.html + 199,200 + + + src/app/components/api-docs/api-docs.component.html + 234,235 + + + src/app/components/api-docs/api-docs.component.html + 253,254 + + + src/app/components/api-docs/api-docs.component.html + 273,274 + + + src/app/components/api-docs/api-docs.component.html + 292,293 + + + src/app/components/api-docs/api-docs.component.html + 313,314 + + + src/app/components/api-docs/api-docs.component.html + 332,333 + + + src/app/components/api-docs/api-docs.component.html + 351,352 + + + src/app/components/api-docs/api-docs.component.html + 379,380 + + + src/app/components/api-docs/api-docs.component.html + 399,400 + + + src/app/components/api-docs/api-docs.component.html + 419,420 + + + src/app/components/api-docs/api-docs.component.html + 438,439 + + + src/app/components/api-docs/api-docs.component.html + 459,460 + + + src/app/components/api-docs/api-docs.component.html + 479,480 + + + src/app/components/api-docs/api-docs.component.html + 500,501 + + + src/app/components/api-docs/api-docs.component.html + 526,527 + + + src/app/components/api-docs/api-docs.component.html + 542,543 + + + src/app/components/api-docs/api-docs.component.html + 558,559 + + + src/app/components/api-docs/api-docs.component.html + 582,583 + + + src/app/components/api-docs/api-docs.component.html + 599,600 + + + src/app/components/api-docs/api-docs.component.html + 617,618 + + + src/app/components/api-docs/api-docs.component.html + 661,662 + + + src/app/components/api-docs/api-docs.component.html + 679,680 + + + src/app/components/api-docs/api-docs.component.html + 698,699 + + + src/app/components/api-docs/api-docs.component.html + 718,719 + + + src/app/components/api-docs/api-docs.component.html + 737,738 + + + src/app/components/api-docs/api-docs.component.html + 756,757 + + + src/app/components/api-docs/api-docs.component.html + 775,776 + + + src/app/components/api-docs/api-docs.component.html + 794,795 + + + src/app/components/api-docs/api-docs.component.html + 814,815 + + Api docs endpoint + + + Description + + src/app/components/api-docs/api-docs.component.html + 25,26 + + + src/app/components/api-docs/api-docs.component.html + 43,44 + + + src/app/components/api-docs/api-docs.component.html + 60,61 + + + src/app/components/api-docs/api-docs.component.html + 79,80 + + + src/app/components/api-docs/api-docs.component.html + 99,100 + + + src/app/components/api-docs/api-docs.component.html + 124,125 + + + src/app/components/api-docs/api-docs.component.html + 142,143 + + + src/app/components/api-docs/api-docs.component.html + 161,162 + + + src/app/components/api-docs/api-docs.component.html + 186,187 + + + src/app/components/api-docs/api-docs.component.html + 203,204 + + + src/app/components/api-docs/api-docs.component.html + 219,220 + + + src/app/components/api-docs/api-docs.component.html + 238,239 + + + src/app/components/api-docs/api-docs.component.html + 258,259 + + + src/app/components/api-docs/api-docs.component.html + 277,278 + + + src/app/components/api-docs/api-docs.component.html + 297,298 + + + src/app/components/api-docs/api-docs.component.html + 317,318 + + + src/app/components/api-docs/api-docs.component.html + 336,337 + + + src/app/components/api-docs/api-docs.component.html + 356,357 + + + src/app/components/api-docs/api-docs.component.html + 384,385 + + + src/app/components/api-docs/api-docs.component.html + 404,405 + + + src/app/components/api-docs/api-docs.component.html + 423,424 + + + src/app/components/api-docs/api-docs.component.html + 443,444 + + + src/app/components/api-docs/api-docs.component.html + 464,465 + + + src/app/components/api-docs/api-docs.component.html + 484,485 + + + src/app/components/api-docs/api-docs.component.html + 505,506 + + + src/app/components/api-docs/api-docs.component.html + 530,531 + + + src/app/components/api-docs/api-docs.component.html + 546,547 + + + src/app/components/api-docs/api-docs.component.html + 562,563 + + + src/app/components/api-docs/api-docs.component.html + 587,588 + + + src/app/components/api-docs/api-docs.component.html + 603,604 + + + src/app/components/api-docs/api-docs.component.html + 621,622 + + + src/app/components/api-docs/api-docs.component.html + 646,647 + + + src/app/components/api-docs/api-docs.component.html + 665,666 + + + src/app/components/api-docs/api-docs.component.html + 683,684 + + + src/app/components/api-docs/api-docs.component.html + 703,704 + + + src/app/components/api-docs/api-docs.component.html + 722,723 + + + src/app/components/api-docs/api-docs.component.html + 741,742 + + + src/app/components/api-docs/api-docs.component.html + 760,761 + + + src/app/components/api-docs/api-docs.component.html + 779,780 + + + src/app/components/api-docs/api-docs.component.html + 799,800 + + + src/app/components/api-docs/api-docs.component.html + 818,819 + + Returns details about an address. Available fields: address, chain_stats, and mempool_stats. chain,mempool_stats each contain an object with tx_count, funded_txo_count, funded_txo_sum, spent_txo_count, and spent_txo_sum. @@ -1835,6 +2158,14 @@ 59,61 + + Install Package + + src/app/components/api-docs/code-template.component.html + 6,7 + + API Docs install lib + Asset @@ -2538,7 +2869,7 @@ Sponsor src/app/components/sponsor/sponsor.component.html - 4 + 3 src/app/components/sponsor/sponsor.component.ts @@ -2550,7 +2881,7 @@ Request invoice src/app/components/sponsor/sponsor.component.html - 54 + 49 about.sponsor.request-invoice @@ -2558,7 +2889,7 @@ Waiting for transaction... src/app/components/sponsor/sponsor.component.html - 137 + 138 about.sponsor.waiting-for-transaction @@ -2566,7 +2897,7 @@ Donation confirmed! src/app/components/sponsor/sponsor.component.html - 142 + 144 about.sponsor.donation-confirmed @@ -2574,7 +2905,7 @@ Thank you! src/app/components/sponsor/sponsor.component.html - 142 + 145 about.sponsor.thank-you