Merge pull request #2006 from mempool/simon/block-predictions-i18n-string

Merging the 3 "block predictions" i18n string into 1
This commit is contained in:
wiz 2022-07-07 15:06:40 +02:00 committed by GitHub
commit 0417d3b70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 44 deletions

View File

@ -2,41 +2,41 @@
<div class="full-container"> <div class="full-container">
<div class="card-header mb-0 mb-md-4"> <div class="card-header mb-0 mb-md-4">
<span i18n="mining.block-prediction-accuracy">Block Predictions Accuracy</span> <span i18n="mining.block-prediction-accuracy">Block Prediction Accuracy</span>
<button class="btn" style="margin: 0 0 4px 0px" (click)="onSaveChart()"> <button class="btn" style="margin: 0 0 4px 0px" (click)="onSaveChart()">
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon> <fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
</button> </button>
<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats"> <form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan"> <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan">
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 144"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 144">
<input ngbButton type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 24h <input ngbButton type="radio" [value]="'24h'" fragment="24h" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 24h
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 432"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 432">
<input ngbButton type="radio" [value]="'3d'" fragment="3d" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 3D <input ngbButton type="radio" [value]="'3d'" fragment="3d" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 3D
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 1008"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 1008">
<input ngbButton type="radio" [value]="'1w'" fragment="1w" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 1W <input ngbButton type="radio" [value]="'1w'" fragment="1w" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 1W
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 4320"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 4320">
<input ngbButton type="radio" [value]="'1m'" fragment="1m" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 1M <input ngbButton type="radio" [value]="'1m'" fragment="1m" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 1M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 12960"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 12960">
<input ngbButton type="radio" [value]="'3m'" fragment="3m" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 3M <input ngbButton type="radio" [value]="'3m'" fragment="3m" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 3M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 25920"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 25920">
<input ngbButton type="radio" [value]="'6m'" fragment="6m" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 6M <input ngbButton type="radio" [value]="'6m'" fragment="6m" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 6M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 52560"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 52560">
<input ngbButton type="radio" [value]="'1y'" fragment="1y" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 1Y <input ngbButton type="radio" [value]="'1y'" fragment="1y" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 1Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 105120"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 105120">
<input ngbButton type="radio" [value]="'2y'" fragment="2y" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 2Y <input ngbButton type="radio" [value]="'2y'" fragment="2y" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 2Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 157680"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 157680">
<input ngbButton type="radio" [value]="'3y'" fragment="3y" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> 3Y <input ngbButton type="radio" [value]="'3y'" fragment="3y" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> 3Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount > 157680"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount > 157680">
<input ngbButton type="radio" [value]="'all'" fragment="all" [routerLink]="['/graphs/mining/block-predictions' | relativeUrl]"> ALL <input ngbButton type="radio" [value]="'all'" fragment="all" [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]"> ALL
</label> </label>
</div> </div>
</form> </form>

View File

@ -13,9 +13,9 @@ import { RelativeUrlPipe } from 'src/app/shared/pipes/relative-url/relative-url.
import { StateService } from 'src/app/services/state.service'; import { StateService } from 'src/app/services/state.service';
@Component({ @Component({
selector: 'app-block-predictions-graph', selector: 'app-block-prediction-graph',
templateUrl: './block-predictions-graph.component.html', templateUrl: './block-prediction-graph.component.html',
styleUrls: ['./block-predictions-graph.component.scss'], styleUrls: ['./block-prediction-graph.component.scss'],
styles: [` styles: [`
.loadingGraphs { .loadingGraphs {
position: absolute; position: absolute;
@ -26,7 +26,7 @@ import { StateService } from 'src/app/services/state.service';
`], `],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class BlockPredictionsGraphComponent implements OnInit { export class BlockPredictionGraphComponent implements OnInit {
@Input() right: number | string = 45; @Input() right: number | string = 45;
@Input() left: number | string = 75; @Input() left: number | string = 75;
@ -60,7 +60,7 @@ export class BlockPredictionsGraphComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.seoService.setTitle($localize`Block predictions accuracy`); this.seoService.setTitle($localize`:@@d7d5fcf50179ad70c938491c517efb82de2c8146:Block Prediction Accuracy`);
this.miningWindowPreference = '24h';//this.miningService.getDefaultTimespan('24h'); this.miningWindowPreference = '24h';//this.miningService.getDefaultTimespan('24h');
this.radioGroupForm = this.formBuilder.group({ dateSpan: this.miningWindowPreference }); this.radioGroupForm = this.formBuilder.group({ dateSpan: this.miningWindowPreference });
this.radioGroupForm.controls.dateSpan.setValue(this.miningWindowPreference); this.radioGroupForm.controls.dateSpan.setValue(this.miningWindowPreference);

View File

@ -19,7 +19,7 @@
<a class="dropdown-item" routerLinkActive="active" <a class="dropdown-item" routerLinkActive="active"
[routerLink]="['/graphs/mining/block-sizes-weights' | relativeUrl]" i18n="mining.block-sizes-weights">Block Sizes and Weights</a> [routerLink]="['/graphs/mining/block-sizes-weights' | relativeUrl]" i18n="mining.block-sizes-weights">Block Sizes and Weights</a>
<a class="dropdown-item" routerLinkActive="active" <a class="dropdown-item" routerLinkActive="active"
[routerLink]="['/graphs/mining/block-predictions' | relativeUrl]" i18n="mining.block-prediction-accuracy">Blocks Predictions Accuracy</a> [routerLink]="['/graphs/mining/block-prediction' | relativeUrl]" i18n="mining.block-prediction-accuracy">Block Prediction Accuracy</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -22,7 +22,7 @@ import { DashboardComponent } from '../dashboard/dashboard.component';
import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component'; import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component';
import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component'; import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component';
import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component'; import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component';
import { BlockPredictionsGraphComponent } from '../components/block-predictions-graph/block-predictions-graph.component'; import { BlockPredictionGraphComponent } from '../components/block-prediction-graph/block-prediction-graph.component';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
@NgModule({ @NgModule({
@ -48,7 +48,7 @@ import { CommonModule } from '@angular/common';
LbtcPegsGraphComponent, LbtcPegsGraphComponent,
HashrateChartComponent, HashrateChartComponent,
HashrateChartPoolsComponent, HashrateChartPoolsComponent,
BlockPredictionsGraphComponent, BlockPredictionGraphComponent,
], ],
imports: [ imports: [
CommonModule, CommonModule,

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { BlockPredictionsGraphComponent } from '../components/block-predictions-graph/block-predictions-graph.component'; import { BlockPredictionGraphComponent } from '../components/block-prediction-graph/block-prediction-graph.component';
import { BlockFeeRatesGraphComponent } from '../components/block-fee-rates-graph/block-fee-rates-graph.component'; import { BlockFeeRatesGraphComponent } from '../components/block-fee-rates-graph/block-fee-rates-graph.component';
import { BlockFeesGraphComponent } from '../components/block-fees-graph/block-fees-graph.component'; import { BlockFeesGraphComponent } from '../components/block-fees-graph/block-fees-graph.component';
import { BlockRewardsGraphComponent } from '../components/block-rewards-graph/block-rewards-graph.component'; import { BlockRewardsGraphComponent } from '../components/block-rewards-graph/block-rewards-graph.component';
@ -94,8 +94,8 @@ const routes: Routes = [
redirectTo: 'mempool', redirectTo: 'mempool',
}, },
{ {
path: 'mining/block-predictions', path: 'mining/block-prediction',
component: BlockPredictionsGraphComponent, component: BlockPredictionGraphComponent,
}, },
] ]
}, },

View File

@ -1848,7 +1848,7 @@
<context context-type="linenumber">137</context> <context context-type="linenumber">137</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-predictions-graph/block-predictions-graph.component.ts</context> <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.ts</context>
<context context-type="linenumber">128</context> <context context-type="linenumber">128</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
@ -1871,7 +1871,7 @@
<context context-type="linenumber">139</context> <context context-type="linenumber">139</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-predictions-graph/block-predictions-graph.component.ts</context> <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.ts</context>
<context context-type="linenumber">130</context> <context context-type="linenumber">130</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
@ -1990,11 +1990,11 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blockchain-blocks/blockchain-blocks.component.html</context> <context context-type="sourcefile">src/app/components/blockchain-blocks/blockchain-blocks.component.html</context>
<context context-type="linenumber">11,14</context> <context context-type="linenumber">11,13</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blockchain-blocks/blockchain-blocks.component.html</context> <context context-type="sourcefile">src/app/components/blockchain-blocks/blockchain-blocks.component.html</context>
<context context-type="linenumber">14,17</context> <context context-type="linenumber">14,16</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/fees-box/fees-box.component.html</context> <context context-type="sourcefile">src/app/components/fees-box/fees-box.component.html</context>
@ -2022,7 +2022,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/mempool-blocks/mempool-blocks.component.html</context> <context context-type="sourcefile">src/app/components/mempool-blocks/mempool-blocks.component.html</context>
<context context-type="linenumber">10,13</context> <context context-type="linenumber">10,12</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/mempool-blocks/mempool-blocks.component.html</context> <context context-type="sourcefile">src/app/components/mempool-blocks/mempool-blocks.component.html</context>
@ -2076,25 +2076,26 @@
<note priority="1" from="description">Transaction Virtual Size</note> <note priority="1" from="description">Transaction Virtual Size</note>
<note priority="1" from="meaning">transaction.vsize</note> <note priority="1" from="meaning">transaction.vsize</note>
</trans-unit> </trans-unit>
<trans-unit id="05ef9d4e17049ce55e505637a99653770bf7fff9" datatype="html"> <trans-unit id="d7d5fcf50179ad70c938491c517efb82de2c8146" datatype="html">
<source>Block Predictions Accuracy</source> <source>Block Prediction Accuracy</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-predictions-graph/block-predictions-graph.component.html</context> <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.html</context>
<context context-type="linenumber">5,7</context> <context context-type="linenumber">5,7</context>
</context-group> </context-group>
<note priority="1" from="description">mining.block-prediction-accuracy</note>
</trans-unit>
<trans-unit id="53140114748953624" datatype="html">
<source>Block predictions accuracy</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-predictions-graph/block-predictions-graph.component.ts</context> <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.ts</context>
<context context-type="linenumber">63</context> <context context-type="linenumber">63</context>
</context-group> </context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/graphs/graphs.component.html</context>
<context context-type="linenumber">22</context>
</context-group>
<note priority="1" from="description">mining.block-prediction-accuracy</note>
</trans-unit> </trans-unit>
<trans-unit id="829186404427796443" datatype="html"> <trans-unit id="829186404427796443" datatype="html">
<source>Match rate</source> <source>Match rate</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block-predictions-graph/block-predictions-graph.component.ts</context> <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.ts</context>
<context context-type="linenumber">176,174</context> <context context-type="linenumber">176,174</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
@ -2840,14 +2841,6 @@
</context-group> </context-group>
<note priority="1" from="description">mining.hashrate-difficulty</note> <note priority="1" from="description">mining.hashrate-difficulty</note>
</trans-unit> </trans-unit>
<trans-unit id="356f45911e55996d64963b33199d3aa115ea203a" datatype="html">
<source>Blocks Predictions Accuracy</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/graphs/graphs.component.html</context>
<context context-type="linenumber">22</context>
</context-group>
<note priority="1" from="description">mining.block-prediction-accuracy</note>
</trans-unit>
<trans-unit id="79a9dc5b1caca3cbeb1733a19515edacc5fc7920" datatype="html"> <trans-unit id="79a9dc5b1caca3cbeb1733a19515edacc5fc7920" datatype="html">
<source>Hashrate</source> <source>Hashrate</source>
<context-group purpose="location"> <context-group purpose="location">