Adding i18n to mempool goggles

This commit is contained in:
softsimon 2024-04-04 17:28:32 +09:00
parent 3a8c46bbed
commit 5104da500e
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
4 changed files with 165 additions and 44 deletions

View File

@ -16,24 +16,24 @@
<div class="filter-menu" *ngIf="menuOpen && cssWidth > 280">
<div class="filter-row">
<div class="filter-element">
<h5>Match</h5>
<h5 i18n="mempool-goggles.match">Match</h5>
<div class="btn-group btn-group-toggle">
<label class="btn btn-xs blue mode-toggle" [class.active]="filterMode === 'and'">
<input type="radio" [value]="'all'" fragment="all" (click)="setFilterMode('and')">All
<input type="radio" [value]="'all'" fragment="all" (click)="setFilterMode('and')"><ng-container i18n>All</ng-container>
</label>
<label class="btn btn-xs green mode-toggle" [class.active]="filterMode === 'or'">
<input type="radio" [value]="'any'" fragment="any" (click)="setFilterMode('or')">Any
<input type="radio" [value]="'any'" fragment="any" (click)="setFilterMode('or')"><ng-container i18n="mempool-goggles.any">Any</ng-container>
</label>
</div>
</div>
<div class="filter-element">
<h5>Gradient</h5>
<h5 i18n="mempool-goggles.gradient">Gradient</h5>
<div class="btn-group btn-group-toggle">
<label class="btn btn-xs yellow mode-toggle" [class.active]="gradientMode === 'fee'">
<input type="radio" [value]="'fee'" fragment="default" (click)="setGradientMode('fee')">Default
<input type="radio" [value]="'fee'" fragment="default" (click)="setGradientMode('fee')"><ng-container i18n="mempool-goggles.default">Default</ng-container>
</label>
<label class="btn btn-xs blue mode-toggle" [class.active]="gradientMode === 'age'">
<input type="radio" [value]="'age'" fragment="age" (click)="setGradientMode('age')">Age
<input type="radio" [value]="'age'" fragment="age" (click)="setGradientMode('age')"><ng-container i18n="mempool-goggles.age">Age</ng-container>
</label>
</div>
</div>

View File

@ -75,10 +75,10 @@ export class DashboardComponent implements OnInit, OnDestroy, AfterViewInit {
goggleResolution = 82;
goggleCycle: { index: number, name: string, mode: FilterMode, filters: string[], gradient: GradientMode }[] = [
{ index: 0, name: 'All', mode: 'and', filters: [], gradient: 'fee' },
{ index: 1, name: 'Consolidation', mode: 'and', filters: ['consolidation'], gradient: 'fee' },
{ index: 2, name: 'Coinjoin', mode: 'and', filters: ['coinjoin'], gradient: 'fee' },
{ index: 3, name: 'Data', mode: 'or', filters: ['inscription', 'fake_pubkey', 'op_return'], gradient: 'fee' },
{ index: 0, name: $localize`:@@dfc3c34e182ea73c5d784ff7c8135f087992dac1:All`, mode: 'and', filters: [], gradient: 'fee' },
{ index: 1, name: $localize`Consolidation`, mode: 'and', filters: ['consolidation'], gradient: 'fee' },
{ index: 2, name: $localize`Coinjoin`, mode: 'and', filters: ['coinjoin'], gradient: 'fee' },
{ index: 3, name: $localize`Data`, mode: 'or', filters: ['inscription', 'fake_pubkey', 'op_return'], gradient: 'fee' },
];
goggleFlags = 0n;
goggleMode: FilterMode = 'and';

View File

@ -96,15 +96,15 @@ export const TransactionFilters: { [key: string]: Filter } = {
cpfp_parent: { key: 'cpfp_parent', label: 'Paid for by child', flag: TransactionFlags.cpfp_parent, important: true, tooltip: true, txPage: false, },
cpfp_child: { key: 'cpfp_child', label: 'Pays for parent', flag: TransactionFlags.cpfp_child, important: true, tooltip: true, txPage: false, },
replacement: { key: 'replacement', label: 'Replacement', flag: TransactionFlags.replacement, important: true, tooltip: true, txPage: false, },
acceleration: window?.['__env']?.ACCELERATOR ? { key: 'acceleration', label: 'Accelerated', flag: TransactionFlags.acceleration, important: false } : undefined,
acceleration: window?.['__env']?.ACCELERATOR ? { key: 'acceleration', label: $localize`:@@b484583f0ce10f3341ab36750d05271d9d22c9a1:Accelerated`, flag: TransactionFlags.acceleration, important: false } : undefined,
/* data */
op_return: { key: 'op_return', label: 'OP_RETURN', flag: TransactionFlags.op_return, important: true, tooltip: true, txPage: true, },
fake_pubkey: { key: 'fake_pubkey', label: 'Fake pubkey', flag: TransactionFlags.fake_pubkey, tooltip: true, txPage: true, },
inscription: { key: 'inscription', label: 'Inscription', flag: TransactionFlags.inscription, important: true, tooltip: true, txPage: true, },
fake_scripthash: { key: 'fake_scripthash', label: 'Fake scripthash', flag: TransactionFlags.fake_scripthash, tooltip: true, txPage: true,},
/* heuristics */
coinjoin: { key: 'coinjoin', label: 'Coinjoin', flag: TransactionFlags.coinjoin, important: true, tooltip: true, txPage: true, },
consolidation: { key: 'consolidation', label: 'Consolidation', flag: TransactionFlags.consolidation, tooltip: true, txPage: true, },
coinjoin: { key: 'coinjoin', label: $localize`Coinjoin`, flag: TransactionFlags.coinjoin, important: true, tooltip: true, txPage: true, },
consolidation: { key: 'consolidation', label: $localize`Consolidation`, flag: TransactionFlags.consolidation, tooltip: true, txPage: true, },
batch_payout: { key: 'batch_payout', label: 'Batch payment', flag: TransactionFlags.batch_payout, tooltip: true, txPage: true, },
/* sighash */
sighash_all: { key: 'sighash_all', label: 'sighash_all', flag: TransactionFlags.sighash_all },
@ -115,10 +115,10 @@ export const TransactionFilters: { [key: string]: Filter } = {
};
export const FilterGroups: { label: string, filters: Filter[]}[] = [
{ label: 'Features', filters: ['rbf', 'no_rbf', 'v1', 'v2', 'v3', 'nonstandard'] },
{ label: 'Address Types', filters: ['p2pk', 'p2ms', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh', 'p2tr'] },
{ label: 'Behavior', filters: ['cpfp_parent', 'cpfp_child', 'replacement', 'acceleration'] },
{ label: 'Data', filters: ['op_return', 'fake_pubkey', 'fake_scripthash', 'inscription'] },
{ label: 'Heuristics', filters: ['coinjoin', 'consolidation', 'batch_payout'] },
{ label: 'Sighash Flags', filters: ['sighash_all', 'sighash_none', 'sighash_single', 'sighash_default', 'sighash_acp'] },
{ label: $localize`:@@885666551418fd59011ceb09d5c481095940193b:Features`, filters: ['rbf', 'no_rbf', 'v1', 'v2', 'v3', 'nonstandard'] },
{ label: $localize`Address Types`, filters: ['p2pk', 'p2ms', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh', 'p2tr'] },
{ label: $localize`Behavior`, filters: ['cpfp_parent', 'cpfp_child', 'replacement', 'acceleration'] },
{ label: $localize`Data`, filters: ['op_return', 'fake_pubkey', 'fake_scripthash', 'inscription'] },
{ label: $localize`Heuristics`, filters: ['coinjoin', 'consolidation', 'batch_payout'] },
{ label: $localize`Sighash Flags`, filters: ['sighash_all', 'sighash_none', 'sighash_single', 'sighash_default', 'sighash_acp'] },
].map(group => ({ label: group.label, filters: group.filters.map(filter => TransactionFilters[filter] || null).filter(f => f != null) }));

View File

@ -359,7 +359,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">77</context>
<context context-type="linenumber">96</context>
</context-group>
</trans-unit>
<trans-unit id="meta.description.about" datatype="html">
@ -888,7 +888,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="3590f5c3ef2810f637316edb8aaa86b8e907f152" datatype="html">
@ -1386,6 +1386,10 @@
<context context-type="sourcefile">src/app/components/assets/assets-nav/assets-nav.component.html</context>
<context context-type="linenumber">13</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">22</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
<context context-type="linenumber">72</context>
@ -1414,6 +1418,10 @@
<context context-type="sourcefile">src/app/components/statistics/statistics.component.html</context>
<context context-type="linenumber">60</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">78</context>
</context-group>
</trans-unit>
<trans-unit id="aef0d676b15fdae8cb70fc3b089cce7399fde9da" datatype="html">
<source>Search asset</source>
@ -1599,10 +1607,54 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">57</context>
<context context-type="linenumber">76</context>
</context-group>
<note priority="1" from="description">beta</note>
</trans-unit>
<trans-unit id="180092a6b8a6151a05f4a7552a2fb75fd159dfa8" datatype="html">
<source>Match</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">19</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-overview-tooltip/block-overview-tooltip.component.html</context>
<context context-type="linenumber">70</context>
</context-group>
<note priority="1" from="description">mempool-goggles.match</note>
</trans-unit>
<trans-unit id="16d449549ab7bc61caf3d636372a4a56b5870383" datatype="html">
<source>Any</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">25</context>
</context-group>
<note priority="1" from="description">mempool-goggles.any</note>
</trans-unit>
<trans-unit id="f6314b04b5349b89ea90a88eca7abd4a8e1129c0" datatype="html">
<source>Gradient</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">30</context>
</context-group>
<note priority="1" from="description">mempool-goggles.gradient</note>
</trans-unit>
<trans-unit id="ff7cee38a2259526c519f878e71b964f41db4348" datatype="html">
<source>Default</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">33</context>
</context-group>
<note priority="1" from="description">mempool-goggles.default</note>
</trans-unit>
<trans-unit id="2e6be334a2152f179a557167f98ce4459ff9a2f9" datatype="html">
<source>Age</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-filters/block-filters.component.html</context>
<context context-type="linenumber">36</context>
</context-group>
<note priority="1" from="description">mempool-goggles.age</note>
</trans-unit>
<trans-unit id="b1fa5b210c9670d49a6506f046d4a0c2797fd402" datatype="html">
<source>Block Health</source>
<context-group purpose="location">
@ -1931,14 +1983,6 @@
</context-group>
<note priority="1" from="description">transaction.audit-status</note>
</trans-unit>
<trans-unit id="180092a6b8a6151a05f4a7552a2fb75fd159dfa8" datatype="html">
<source>Match</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-overview-tooltip/block-overview-tooltip.component.html</context>
<context context-type="linenumber">70</context>
</context-group>
<note priority="1" from="description">transaction.audit.match</note>
</trans-unit>
<trans-unit id="58fbcd58e305ab289b99fad67d223f3e83ddb755" datatype="html">
<source>Removed</source>
<context-group purpose="location">
@ -2041,6 +2085,10 @@
<context context-type="sourcefile">src/app/components/transaction/transaction.component.html</context>
<context context-type="linenumber">583</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">99</context>
</context-group>
<note priority="1" from="description">transaction.audit.accelerated</note>
</trans-unit>
<trans-unit id="8ba8fe810458280a83df7fdf4c614dfc1a826445" datatype="html">
@ -2765,7 +2813,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">68</context>
<context context-type="linenumber">87</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
@ -3528,11 +3576,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.ts</context>
<context context-type="linenumber">212</context>
<context context-type="linenumber">213</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.ts</context>
<context context-type="linenumber">266</context>
<context context-type="linenumber">267</context>
</context-group>
<note priority="1" from="description">mining.hashrate</note>
</trans-unit>
@ -3602,7 +3650,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">28</context>
<context context-type="linenumber">30</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">47</context>
</context-group>
<note priority="1" from="description">master-page.offline</note>
</trans-unit>
@ -3614,7 +3666,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">29</context>
<context context-type="linenumber">31</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">48</context>
</context-group>
<note priority="1" from="description">master-page.reconnecting</note>
</trans-unit>
@ -3626,7 +3682,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">42</context>
<context context-type="linenumber">61</context>
</context-group>
<note priority="1" from="description">master-page.layer2-networks-header</note>
</trans-unit>
@ -3638,7 +3694,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">52</context>
<context context-type="linenumber">71</context>
</context-group>
<note priority="1" from="description">master-page.dashboard</note>
</trans-unit>
@ -3650,7 +3706,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">71</context>
<context context-type="linenumber">90</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/statistics/statistics.component.ts</context>
@ -3666,7 +3722,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">74</context>
<context context-type="linenumber">93</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/docs/docs/docs.component.html</context>
@ -4017,7 +4073,7 @@
<source>Mining Dashboard</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">61</context>
<context context-type="linenumber">80</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/mining-dashboard/mining-dashboard.component.ts</context>
@ -4033,7 +4089,7 @@
<source>Lightning Explorer</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/master-page/master-page.component.html</context>
<context context-type="linenumber">64</context>
<context context-type="linenumber">83</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts</context>
@ -4557,18 +4613,18 @@
<source>Not enough data yet</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.ts</context>
<context context-type="linenumber">143</context>
<context context-type="linenumber">144</context>
</context-group>
</trans-unit>
<trans-unit id="8831611540421575858" datatype="html">
<source>Pool Dominance</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.ts</context>
<context context-type="linenumber">223</context>
<context context-type="linenumber">224</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.ts</context>
<context context-type="linenumber">277</context>
<context context-type="linenumber">278</context>
</context-group>
<note priority="1" from="description">mining.pool-dominance</note>
</trans-unit>
@ -5282,6 +5338,10 @@
<context context-type="sourcefile">src/app/lightning/node/node.component.html</context>
<context context-type="linenumber">120</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">118</context>
</context-group>
<note priority="1" from="description">Transaction features</note>
<note priority="1" from="meaning">transaction.features</note>
</trans-unit>
@ -6008,6 +6068,39 @@
</context-group>
<note priority="1" from="description">lightning.indexing-in-progress</note>
</trans-unit>
<trans-unit id="4136162380400286378" datatype="html">
<source>Consolidation</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">79</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">107</context>
</context-group>
</trans-unit>
<trans-unit id="7816493330657272952" datatype="html">
<source>Coinjoin</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">80</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">106</context>
</context-group>
</trans-unit>
<trans-unit id="146442697456175258" datatype="html">
<source>Data</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.ts</context>
<context context-type="linenumber">81</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">121</context>
</context-group>
</trans-unit>
<trans-unit id="999bb1a0150c2815a6b4dd64a1850e763603e525" datatype="html">
<source><x id="START_PARAGRAPH" ctype="x-p" equiv-text="For any such requ"/><x id="START_BOLD_TEXT" ctype="x-b" equiv-text="mempool.space mer"/>mempool.space merely provides data about the Bitcoin network.<x id="CLOSE_BOLD_TEXT" ctype="x-b" equiv-text="&lt;/b&gt;"/> It cannot help you with retrieving funds, wallet issues, etc.<x id="CLOSE_PARAGRAPH" ctype="x-p" equiv-text="&lt;/p&gt;"/><x id="START_PARAGRAPH" ctype="x-p" equiv-text="For any such requ"/>For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).<x id="CLOSE_PARAGRAPH" ctype="x-p" equiv-text="&lt;/p&gt;"/></source>
<context-group purpose="location">
@ -7961,6 +8054,34 @@
</context-group>
<note priority="1" from="description">warning-testnet</note>
</trans-unit>
<trans-unit id="3399131819685362332" datatype="html">
<source>Address Types</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">119</context>
</context-group>
</trans-unit>
<trans-unit id="7779249123661446825" datatype="html">
<source>Behavior</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">120</context>
</context-group>
</trans-unit>
<trans-unit id="6290595884142884507" datatype="html">
<source>Heuristics</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">122</context>
</context-group>
</trans-unit>
<trans-unit id="2259944601214794924" datatype="html">
<source>Sighash Flags</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/filters.utils.ts</context>
<context context-type="linenumber">123</context>
</context-group>
</trans-unit>
<trans-unit id="date-base.year" datatype="html">
<source><x id="DATE" equiv-text="counter"/> year</source>
<context-group purpose="location">