Add plugin translation system

This commit is contained in:
Chocobozzz
2019-07-26 14:44:50 +02:00
parent ee286591a5
commit d75db01f14
18 changed files with 304 additions and 29 deletions

View File

@@ -1,5 +1,9 @@
import { PluginClientScope } from './plugin-client-scope.type'
export type PluginTranslationPaths = {
[ locale: string ]: string
}
export type ClientScript = {
script: string,
scopes: PluginClientScope[]
@@ -20,4 +24,6 @@ export type PluginPackageJson = {
css: string[]
clientScripts: ClientScript[]
translations: PluginTranslationPaths
}

View File

@@ -0,0 +1,5 @@
export type PluginTranslation = {
[ npmName: string ]: {
[ key: string ]: string
}
}