aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/plugins/shared/plugin-api.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/plugins/shared/plugin-api.service.ts')
-rw-r--r--client/src/app/+admin/plugins/shared/plugin-api.service.ts16
1 files changed, 0 insertions, 16 deletions
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
index fad30576b..d91fccc09 100644
--- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts
+++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
@@ -94,7 +94,6 @@ export class PluginApiService {
94 94
95 return this.authHttp.get<RegisteredServerSettings>(path) 95 return this.authHttp.get<RegisteredServerSettings>(path)
96 .pipe( 96 .pipe(
97 switchMap(res => this.translateSettingsLabel(npmName, res)),
98 catchError(res => this.restExtractor.handleError(res)) 97 catchError(res => this.restExtractor.handleError(res))
99 ) 98 )
100 } 99 }
@@ -141,19 +140,4 @@ export class PluginApiService {
141 140
142 return `https://www.npmjs.com/package/peertube-${typeString}-${name}` 141 return `https://www.npmjs.com/package/peertube-${typeString}-${name}`
143 } 142 }
144
145 private translateSettingsLabel (npmName: string, res: RegisteredServerSettings): Observable<RegisteredServerSettings> {
146 return this.pluginService.translationsObservable
147 .pipe(
148 map(allTranslations => allTranslations[npmName]),
149 map(translations => {
150 const registeredSettings = res.registeredSettings
151 .map(r => {
152 return Object.assign({}, r, { label: peertubeTranslate(r.label, translations) })
153 })
154
155 return { registeredSettings }
156 })
157 )
158 }
159} 143}