|
1 | 1 | package locales |
2 | 2 |
|
3 | | -var zhCnMsg = map[string]string{} |
| 3 | +import ( |
| 4 | + "fmt" |
| 5 | + |
| 6 | + "humpback/common/enum" |
| 7 | +) |
| 8 | + |
| 9 | +var zhCnMsg = map[string]string{ |
| 10 | + CodeSucceed: "成功", |
| 11 | + CodeServerErr: "服务器错误,请联系管理员!", |
| 12 | + CodeRequestParamsInvalid: "请求参数无效。", |
| 13 | + CodeLoginExpired: "登录已过期,请重新登录。", |
| 14 | + CodeNotLogin: "未登录。", |
| 15 | + CodeNoPermission: "你没有操作权限。", |
| 16 | + |
| 17 | + CodeNameNotEmpty: "名称不能为空。", |
| 18 | + |
| 19 | + CodeUserNameLimitLength: fmt.Sprintf("用户名长度限制为%d到%d。", enum.LimitUsername.Min, enum.LimitUsername.Max), |
| 20 | + CodeUserNameIsInvalid: "用户名无效。", |
| 21 | + CodeUserNameNotEmpty: "用户名不能为空。", |
| 22 | + CodeUserNotExist: "用户不存在。", |
| 23 | + CodeUserIdNotEmpty: "用户ID不能为空。", |
| 24 | + CodeUserAlreadyExist: "用户已存在。", |
| 25 | + CodeUserNameAlreadyExist: "用户名已存在。", |
| 26 | + CodeUserIsOwner: "无法更新自己。", |
| 27 | + |
| 28 | + CodeUserRoleIsInvalid: "用户角色无效。", |
| 29 | + |
| 30 | + CodeTeamNameNotEmpty: "团队名称不能为空。", |
| 31 | + CodeTeamNameLimitLength: fmt.Sprintf("团队名称长度限制为%d到%d。", enum.LimitTeamName.Min, enum.LimitTeamName.Max), |
| 32 | + CodeTeamIdNotEmpty: "团队ID不能为空。", |
| 33 | + CodeTeamNotExist: "团队不存在。", |
| 34 | + CodeTeamAlreadyExist: "团队已经存在。", |
| 35 | + CodeTeamNameAlreadyExist: "团队名称已存在。", |
| 36 | + |
| 37 | + CodeEmailIsInvalid: "电子邮件地址无效。", |
| 38 | + CodeEmailLimitLength: fmt.Sprintf("电子邮件地址长度最大限制为%d。", enum.LimitEmail.Max), |
| 39 | + |
| 40 | + CodePhoneLimitLength: fmt.Sprintf("电话号码长度最大限制为%d。", enum.LimitPhone.Max), |
| 41 | + CodePhoneIsInvalid: "电话号码无效。", |
| 42 | + |
| 43 | + CodeDescriptionLimitLength: fmt.Sprintf("描述长度最大限制为%d。", enum.LimitDescription.Max), |
| 44 | + |
| 45 | + CodePasswordLimitLength: fmt.Sprintf("密码长度限制为%d到%d。", enum.LimitPassword.Min, enum.LimitPassword.Max), |
| 46 | + CodePasswordIsWrong: "密码错误。", |
| 47 | + CodePasswordNotEmpty: "密码不能为空。", |
| 48 | + CodeOldPasswordNotEmpty: "旧密码不能为空。", |
| 49 | + CodeOldPasswordLimitLength: fmt.Sprintf("旧密码长度限制为%d到%d。", enum.LimitPassword.Min, enum.LimitPassword.Max), |
| 50 | + CodeOldPasswordIsWrong: "旧密码错误。", |
| 51 | + CodeNewPasswordNotEmpty: "新密码不能为空。", |
| 52 | + CodeNewPasswordLimitLength: fmt.Sprintf("新密码长度限制为%d到%d。", enum.LimitPassword.Min, enum.LimitPassword.Max), |
| 53 | + |
| 54 | + CodeConfigNameNotEmpty: "配置名称不能为空。", |
| 55 | + CodeConfigNameLimitLength: fmt.Sprintf("配置名称长度限制为%d到%d。", enum.LimitConfigName.Min, enum.LimitConfigName.Max), |
| 56 | + CodeConfigNameAlreadyExist: "配置名称已存在。", |
| 57 | + CodeConfigNotExist: "配置不存在。", |
| 58 | + CodeConfigValueNotEmpty: "配置值不能为空。", |
| 59 | + CodeConfigStaticValueLimitLength: fmt.Sprintf("静态配置值长度最大限制为%d。", enum.LimitConfigValue.Max/2), |
| 60 | + CodeConfigVolumeValueLimitLength: fmt.Sprintf("卷配置值长度最大限制为%d。", enum.LimitConfigValue.Max), |
| 61 | + CodeConfigTypeIsInvalid: "配置类型无效。", |
| 62 | + CodeConfigIdNotEmpty: "配置ID不能为空。", |
| 63 | + |
| 64 | + CodeRegistryNotExist: "仓库不存在。", |
| 65 | + CodeRegistryIdNotEmpty: "仓库ID不能为空。", |
| 66 | + CodeRegistryUrlNotEmpty: "仓库地址不能为空。", |
| 67 | + CodeRegistryUrlLimitLength: fmt.Sprintf("仓库地址长度最大限制为%d。", enum.LimitRegistryUrl.Max), |
| 68 | + CodeRegistryUrlAlreadyExist: "仓库地址已存在。", |
| 69 | + CodeRegistryUsernameLimitLength: fmt.Sprintf("仓库用户名长度最大限制为%d。", enum.LimitRegistryUsername.Max), |
| 70 | + CodeRegistryPasswordLimitLength: fmt.Sprintf("仓库密码长度最大限制为%d。", enum.LimitRegistryPassword.Max), |
| 71 | + CodeRegistryDefaultNotDelete: "仓库docker.io不能被删除。", |
| 72 | + |
| 73 | + CodeNodesNotEmpty: "机器不能为空。", |
| 74 | + CodeNodesIdNotEmpty: "机器ID不能为空。", |
| 75 | + CodeNodesNotExist: "机器不存在。", |
| 76 | + CodeNodesIpAddressInvalid: "IP地址无效。", |
| 77 | + CodeNodesLabelKeyIsEmpty: "标签名称不能为空。", |
| 78 | + CodeNodesLabelValueIsEmpty: "标签值不能为空。", |
| 79 | + CodeNodesLabelKeyIsDuplicated: "标签名重复。", |
| 80 | + CodeNodesIpAddressAlreadyExist: "IP地址已存在。", |
| 81 | + |
| 82 | + CodeGroupIdNotEmpty: "分组ID不能为空。", |
| 83 | + CodeGroupNotExist: "分组不存在。", |
| 84 | + CodeGroupNameAlreadyExist: "分组名称已存在。", |
| 85 | + CodeGroupNameLimitLength: fmt.Sprintf("分组名称长度限制为%d到%d。", enum.LimitGroupName.Min, enum.LimitGroupName.Max), |
| 86 | + CodeGroupNameNotEmpty: "分组名称不能为空。", |
| 87 | + CodeGroupNoPermission: "你没有当前分组权限。", |
| 88 | + |
| 89 | + CodeServiceNotExist: "服务不存在。", |
| 90 | + CodeServiceNameNotEmpty: "服务名称不能为空。", |
| 91 | + CodeServiceNameLimitLength: fmt.Sprintf("服务名称长度限制为%d到%d。", enum.LimitServiceName.Min, enum.LimitServiceName.Max), |
| 92 | + CodeServiceNameAlreadyExist: "服务名称已存在。", |
| 93 | + CodeServiceIdNotEmpty: "服务ID不能为空。", |
| 94 | + CodeServiceImageNotEmpty: "服务镜像不能为空。", |
| 95 | + CodeServiceImageLimitLength: fmt.Sprintf("镜像长度最大限制为%d", enum.LimitImageName.Max), |
| 96 | + CodeServiceNetworkModeInvalid: "网络模式无效。", |
| 97 | + CodeServiceRestartPolicyInvalid: "重启策略无效。", |
| 98 | + CodeServiceContainerPortNotEmpty: "容器端口不能为空。", |
| 99 | + CodeServiceContainerPortIsDuplicated: "容器端口重复。", |
| 100 | + CodeServiceHostPortIsDuplicated: "主机端口重复。", |
| 101 | + CodeServiceContainerVolumeNotEmpty: "容器卷不能为空。", |
| 102 | + CodeServiceContainerVolumeIsDuplicated: "容器卷重复。", |
| 103 | + CodeServiceContainerVolumeTypeInvlaid: "容器卷类型无效。", |
| 104 | + CodeServiceHostVolumeNotEmpty: "主机卷不能为空。", |
| 105 | + CodeServiceLabelNameNotEmpty: "标签名称不能为空。", |
| 106 | + CodeServiceLabelValueNotEmpty: "标签值不能为空。", |
| 107 | + CodeServiceResourceMemoryLimitLimitMax: fmt.Sprintf("内存限制为%d到%d。", enum.LimitMemoryLimit.Min, enum.LimitMemoryLimit.Max), |
| 108 | + CodeServiceResourceMemoryReservationLimitMax: fmt.Sprintf("内存预留限制为%d到%d", enum.LimitMemoryReservation.Min, enum.LimitMemoryReservation.Max), |
| 109 | + CodeServiceResourceMaxCpuUsageInvalid: fmt.Sprintf("最大cpu使用率无效,限制为%d到%d", enum.LimitMaxCpuUsage.Min, enum.LimitMaxCpuUsage.Max), |
| 110 | + CodeServiceDispatchModeInvalid: "调度模式无效。", |
| 111 | + CodeServiceInstanceNumInvalid: fmt.Sprintf("实例数无效。限制为%d到%d", enum.LimitInstanceNum.Min, enum.LimitInstanceNum.Max), |
| 112 | + CodeServicePlacementModeInvalid: "约束无效。", |
| 113 | + CodeServicePlacementLabelNotEmpty: "约束标签不能为空。", |
| 114 | + CodeServicePlacementValueNotEmpty: "约束值不能为空。", |
| 115 | + CodeServiceScheduleCronNotEmpty: "调度计划cron不能为空。", |
| 116 | + CodeServiceScheduleCronInvalid: "执行计划cron无效。", |
| 117 | + CodeServiceScheduleTimeoutInvalid: "执行计划超时控制时间无效。", |
| 118 | + CodeServiceProtocolInvalid: "协议无效,仅支持TCP、UDP。", |
| 119 | + CodeServiceOperateInvalid: "无效的操作。", |
| 120 | + CodeServiceIsNotEnable: "服务未启用。", |
| 121 | + CodeServiceIsEnabled: "服务已启用。", |
| 122 | + CodeServiceIsDisabled: "服务已停用。", |
| 123 | + |
| 124 | + CodeContainerIdNotEmpty: "容器ID不能为空。", |
| 125 | + CodeContainerActionInvalid: "操作无效。", |
| 126 | + CodeContainerLogTimeInvlaid: "日志时间范围无效。", |
| 127 | +} |
0 commit comments