mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 04:19:26 +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:
@ -22,8 +22,8 @@ type DefaultConstructor struct {
|
||||
}
|
||||
|
||||
// DefaultConstructFunc is the default ConstructFunc used for the Construct step of the Bootstrap stage.
|
||||
func DefaultConstructFunc(signatureCalculator plugins.SignatureCalculator, assetPath *assetpath.Service) ConstructFunc {
|
||||
return NewDefaultConstructor(signatureCalculator, assetPath).Construct
|
||||
func DefaultConstructFunc(cfg *config.PluginManagementCfg, signatureCalculator plugins.SignatureCalculator, assetPath *assetpath.Service) ConstructFunc {
|
||||
return NewDefaultConstructor(cfg, signatureCalculator, assetPath).Construct
|
||||
}
|
||||
|
||||
// DefaultDecorateFuncs are the default DecorateFuncs used for the Decorate step of the Bootstrap stage.
|
||||
@ -37,9 +37,9 @@ func DefaultDecorateFuncs(cfg *config.PluginManagementCfg) []DecorateFunc {
|
||||
}
|
||||
|
||||
// NewDefaultConstructor returns a new DefaultConstructor.
|
||||
func NewDefaultConstructor(signatureCalculator plugins.SignatureCalculator, assetPath *assetpath.Service) *DefaultConstructor {
|
||||
func NewDefaultConstructor(cfg *config.PluginManagementCfg, signatureCalculator plugins.SignatureCalculator, assetPath *assetpath.Service) *DefaultConstructor {
|
||||
return &DefaultConstructor{
|
||||
pluginFactoryFunc: NewDefaultPluginFactory(assetPath).createPlugin,
|
||||
pluginFactoryFunc: NewDefaultPluginFactory(&cfg.Features, assetPath).createPlugin,
|
||||
signatureCalculator: signatureCalculator,
|
||||
log: log.New("plugins.construct"),
|
||||
}
|
||||
|
Reference in New Issue
Block a user