|
@@ -1621,9 +1621,9 @@ class KMMemberCenterManager: NSObject {
|
|
|
|
|
|
static func getCodeMessage(code: KMMemberCenterErrorCodeType?, message: String?) -> String {
|
|
|
var string = self.typeOfMessage(type: code)
|
|
|
-// if string.isEmpty {
|
|
|
+ if string.isEmpty {
|
|
|
string = message ?? ""
|
|
|
-// }
|
|
|
+ }
|
|
|
return string
|
|
|
}
|
|
|
|
|
@@ -1631,141 +1631,140 @@ class KMMemberCenterManager: NSObject {
|
|
|
var result: String = ""
|
|
|
switch type {
|
|
|
case .EXCEPTION_MSG_TOKEN_IS_INVALID:
|
|
|
- result = "无效的token或者token已过期"
|
|
|
+ result = "Invalid token or token has expired."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_DEVICE_NUM_MAX:
|
|
|
- result = "您的登录设备已达上限,请退出其他设备重新登录"
|
|
|
+ result = "Your device logged-in has been limited. Please log out from other devices first."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_USER_NOT_LOGIN:
|
|
|
- result = "用户没有登录,请登录后再访问"
|
|
|
+ result = "The user has not logged in. Please login before accessing."
|
|
|
break;
|
|
|
case .EMAIL_VERIFY_CODE_KEY_ERROR:
|
|
|
- result = "email code error!"
|
|
|
+ result = "Email code error!"
|
|
|
break;
|
|
|
case .EMAIL_REGISTER_ERROR:
|
|
|
result = "Register error!"
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PASSWORD_ERROR:
|
|
|
- result = NSLocalizedString("Password error.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ result = "The password is wrong, you can check the case status."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_CODE_ACTION_ERROR:
|
|
|
- result = "code action error"
|
|
|
+ result = "Code action error."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_CODE_SEND_ERROR:
|
|
|
- result = "code send error"
|
|
|
+ result = "Code send error."
|
|
|
break;
|
|
|
case .EXCEPTION_MAIL_CODE_SEND_ERROR:
|
|
|
- result = "mail send error"
|
|
|
+ result = "Mail send error."
|
|
|
break;
|
|
|
case .VERIFY_CODE_SEND_TOO_QUICKLY:
|
|
|
- result = "code send too quickly"
|
|
|
+ result = "Code send too quickly!"
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_EMAIL_EXIST:
|
|
|
- result = "该邮箱已有账号,请前往登录"
|
|
|
+ result = "This email is already associated with an account. please log in."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_EMAIL_NOT_REGISTER:
|
|
|
- result = NSLocalizedString("This email has not been registered, please log in through the account verification code, we will automatically register an account for you.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ result = "The current account is not registered. Click Next and we will register an account for you."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_EMAIL_LOGOUT_ING:
|
|
|
- result = "注销中,无法登录,若有问题可联系客服"
|
|
|
+ result = "The account is being removed and unable to log in. If you have any questions, please get in touch with customer service."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_EMAIL_INVALID:
|
|
|
- result = NSLocalizedString("Email format error. Please enter the correct email.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
+ result = "Please enter the correct email format."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PASSWORD_NOT_INCONSISTENT:
|
|
|
- result = "密码不一致,请重新输入"
|
|
|
+ result = "Password is inconsistent, please re-enter."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PASSWORD_SIZE_MIN:
|
|
|
- result = "密码请包含6~24个字符"
|
|
|
+ result = "The password must contain 6 to 24 characters."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PASSWORD_SIZE_MAX:
|
|
|
- result = "密码请包含6~24个字符"
|
|
|
+ result = "The password must contain 6 to 24 characters."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PLEASE_ADD_AUTH_CONFIG:
|
|
|
- result = "please add auth config"
|
|
|
+ result = "Please add auth config"
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_USER_SUBSCRIPTION_IN_PROGRESS:
|
|
|
- result = "您目前还在订阅期内,暂时无法注销,请订阅期结束后再点击注销账号"
|
|
|
+ result = "You are still subscribing and cannot remove your account at the moment. Please wait until the subscription period is over."
|
|
|
break;
|
|
|
case .EXCEPTION_TIME_TRANSFER_ERROR:
|
|
|
- result = "时间转换失败"
|
|
|
+ result = "Time conversion failed."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_PASSWORD_CONTAIN_EMPTY:
|
|
|
- result = "密码不能包含空格"
|
|
|
+ result = "Password cannot contain spaces."
|
|
|
break;
|
|
|
case .EXCEPTION_MSG_CREATE_ORDER_PARAMETER: // 支付方式异常
|
|
|
- result = ""
|
|
|
+ result = "Abnormal payment method."
|
|
|
case .EXCEPTION_MSG_EVENT_IS_CURRENTLY_NOT_SUPPORTED: // 当前事件暂不支持
|
|
|
- result = ""
|
|
|
+ result = "The current event is not supported yet."
|
|
|
case .EXCEPTION_MSG_THE_ACCOUNT_IS_ALREADY_LOGGED_IN_ON_OTHER_DEVICES: // 账号已在其他设备登录
|
|
|
- result = ""
|
|
|
+ result = "This account has been logged in on other devices."
|
|
|
case .EXCEPTION_MSG_ABNORMAL_USER_STATUS: // 当前邮箱已被停用或者处于注销中状态
|
|
|
- result = ""
|
|
|
+ result = "The current email address has been deactivated or is in the account cancellation state."
|
|
|
case .EXCEPTION_MSG_APP_STORE_TICKET_VALIDATION_FAILED: // Appstore票据验证失败"
|
|
|
- result = ""
|
|
|
+ result = "Ticket verification of AppStore failed."
|
|
|
case .EXCEPTION_MSG_APP_STORE_TICKET_VALIDATION_NEED_TO_RETRY: //Appstore票据验证需要重试
|
|
|
- result = ""
|
|
|
+ result = "Ticket verification of AppStore needs to be retried."
|
|
|
case .EXCEPTION_MSG_REPEAT_SUBSCRIPTION: // 用户已订阅该产品
|
|
|
- result = ""
|
|
|
+ result = "The user has subscribed to this product."
|
|
|
case .EXCEPTION_MSG_RESTORING_PURCHASES_IS_NOT_CURRENTLY_SUPPORTED: // 恢复购买暂不支持
|
|
|
- result = ""
|
|
|
+ result = "Restoring purchases is not supported yet."
|
|
|
case .EXCEPTION_MSG_USER_TRANSACTION_CANCELED_OR_FAILED: // 用户交易取消或失败
|
|
|
- result = ""
|
|
|
+ result = "The user's transaction is canceled or failed."
|
|
|
case .EXCEPTION_MSG_CURRENT_ORDER_NOT_RECORDED: // 当前订单末记录,请稍后重试
|
|
|
- result = ""
|
|
|
+ result = "The current order is not recorded, please try again later."
|
|
|
case .EXCEPTION_MSG_THE_SAME_USER: //同一用户,无需处理
|
|
|
- result = ""
|
|
|
+ result = "Same user, no need to process."
|
|
|
case .EXCEPTION_MSG_THIRD_PAY_ID_ILLEGAL: //thirdPayld非法
|
|
|
- result = ""
|
|
|
+ result = "Third-party payment is illegal."
|
|
|
case .EXCEPTION_MSG_ORDER_DOES_NOT_EXIST: //订单不存在
|
|
|
- result = ""
|
|
|
-
|
|
|
+ result = "Order does not exist."
|
|
|
case .EXCEPTION_MSG_THE_ORDER_STATUS_IS_ABNORMAL: // 订单状态异常
|
|
|
- result = ""
|
|
|
+ result = "Order status abnormal."
|
|
|
case .EXCEPTION_MSG_TRANSACTION_ID_REPEAT: // transactionld重复
|
|
|
- result = ""
|
|
|
+ result = "Transaction duplicate."
|
|
|
case .EXCEPTION_TICKET_HAS_BEEN_BLOCKED: // The ticket has been blocked
|
|
|
- result = ""
|
|
|
+ result = "The ticket has been blocked."
|
|
|
case .EXCEPTION_TICKET_HAS_BEEN_CREATED: // 当前票据已创建订单
|
|
|
- result = ""
|
|
|
+ result = "The current ticket has created an order."
|
|
|
case .EXCEPTION_USER_IS_NOT_EDUCATION_USER: // 用户不是教育用户
|
|
|
- result = ""
|
|
|
+ result = "The user is not an educational user."
|
|
|
case .EXCEPTION_USER_HAS_EDUCATION: // 用户近一年有教育购买订单
|
|
|
- result = ""
|
|
|
+ result = "The user has education purchase orders in the past year."
|
|
|
case .EXCEPTION_USER_CANNOT_BUY_PREMIUM: // 用户已有标准版订阅,无法购买高级版
|
|
|
- result = ""
|
|
|
+ result = "The user already has a PDF Reader Pro Standard Plan and cannot purchase the Advance Plan."
|
|
|
case .EXCEPTION_USER_CANNOT_BUY_VIP: // 用户已有高级版订阅,无法购买标准版
|
|
|
- result = ""
|
|
|
+ result = "The user already has a PDF Reader Pro Advance Plan and cannot purchase the Standard Plan."
|
|
|
case .EXCEPTION_USER_CANNOT_UPGRADE_VIP: // 买断用户无法升级为标准版
|
|
|
- result = ""
|
|
|
+ result = "The Permanent Plan user cannot upgrade to the Standard Plan."
|
|
|
case .EXCEPTION_COUPON_NOT_EXISTS: // 优惠券不存在
|
|
|
- result = ""
|
|
|
+ result = "The coupon code does not exist."
|
|
|
case .EXCEPTION_COUPONTYPE_ERROR: // 优惠券类型错误
|
|
|
- result = ""
|
|
|
+ result = "Wrong coupon code type."
|
|
|
case .EXCEPTION_COUPON_PRODUCT_ERROR: // 优惠券关联产品错误
|
|
|
- result = ""
|
|
|
+ result = "Coupon-associated product error."
|
|
|
case .EXCEPTION_COUPON_INVALID: // 优惠券已失效
|
|
|
- result = ""
|
|
|
+ result = "The coupon code has expired."
|
|
|
case .EXCEPTION_PRODUCT_NOT_EXIST: // 产品不存在
|
|
|
- result = ""
|
|
|
+ result = "The product does not exist."
|
|
|
case .EXCEPTION_MSG_CONTACT_US: //请联系我们获取最新折扣
|
|
|
- result = ""
|
|
|
+ result = "Please get in touch with us for the latest discounts."
|
|
|
case .EXCEPTION_MSG_APP_STORE_TRANSACTION_ID_VALIDATION_FAILED: // 验证苹果交易失败
|
|
|
- result = ""
|
|
|
+ result = "Verification of Apple's Transaction failed."
|
|
|
case .EXCEPTION_MSG_GOOGLE_STORE_TRANSACTION_ID_VALIDATION_FAILED: // 验证谷歌交易失败
|
|
|
- result = ""
|
|
|
+ result = "Verification of Google's Transaction failed."
|
|
|
case .EXCEPTION_PRICE_ERROR: // 价格错误
|
|
|
- result = ""
|
|
|
+ result = "Price error."
|
|
|
case .EXCEPTION_MSG_ORDER_CREATE_FAILED: // 订单创建失败
|
|
|
- result = ""
|
|
|
+ result = "Order creation failed."
|
|
|
case .USER_ALREADY_SUBSCRIBED_PLAN: // 该用户已经是PDF Reader Pro订阅版会员,确定再赠送吗
|
|
|
- result = ""
|
|
|
+ result = "This user is already a subscription member of PDF Reader Pro. Are you sure you want to share benefits?"
|
|
|
case .USER_ALREADY_SUBSCRIBED_PACKAGE: // 该用户已经是PDF Reader Pro永久版会员,无需再赠送哦
|
|
|
- result = ""
|
|
|
+ result = "This user is already a permanent member of PDF Reader Pro. You don't need to share benefits anymore."
|
|
|
case .EXCEPTION_MSG_USER_NOT_EXIST: //用户不存在
|
|
|
- result = ""
|
|
|
+ result = "User does not exist."
|
|
|
case .EXCEPTION_USER_ALREADY_LOTTERY: // 用户已经抽过奖啦
|
|
|
- result = ""
|
|
|
+ result = "The user already has a prize draw!"
|
|
|
case .UNKNOWN:
|
|
|
result = "UNKNOWN"
|
|
|
break;
|