部分中文转换为多语言代号

This commit is contained in:
刘祥超
2023-06-28 19:07:42 +08:00
parent a5e53df998
commit 65555e1fe3
26 changed files with 103 additions and 85 deletions

View File

@@ -4,22 +4,24 @@
package nodelogutils
import (
"github.com/TeaOSLab/EdgeCommon/pkg/langs"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/iwind/TeaGo/maps"
)
// FindCommonTags 查找常用的标签
func FindNodeCommonTags() []maps.Map {
func FindNodeCommonTags(langCode langs.LangCode) []maps.Map {
return []maps.Map{
{
"name": "端口监听",
"name": langs.Message(langCode, codes.AdminLogTagListener),
"code": "LISTENER",
},
{
"name": "WAF",
"name": langs.Message(langCode, codes.AdminLogTagWAF),
"code": "WAF",
},
{
"name": "访问日志",
"name": langs.Message(langCode, codes.AdminLogTagAccessLog),
"code": "ACCESS_LOG",
},
}