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

This commit is contained in:
刘祥超
2023-06-30 18:08:30 +08:00
parent 65555e1fe3
commit 5e38b1fbca
322 changed files with 884 additions and 733 deletions

View File

@@ -3,9 +3,9 @@ package https
import (
"encoding/json"
"errors"
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/serverutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
@@ -117,7 +117,7 @@ func (this *IndexAction) RunPost(params struct {
Must *actions.Must
}) {
// 记录日志
defer this.CreateLog(oplogs.LevelInfo, "修改服务 %d 的HTTPS设置", params.ServerId)
defer this.CreateLogInfo(codes.ServerHTTPS_LogUpdateHTTPSSettings, params.ServerId)
var addresses = []*serverconfigs.NetworkAddressConfig{}
err := json.Unmarshal([]byte(params.Addresses), &addresses)

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dns/domains/domainutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
@@ -113,7 +114,7 @@ func (this *RequestCertPopupAction) RunPost(params struct {
this.ErrorPage(err)
return
}
defer this.CreateLogInfo("创建ACME用户 %d", createUserResp.AcmeUserId)
defer this.CreateLogInfo(codes.ACMEUser_LogCreateACMEUser, createUserResp.AcmeUserId)
acmeUserId = createUserResp.AcmeUserId
this.Data["acmeUser"] = maps.Map{
@@ -139,7 +140,7 @@ func (this *RequestCertPopupAction) RunPost(params struct {
taskId := createTaskResp.AcmeTaskId
defer this.CreateLogInfo("自动申请证书,任务 %d", taskId)
defer this.CreateLogInfo(codes.ACMETask_LogRunACMETask, taskId)
runResp, err := this.RPC().ACMETaskRPC().RunACMETask(this.AdminContext(), &pb.RunACMETaskRequest{AcmeTaskId: taskId})
if err != nil {