mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 10:02:33 +08:00
i18n: wires up translations for plugins (#102853)
* i18n: consolidate i18n types & runtime services * Chore: updates after PR feedback * Chore: updates after feedback * Chore: updates after feedback * Chore: adds feature toggle * Chore: adds locale to backend * Chore: adds locales to i18n instance * Chore: fix missing path in CODEOWNERS * Chore: fix go lint issues * Chore: fix missing path in CODEOWNERS * Chore: updates after PR feedback * Trigger build * Chore: updates after PR feedback * Chore: use resolved language for lookup * Chore: updates after PR feedback * Update pkg/plugins/plugins.go Co-authored-by: Will Browne <wbrowne@users.noreply.github.com> * Chore: updates after PR feedback * Chore: updates after PR feedback --------- Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
@ -64,6 +64,8 @@ type Plugin struct {
|
||||
SkipHostEnvVars bool
|
||||
|
||||
mu sync.Mutex
|
||||
|
||||
Translations map[string]string
|
||||
}
|
||||
|
||||
var (
|
||||
@ -129,6 +131,9 @@ type JSONData struct {
|
||||
|
||||
// App Service Auth Registration
|
||||
IAM *auth.IAM `json:"iam,omitempty"`
|
||||
|
||||
// List of languages supported by the plugin
|
||||
Languages []string `json:"languages,omitempty"`
|
||||
}
|
||||
|
||||
func ReadPluginJSON(reader io.Reader) (JSONData, error) {
|
||||
|
Reference in New Issue
Block a user