i18n all the remaining strings.

This commit is contained in:
softsimon
2020-12-03 18:34:19 +07:00
parent 80552fcd78
commit 4d097ea92a
39 changed files with 776 additions and 424 deletions

View File

@@ -36,7 +36,7 @@ export class BisqAddressComponent implements OnInit, OnDestroy {
this.transactions = null;
document.body.scrollTo(0, 0);
this.addressString = params.get('id') || '';
this.seoService.setTitle('Address: ' + this.addressString);
this.seoService.setTitle($localize`:@@729754dd19eb9ce0670b0aeb5a6ae60574c2c563:Address` + ': ' + this.addressString);
return this.bisqApiService.getAddress$(this.addressString)
.pipe(

View File

@@ -82,7 +82,7 @@ export class BisqBlockComponent implements OnInit, OnDestroy {
}
this.isLoading = false;
this.blockHeight = block.height;
this.seoService.setTitle('Block: #' + block.height + ': ' + block.hash);
this.seoService.setTitle($localize`:@@729754dd19eb9ce0670b0aeb5a6ae60574c2c563:Block` + ': #' + block.height + ': ' + block.hash);
this.block = block;
});
}

View File

@@ -1,5 +1,5 @@
<div class="container-xl">
<h1 style="float: left;">Blocks</h1>
<h1 style="float: left;" i18n>Blocks</h1>
<br>
<div class="clearfix"></div>
@@ -9,15 +9,15 @@
<div class="table-responsive-sm">
<table class="table table-borderless table-striped">
<thead>
<th style="width: 25%;">Height</th>
<th style="width: 25%;">Confirmed</th>
<th style="width: 25%;">Total Sent</th>
<th class="d-none d-md-block" style="width: 25%;">Transactions</th>
<th style="width: 25%;" i18n>Height</th>
<th style="width: 25%;" i18n>Confirmed</th>
<th style="width: 25%;" i18n>Total sent</th>
<th class="d-none d-md-block" style="width: 25%;" i18n>Transactions</th>
</thead>
<tbody *ngIf="blocks.value; else loadingTmpl">
<tr *ngFor="let block of blocks.value[0]; trackBy: trackByFn">
<td><a [routerLink]="['/block/' | relativeUrl, block.hash]" [state]="{ data: { block: block } }">{{ block.height }}</a></td>
<td><app-time-since [time]="block.time / 1000" [fastRender]="true"></app-time-since> ago</td>
<td><app-time-since [time]="block.time / 1000" [fastRender]="true"></app-time-since></td>
<td>{{ calculateTotalOutput(block) / 100 | number: '1.2-2' }}<span class="d-none d-md-inline"> BSQ</span></td>
<td class="d-none d-md-block">{{ block.txs.length }}</td>
</tr>

View File

@@ -32,7 +32,7 @@ export class BisqBlocksComponent implements OnInit {
) { }
ngOnInit(): void {
this.seoService.setTitle('Blocks');
this.seoService.setTitle($localize`:@@8a7b4bd44c0ac71b2e72de0398b303257f7d2f54:Blocks`);
this.itemsPerPage = Math.max(Math.round(this.contentSpace / this.fiveItemsPxSize) * 5, 10);
this.loadingItems = Array(this.itemsPerPage);
if (document.body.clientWidth < 768) {

View File

@@ -1,5 +1,5 @@
<div class="container-xl">
<h1 style="float: left;">BSQ Statistics</h1>
<h1 style="float: left;" i18n>BSQ statistics</h1>
<br>
<div class="clearfix"></div>
@@ -7,41 +7,37 @@
<div class="row">
<div class="col-sm">
<table class="table table-borderless table-striped">
<thead>
<th>Property</th>
<th>Value</th>
</thead>
<tbody *ngIf="!isLoading; else loadingTemplate">
<tr>
<td class="td-width">Existing amount</td>
<td class="td-width" i18n>Existing amount</td>
<td>{{ (stats.minted - stats.burnt) / 100 | number: '1.2-2' }} BSQ</td>
</tr>
<tr>
<td>Minted amount</td>
<td i18n>Minted amount</td>
<td>{{ stats.minted | number: '1.2-2' }} BSQ</td>
</tr>
<tr>
<td>Burnt amount</td>
<td i18n>Burnt amount</td>
<td>{{ stats.burnt | number: '1.2-2' }} BSQ</td>
</tr>
<tr>
<td>Addresses</td>
<td i18n>Addresses</td>
<td>{{ stats.addresses | number }}</td>
</tr>
<tr>
<td>Unspent TXOs</td>
<td i18n>Unspent TXOs</td>
<td>{{ stats.unspent_txos | number }}</td>
</tr>
<tr>
<td>Spent TXOs</td>
<td i18n>Spent TXOs</td>
<td>{{ stats.spent_txos | number }}</td>
</tr>
<tr>
<td>Price</td>
<td i18n>Price</td>
<td><app-fiat [value]="price"></app-fiat></td>
</tr>
<tr>
<td>Market cap</td>
<td i18n>Market cap</td>
<td><app-fiat [value]="price * (stats.minted - stats.burnt) / 100"></app-fiat></td>
</tr>
</tbody>
@@ -55,23 +51,23 @@
<ng-template #loadingTemplate>
<tbody>
<tr>
<td class="td-width">Existing amount</td>
<td class="td-width" i18n>Existing amount</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Minted amount</td>
<td i18n>Minted amount</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Burnt amount</td>
<td i18n>Burnt amount</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Addresses</td>
<td i18n>Addresses</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Unspent TXOs</td>
<td i18n>Unspent TXOs</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
@@ -79,11 +75,11 @@
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Price</td>
<td i18n>Price</td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td>Market cap</td>
<td i18n>Market cap</td>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>

View File

@@ -21,8 +21,7 @@ export class BisqStatsComponent implements OnInit {
) { }
ngOnInit() {
this.seoService.setTitle('BSQ Statistics');
this.seoService.setTitle($localize`:@@2a30a4cdb123a03facc5ab8c5b3e6d8b8dbbc3d4:BSQ statistics`);
this.stateService.bsqPrice$
.subscribe((bsqPrice) => {
this.price = bsqPrice;

View File

@@ -43,7 +43,7 @@ export class BisqTransactionComponent implements OnInit, OnDestroy {
this.error = null;
document.body.scrollTo(0, 0);
this.txId = params.get('id') || '';
this.seoService.setTitle('Transaction: ' + this.txId);
this.seoService.setTitle($localize`:@@b59ea65c89a5ae15b787d8318fdad9edd6fec243:Transaction` + ': ' + this.txId);
if (history.state.data) {
return of(history.state.data);
}

View File

@@ -1,5 +1,5 @@
<div class="container-xl">
<h1 style="float: left;">Transactions</h1>
<h1 style="float: left;" i18n>Transactions</h1>
<div class="d-block float-right">
<form [formGroup]="radioGroupForm">
@@ -15,11 +15,11 @@
<table class="table table-borderless table-striped">
<thead>
<th style="width: 20%;">Transaction</th>
<th class="d-none d-md-block" style="width: 100%;">Type</th>
<th style="width: 20%;">Amount</th>
<th style="width: 20%;">Confirmed</th>
<th class="d-none d-md-block">Height</th>
<th style="width: 20%;" i18n>Transaction</th>
<th class="d-none d-md-block" style="width: 100%;" i18n>Type</th>
<th style="width: 20%;" i18n>Amount</th>
<th style="width: 20%;" i18n>Confirmed</th>
<th class="d-none d-md-block" i18n>Height</th>
</thead>
<tbody *ngIf="transactions.value; else loadingTmpl">
<tr *ngFor="let tx of transactions.value[0]; trackBy: trackByFn">
@@ -37,7 +37,7 @@
{{ calculateTotalOutput(tx.outputs) / 100 | number: '1.2-2' }}<span class="d-none d-md-inline"> BSQ</span>
</ng-template>
</td>
<td><app-time-since [time]="tx.time / 1000" [fastRender]="true"></app-time-since> ago</td>
<td><app-time-since [time]="tx.time / 1000" [fastRender]="true"></app-time-since></td>
<td class="d-none d-md-block"><a [routerLink]="['/block/' | relativeUrl, tx.blockHash]" [state]="{ data: { blockHeight: tx.blockHeight } }">{{ tx.blockHeight }}</a></td>
</tr>
</tbody>

View File

@@ -52,7 +52,9 @@ export class BisqTransactionsComponent implements OnInit {
};
txTypeDropdownTexts: IMultiSelectTexts = {
defaultTitle: 'Filter',
defaultTitle: $localize`:@@bisq-transactions.filter:Filter`,
checkAll: $localize`:@@bisq-transactions.selectall:Select all`,
uncheckAll: $localize`:@@bisq-transactions.unselectall:Unselect all`,
};
// @ts-ignore
@@ -72,7 +74,7 @@ export class BisqTransactionsComponent implements OnInit {
) { }
ngOnInit(): void {
this.seoService.setTitle('Transactions');
this.seoService.setTitle($localize`:@@add4cd82e3e38a3110fe67b3c7df56e9602644ee:Transactions`);
this.radioGroupForm = this.formBuilder.group({
txTypes: [this.txTypesDefaultChecked],