diff options
Diffstat (limited to 'client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts')
-rw-r--r-- | client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts index ccf9f1ed5..1a6b4eba3 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts | |||
@@ -3,8 +3,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators' | |||
3 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | 5 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' |
6 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, ServerService } from '@app/core' | 6 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' | 7 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' |
9 | import { PluginType } from '@shared/models/plugins/plugin.type' | 8 | import { PluginType } from '@shared/models/plugins/plugin.type' |
10 | 9 | ||
@@ -40,8 +39,6 @@ export class PluginSearchComponent implements OnInit { | |||
40 | private searchSubject = new Subject<string>() | 39 | private searchSubject = new Subject<string>() |
41 | 40 | ||
42 | constructor ( | 41 | constructor ( |
43 | private server: ServerService, | ||
44 | private i18n: I18n, | ||
45 | private pluginService: PluginApiService, | 42 | private pluginService: PluginApiService, |
46 | private notifier: Notifier, | 43 | private notifier: Notifier, |
47 | private confirmService: ConfirmService, | 44 | private confirmService: ConfirmService, |
@@ -100,7 +97,7 @@ export class PluginSearchComponent implements OnInit { | |||
100 | err => { | 97 | err => { |
101 | console.error(err) | 98 | console.error(err) |
102 | 99 | ||
103 | const message = this.i18n('The plugin index is not available. Please retry later.') | 100 | const message = $localize`The plugin index is not available. Please retry later.` |
104 | this.notifier.error(message) | 101 | this.notifier.error(message) |
105 | } | 102 | } |
106 | ) | 103 | ) |
@@ -122,8 +119,8 @@ export class PluginSearchComponent implements OnInit { | |||
122 | if (this.installing[plugin.npmName]) return | 119 | if (this.installing[plugin.npmName]) return |
123 | 120 | ||
124 | const res = await this.confirmService.confirm( | 121 | const res = await this.confirmService.confirm( |
125 | this.i18n('Please only install plugins or themes you trust, since they can execute any code on your instance.'), | 122 | $localize`Please only install plugins or themes you trust, since they can execute any code on your instance.`, |
126 | this.i18n('Install {{pluginName}}?', { pluginName: plugin.name }) | 123 | $localize`Install ${plugin.name}?` |
127 | ) | 124 | ) |
128 | if (res === false) return | 125 | if (res === false) return |
129 | 126 | ||
@@ -135,7 +132,7 @@ export class PluginSearchComponent implements OnInit { | |||
135 | this.installing[plugin.npmName] = false | 132 | this.installing[plugin.npmName] = false |
136 | this.pluginInstalled = true | 133 | this.pluginInstalled = true |
137 | 134 | ||
138 | this.notifier.success(this.i18n('{{pluginName}} installed.', { pluginName: plugin.name })) | 135 | this.notifier.success($localize`${plugin.name} installed.`) |
139 | 136 | ||
140 | plugin.installed = true | 137 | plugin.installed = true |
141 | }, | 138 | }, |