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:
co-authored by
Will Browne
parent
7ea0fab606
commit
18ae5d7f0c
@@ -154,6 +154,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
Sort: getPanelSort(panel.ID),
|
||||
Angular: panel.Angular,
|
||||
LoadingStrategy: hs.pluginAssets.LoadingStrategy(c.Req.Context(), panel),
|
||||
Translations: panel.Translations,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,6 +490,7 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, availablePlug
|
||||
Angular: plugin.Angular,
|
||||
MultiValueFilterOperators: plugin.MultiValueFilterOperators,
|
||||
LoadingStrategy: hs.pluginAssets.LoadingStrategy(c.Req.Context(), plugin),
|
||||
Translations: plugin.Translations,
|
||||
}
|
||||
|
||||
if ds.JsonData == nil {
|
||||
@@ -571,8 +573,9 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, availablePlug
|
||||
Signature: ds.Signature,
|
||||
Module: ds.Module,
|
||||
// ModuleHash: hs.pluginAssets.ModuleHash(c.Req.Context(), ds),
|
||||
BaseURL: ds.BaseURL,
|
||||
Angular: ds.Angular,
|
||||
BaseURL: ds.BaseURL,
|
||||
Angular: ds.Angular,
|
||||
Translations: ds.Translations,
|
||||
},
|
||||
}
|
||||
if ds.Name == grafanads.DatasourceName {
|
||||
@@ -597,6 +600,7 @@ func (hs *HTTPServer) newAppDTO(ctx context.Context, plugin pluginstore.Plugin,
|
||||
Extensions: plugin.Extensions,
|
||||
Dependencies: plugin.Dependencies,
|
||||
ModuleHash: hs.pluginAssets.ModuleHash(ctx, plugin),
|
||||
Translations: plugin.Translations,
|
||||
}
|
||||
|
||||
if settings.Enabled {
|
||||
|
||||
Reference in New Issue
Block a user