adding missing i18n
This commit is contained in:
		
							parent
							
								
									663a09ea97
								
							
						
					
					
						commit
						2fb735c430
					
				| @ -354,7 +354,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="col-md pie d-none d-md-flex" *ngIf="!forceMobile"> |         <div class="col-md pie d-none d-md-flex" *ngIf="!forceMobile"> | ||||||
|           <small class="form-text checkout-text mb-2" *ngIf="(etaInfo$ | async) as etaInfo"><ng-container *ngTemplateOutlet="prioritizedBy; context: {$implicit:etaInfo.hashratePercentage}"></ng-container></small> |           <small class="form-text checkout-text mb-2" *ngIf="(etaInfo$ | async) as etaInfo"><ng-container *ngTemplateOutlet="prioritizedBy; context: {$implicit:etaInfo.hashratePercentage}"></ng-container></small> | ||||||
|           <app-active-acceleration-box [miningStats]="miningStats" [pools]="estimate.pools" [chartOnly]="true"></app-active-acceleration-box> |           <app-active-acceleration-box [miningStats]="miningStats" [pools]="estimate.pools" [chartOnly]="true" class="ml-2"></app-active-acceleration-box> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|       <div class="payment-area mt-2 p-2" style="font-size: 14px;"> |       <div class="payment-area mt-2 p-2" style="font-size: 14px;"> | ||||||
| @ -364,7 +364,7 @@ | |||||||
|         @if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp)) { |         @if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp)) { | ||||||
|           <div class="row"> |           <div class="row"> | ||||||
|             <div class="col-sm text-center d-flex flex-column justify-content-center align-items-center"> |             <div class="col-sm text-center d-flex flex-column justify-content-center align-items-center"> | ||||||
|               <p>Your account will be debited no more than <span><small style="font-family: monospace;">{{ cost | number }}</small> <span class="symbol" i18n="shared.sats">sats</span></span></p> |               <p><ng-container i18n="accelerator.your-account-will-be-debited">Your account will be debited no more than</ng-container> <small style="font-family: monospace;">{{ cost | number }}</small> <span class="symbol" i18n="shared.sats">sats</span></p> | ||||||
|               <div class="d-flex justify-content-center" [class.grayOut]="!canPayWithBalance || quoteError || accelerateError || showSuccess"> |               <div class="d-flex justify-content-center" [class.grayOut]="!canPayWithBalance || quoteError || accelerateError || showSuccess"> | ||||||
|                 <ng-container *ngTemplateOutlet="accountPayButton"></ng-container> |                 <ng-container *ngTemplateOutlet="accountPayButton"></ng-container> | ||||||
|               </div> |               </div> | ||||||
|  | |||||||
| @ -5,3 +5,5 @@ | |||||||
|   <span [class]="alertClass" [innerHTML]="errorContent"> |   <span [class]="alertClass" [innerHTML]="errorContent"> | ||||||
|   </span> |   </span> | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | <ng-template #lowBalance i18n="accelerator.low-balance">Your balance is too low. Please <a style="color:#105fb0" href="/services/accelerator/overview">top up your account</a>.</ng-template> | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| import { Component, Input, OnInit } from "@angular/core"; | import { AfterViewInit, Component, Input, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core'; | ||||||
| import { DomSanitizer, SafeHtml } from "@angular/platform-browser"; | import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | ||||||
| 
 | 
 | ||||||
| export const MempoolErrors = { | export const MempoolErrors = { | ||||||
|   'bad_request': `Your request was not valid. Please try again.`, |   'bad_request': `Your request was not valid. Please try again.`, | ||||||
| @ -16,7 +16,7 @@ export const MempoolErrors = { | |||||||
|   'mempool_rejected_raw_tx': `Our mempool rejected this transaction`, |   'mempool_rejected_raw_tx': `Our mempool rejected this transaction`, | ||||||
|   'no_mining_pool_available': `No mining pool available at the moment`, |   'no_mining_pool_available': `No mining pool available at the moment`, | ||||||
|   'not_available': `You current subscription does not allow you to access this feature.`, |   'not_available': `You current subscription does not allow you to access this feature.`, | ||||||
|   'not_enough_balance': `Your balance is too low. Please <a style="color:#105fb0" href="/services/accelerator/overview">top up your account</a>.`, |   'not_enough_balance': ``, | ||||||
|   'not_verified': `You must verify your account to use this feature.`, |   'not_verified': `You must verify your account to use this feature.`, | ||||||
|   'recommended_fees_not_available': `Recommended fees are not available right now.`, |   'recommended_fees_not_available': `Recommended fees are not available right now.`, | ||||||
|   'too_many_relatives': `This transaction has too many relatives.`, |   'too_many_relatives': `This transaction has too many relatives.`, | ||||||
| @ -42,13 +42,24 @@ export function isMempoolError(error: string) { | |||||||
|   selector: 'app-mempool-error', |   selector: 'app-mempool-error', | ||||||
|   templateUrl: './mempool-error.component.html' |   templateUrl: './mempool-error.component.html' | ||||||
| }) | }) | ||||||
| export class MempoolErrorComponent implements OnInit { | export class MempoolErrorComponent implements OnInit, AfterViewInit { | ||||||
|  |   @ViewChild('lowBalance') lowBalance!: TemplateRef<any>; | ||||||
|   @Input() error: string; |   @Input() error: string; | ||||||
|   @Input() alertClass = 'alert-danger'; |   @Input() alertClass = 'alert-danger'; | ||||||
|   @Input() textOnly = false; |   @Input() textOnly = false; | ||||||
|   errorContent: SafeHtml; |   errorContent: SafeHtml; | ||||||
| 
 | 
 | ||||||
|   constructor(private sanitizer: DomSanitizer) { } |   constructor( | ||||||
|  |     private sanitizer: DomSanitizer, | ||||||
|  |     private viewContainerRef: ViewContainerRef, | ||||||
|  |   ) { } | ||||||
|  | 
 | ||||||
|  |   ngAfterViewInit(): void { | ||||||
|  |     // Special hack for the i18n string with a href link inside
 | ||||||
|  |     const view = this.viewContainerRef.createEmbeddedView(this.lowBalance); | ||||||
|  |     const rawHtml = view.rootNodes.map(node => node.outerHTML).join(''); | ||||||
|  |     MempoolErrors['not_enough_balance'] = rawHtml; | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     if (Object.keys(MempoolErrors).includes(this.error)) { |     if (Object.keys(MempoolErrors).includes(this.error)) { | ||||||
|  | |||||||
| @ -784,6 +784,14 @@ | |||||||
|         </context-group> |         </context-group> | ||||||
|         <note priority="1" from="description">accelerator.payment-to-mempool-space</note> |         <note priority="1" from="description">accelerator.payment-to-mempool-space</note> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|  |       <trans-unit id="9ebf5e1f1759ac5a81805ee901d02d1c14cab033" datatype="html"> | ||||||
|  |         <source>Your account will be debited no more than</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/components/accelerate-checkout/accelerate-checkout.component.html</context> | ||||||
|  |           <context context-type="linenumber">367</context> | ||||||
|  |         </context-group> | ||||||
|  |         <note priority="1" from="description">accelerator.your-account-will-be-debited</note> | ||||||
|  |       </trans-unit> | ||||||
|       <trans-unit id="65fd4251d8ddfe4017d4d83f8cec6f5a80d89289" datatype="html"> |       <trans-unit id="65fd4251d8ddfe4017d4d83f8cec6f5a80d89289" datatype="html"> | ||||||
|         <source>Pay</source> |         <source>Pay</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
| @ -3850,10 +3858,6 @@ | |||||||
|           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> |           <context context-type="sourcefile">src/app/components/custom-dashboard/custom-dashboard.component.html</context> | ||||||
|           <context context-type="linenumber">8</context> |           <context context-type="linenumber">8</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|         <context-group purpose="location"> |  | ||||||
|           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> |  | ||||||
|           <context context-type="linenumber">6</context> |  | ||||||
|         </context-group> |  | ||||||
|         <note priority="1" from="description">fees-box.transaction-fees</note> |         <note priority="1" from="description">fees-box.transaction-fees</note> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="9dfdbeb922d811d7b7b3fecd48360a059e52aaba" datatype="html"> |       <trans-unit id="9dfdbeb922d811d7b7b3fecd48360a059e52aaba" datatype="html"> | ||||||
| @ -7193,6 +7197,14 @@ | |||||||
|         <note priority="1" from="description">TX Fee Rating is Warning</note> |         <note priority="1" from="description">TX Fee Rating is Warning</note> | ||||||
|         <note priority="1" from="meaning">tx-fee-rating.overpaid.warning</note> |         <note priority="1" from="meaning">tx-fee-rating.overpaid.warning</note> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|  |       <trans-unit id="fd8be8e739148473816af99cd0d7979a4a31ca9e" datatype="html"> | ||||||
|  |         <source>Error:<x id="START_TAG_APP_MEMPOOL_ERROR" ctype="x-app_mempool_error" equiv-text="<app-mempool-error [error]="'not_enough_balance'" [textOnly]="true" alertClass="">"/><x id="CLOSE_TAG_APP_MEMPOOL_ERROR" ctype="x-app_mempool_error" equiv-text="</div>"/></source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> | ||||||
|  |           <context context-type="linenumber">6,7</context> | ||||||
|  |         </context-group> | ||||||
|  |         <note priority="1" from="description">fees-box.transaction-fees</note> | ||||||
|  |       </trans-unit> | ||||||
|       <trans-unit id="2d70cb7985eaebe99c35bcdfa7dc49b2662c345b" datatype="html"> |       <trans-unit id="2d70cb7985eaebe99c35bcdfa7dc49b2662c345b" datatype="html"> | ||||||
|         <source>Liquid Federation Holdings</source> |         <source>Liquid Federation Holdings</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
| @ -9247,6 +9259,14 @@ | |||||||
|         <note priority="1" from="description">Third-party Licenses</note> |         <note priority="1" from="description">Third-party Licenses</note> | ||||||
|         <note priority="1" from="meaning">shared.trademark-policy</note> |         <note priority="1" from="meaning">shared.trademark-policy</note> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|  |       <trans-unit id="2ce73c0cba7f66b5e34608ad3075844899017b24" datatype="html"> | ||||||
|  |         <source>Your balance is too low. Please <x id="START_LINK" ctype="x-a" equiv-text="<a style="color:#105fb0" href="/services/accelerator/overview">"/>top up your account<x id="CLOSE_LINK" ctype="x-a" equiv-text="</a>"/>.</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/shared/components/mempool-error/mempool-error.component.html</context> | ||||||
|  |           <context context-type="linenumber">9</context> | ||||||
|  |         </context-group> | ||||||
|  |         <note priority="1" from="description">accelerator.low-balance</note> | ||||||
|  |       </trans-unit> | ||||||
|       <trans-unit id="64dd13424d9486cf3d680d934987ec685bac0b3d" datatype="html"> |       <trans-unit id="64dd13424d9486cf3d680d934987ec685bac0b3d" datatype="html"> | ||||||
|         <source>This is a test network. Coins have no value.</source> |         <source>This is a test network. Coins have no value.</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user