From 0975cd5cf260bd06c797ac7582675ac624a47ebc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Jun 2018 16:31:52 +0200 Subject: Translate tab heads --- .../app/shared/forms/markdown-textarea.component.html | 6 +++--- client/src/app/shared/misc/help.component.ts | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/forms/markdown-textarea.component.html b/client/src/app/shared/forms/markdown-textarea.component.html index 6effda5b8..802562dd7 100644 --- a/client/src/app/shared/forms/markdown-textarea.component.html +++ b/client/src/app/shared/forms/markdown-textarea.component.html @@ -1,8 +1,8 @@
diff --git a/client/src/app/shared/misc/help.component.ts b/client/src/app/shared/misc/help.component.ts index 0373a63de..e7af61b4a 100644 --- a/client/src/app/shared/misc/help.component.ts +++ b/client/src/app/shared/misc/help.component.ts @@ -1,5 +1,6 @@ import { Component, Input, OnChanges, OnInit } from '@angular/core' import { MarkdownService } from '@app/videos/shared' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-help', @@ -16,6 +17,8 @@ export class HelpComponent implements OnInit, OnChanges { mainHtml = '' + constructor (private i18n: I18n) { } + ngOnInit () { this.init() } @@ -42,18 +45,18 @@ export class HelpComponent implements OnInit, OnChanges { } private formatMarkdownSupport (rules: string[]) { - return 'Markdown ' + - 'compatible that supports:' + + // tslint:disable:max-line-length + return this.i18n('Markdown compatible that supports:') + this.createMarkdownList(rules) } private createMarkdownList (rules: string[]) { const rulesToText = { - 'emphasis': 'Emphasis', - 'link': 'Links', - 'newline': 'New lines', - 'list': 'Lists', - 'image': 'Images' + 'emphasis': this.i18n('Emphasis'), + 'link': this.i18n('Links'), + 'newline': this.i18n('New lines'), + 'list': this.i18n('Lists'), + 'image': this.i18n('Images') } const bullets = rules.map(r => rulesToText[r]) -- cgit v1.2.3