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

This commit is contained in:
GoEdgeLab
2023-06-30 18:08:30 +08:00
parent 4724f2ac96
commit 29f87ab9c4
322 changed files with 884 additions and 733 deletions

View File

@@ -5,8 +5,8 @@
package providers
import (
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
@@ -166,7 +166,7 @@ func (this *CreatePopupAction) RunPost(params struct {
return
}
defer this.CreateLog(oplogs.LevelInfo, "创建DNS服务商 %d", createResp.DnsProviderId)
defer this.CreateLogInfo(codes.DNSProvider_LogCreateDNSProvider, createResp.DnsProviderId)
this.Success()
}

View File

@@ -1,9 +1,8 @@
package providers
import (
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
"github.com/TeaOSLab/EdgeAdmin/internal/utils/numberutils"
import ( "github.com/TeaOSLab/EdgeAdmin/internal/utils/numberutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
@@ -17,7 +16,7 @@ func (this *DeleteAction) RunPost(params struct {
// TODO 检查权限
// 记录日志
defer this.CreateLog(oplogs.LevelInfo, "删除DNS服务商 %d", params.ProviderId)
defer this.CreateLogInfo(codes.DNSProvider_LogDeleteDNSProvider, params.ProviderId)
// 检查是否被集群使用
countClustersResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClustersWithDNSProviderId(this.AdminContext(), &pb.CountAllEnabledNodeClustersWithDNSProviderIdRequest{DnsProviderId: params.ProviderId})

View File

@@ -4,8 +4,8 @@ package providers
import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
@@ -110,7 +110,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
Must *actions.Must
CSRF *actionutils.CSRF
}) {
defer this.CreateLog(oplogs.LevelInfo, "修改DNS服务商 %d", params.ProviderId)
defer this.CreateLogInfo(codes.DNSProvider_LogUpdateDNSProvider, params.ProviderId)
params.Must.
Field("name", params.Name).