aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 16:31:52 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 16:31:52 +0200
commit0975cd5cf260bd06c797ac7582675ac624a47ebc (patch)
tree7b02b1694f695d4ff71db52592c3ccd1e6998897 /client/src/app/shared
parent7a9fd8b54dd278cbb341daf96baca769bfe92ce9 (diff)
downloadPeerTube-0975cd5cf260bd06c797ac7582675ac624a47ebc.tar.gz
PeerTube-0975cd5cf260bd06c797ac7582675ac624a47ebc.tar.zst
PeerTube-0975cd5cf260bd06c797ac7582675ac624a47ebc.zip
Translate tab heads
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/forms/markdown-textarea.component.html6
-rw-r--r--client/src/app/shared/misc/help.component.ts17
2 files changed, 13 insertions, 10 deletions
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 @@
1<div class="root" [ngStyle]="{ 'flex-direction': flexDirection }"> 1<div class="root" [ngStyle]="{ 'flex-direction': flexDirection }">
2 <textarea 2 <textarea
3 [(ngModel)]="content" (ngModelChange)="onModelChange()" 3 [(ngModel)]="content" (ngModelChange)="onModelChange()"
4 [ngClass]="classes" [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }" 4 [ngClass]="classes" [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }"
5 id="description" name="description"> 5 id="description" name="description">
6 </textarea> 6 </textarea>
7 7
8 <tabset *ngIf="arePreviewsDisplayed()" class="previews"> 8 <tabset *ngIf="arePreviewsDisplayed()" class="previews">
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 @@
1import { Component, Input, OnChanges, OnInit } from '@angular/core' 1import { Component, Input, OnChanges, OnInit } from '@angular/core'
2import { MarkdownService } from '@app/videos/shared' 2import { MarkdownService } from '@app/videos/shared'
3import { I18n } from '@ngx-translate/i18n-polyfill'
3 4
4@Component({ 5@Component({
5 selector: 'my-help', 6 selector: 'my-help',
@@ -16,6 +17,8 @@ export class HelpComponent implements OnInit, OnChanges {
16 17
17 mainHtml = '' 18 mainHtml = ''
18 19
20 constructor (private i18n: I18n) { }
21
19 ngOnInit () { 22 ngOnInit () {
20 this.init() 23 this.init()
21 } 24 }
@@ -42,18 +45,18 @@ export class HelpComponent implements OnInit, OnChanges {
42 } 45 }
43 46
44 private formatMarkdownSupport (rules: string[]) { 47 private formatMarkdownSupport (rules: string[]) {
45 return '<a href="https://en.wikipedia.org/wiki/Markdown#Example" target="_blank" rel="noopener noreferrer">Markdown</a> ' + 48 // tslint:disable:max-line-length
46 'compatible that supports:' + 49 return this.i18n('<a href="https://en.wikipedia.org/wiki/Markdown#Example" target="_blank" rel="noopener noreferrer">Markdown</a> compatible that supports:') +
47 this.createMarkdownList(rules) 50 this.createMarkdownList(rules)
48 } 51 }
49 52
50 private createMarkdownList (rules: string[]) { 53 private createMarkdownList (rules: string[]) {
51 const rulesToText = { 54 const rulesToText = {
52 'emphasis': 'Emphasis', 55 'emphasis': this.i18n('Emphasis'),
53 'link': 'Links', 56 'link': this.i18n('Links'),
54 'newline': 'New lines', 57 'newline': this.i18n('New lines'),
55 'list': 'Lists', 58 'list': this.i18n('Lists'),
56 'image': 'Images' 59 'image': this.i18n('Images')
57 } 60 }
58 61
59 const bullets = rules.map(r => rulesToText[r]) 62 const bullets = rules.map(r => rulesToText[r])