1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-23 05:03:36 +03:00

start page translation fix

This commit is contained in:
Eugene Pankov 2022-01-08 17:35:49 +01:00
parent ec4f200435
commit d8625d6b9f
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 7 additions and 2 deletions

View File

@ -20,4 +20,4 @@ footer.d-flex.align-items-center
i.fas.fa-bug
span(translate) Report a problem
.form-control-static.selectable.no-drag(translate, [translateParams]='{version: homeBase.appVersion}') Version: {version}
.form-control-static.selectable.no-drag {{versionLabel}}

View File

@ -2,7 +2,7 @@ import { Component, Inject } from '@angular/core'
import { DomSanitizer } from '@angular/platform-browser'
import { ConfigService } from '../services/config.service'
import { HomeBaseService } from '../services/homeBase.service'
import { ToolbarButton, ToolbarButtonProvider } from '../api'
import { ToolbarButton, ToolbarButtonProvider, TranslateService } from '../api'
/** @hidden */
@Component({
@ -16,6 +16,7 @@ export class StartPageComponent {
constructor (
private config: ConfigService,
private domSanitizer: DomSanitizer,
private translate: TranslateService,
public homeBase: HomeBaseService,
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
) {
@ -37,4 +38,8 @@ export class StartPageComponent {
buttonsTrackBy (btn: ToolbarButton): any {
return btn.title + btn.icon
}
get versionLabel (): string {
return this.translate.instant('Version: {version}', { version: this.homeBase.appVersion })
}
}