Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(plugin): Modify the plugin base description information to the internationalization field

LinkinStarsa1486077636b
diff --git a/plugin/base.go b/plugin/base.go
index 1b49db37..4f1d3c0d 100644
--- a/plugin/base.go
+++ b/plugin/base.go
@@ -2,9 +2,9 @@ package plugin
// Info presents the plugin information
type Info struct {
- Name string
+ Name Translator
SlugName string
- Description string
+ Description Translator
Author string
Version string
}
diff --git a/plugin/config.go b/plugin/config.go
index bc13f787..cdeeca7a 100644
--- a/plugin/config.go
+++ b/plugin/config.go
@@ -34,8 +34,8 @@ const (
type ConfigField struct {
Name string `json:"name"`
Type ConfigType `json:"type"`
- Title string `json:"title"`
- Description string `json:"description"`
+ Title Translator `json:"title"`
+ Description Translator `json:"description"`
Required bool `json:"required"`
Value string `json:"value"`
UIOptions ConfigFieldUIOptions `json:"ui_options"`
@@ -43,14 +43,14 @@ type ConfigField struct {
}
type ConfigFieldUIOptions struct {
- Placeholder string `json:"placeholder,omitempty"`
- Rows string `json:"rows,omitempty"`
- InputType InputType `json:"input_type,omitempty"`
+ Placeholder Translator `json:"placeholder,omitempty"`
+ Rows string `json:"rows,omitempty"`
+ InputType InputType `json:"input_type,omitempty"`
}
type ConfigFieldOption struct {
- Label string `json:"label"`
- Value string `json:"value"`
+ Label Translator `json:"label"`
+ Value string `json:"value"`
}
type Config interface {