mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add plugin translation system
This commit is contained in:
parent
ee286591a5
commit
d75db01f14
18 changed files with 304 additions and 29 deletions
|
@ -134,6 +134,21 @@ function getPublicSettings (parameters: {
|
|||
})
|
||||
}
|
||||
|
||||
function getPluginTranslations (parameters: {
|
||||
url: string,
|
||||
locale: string,
|
||||
expectedStatus?: number
|
||||
}) {
|
||||
const { url, locale, expectedStatus = 200 } = parameters
|
||||
const path = '/plugins/translations/' + locale + '.json'
|
||||
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
statusCodeExpected: expectedStatus
|
||||
})
|
||||
}
|
||||
|
||||
function installPlugin (parameters: {
|
||||
url: string,
|
||||
accessToken: string,
|
||||
|
@ -224,6 +239,7 @@ export {
|
|||
listPlugins,
|
||||
listAvailablePlugins,
|
||||
installPlugin,
|
||||
getPluginTranslations,
|
||||
getPluginsCSS,
|
||||
updatePlugin,
|
||||
getPlugin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue