Added persian error messages (only for auth for now)

This commit is contained in:
2026-07-31 20:00:46 +03:30
parent 77cf420c33
commit 2cada1eba0
3 changed files with 15 additions and 15 deletions

View File

@@ -15,15 +15,15 @@ export enum UserAuthErrorCode {
}
const messages: Record<UserAuthErrorCode, string> = {
[UserAuthErrorCode.USER_NOT_FOUND]: "User not found",
[UserAuthErrorCode.OTP_REQUIRED]: "Please request an OTP first",
[UserAuthErrorCode.OTP_EXPIRED]: "OTP has expired",
[UserAuthErrorCode.OTP_INVALID]: "OTP is invalid",
[UserAuthErrorCode.USER_NOT_FOUND]: "کاربر یافت نشد",
[UserAuthErrorCode.OTP_REQUIRED]: "ابتدا درخواست کد یکبار مصرف دهید",
[UserAuthErrorCode.OTP_EXPIRED]: "کد یکبار مصرف منقضی شده است",
[UserAuthErrorCode.OTP_INVALID]: "کد یکبار مصرف نامعتبر است",
[UserAuthErrorCode.OTP_REQUEST_TOO_SOON]:
"Wait for expiry time to finish before requesting another OTP",
[UserAuthErrorCode.LINK_NOT_FOUND]: "Linked SMS token was not found",
"لطفاً تا انقضای کد فعلی صبر کنید",
[UserAuthErrorCode.LINK_NOT_FOUND]: "لینک پیامکی یافت نشد",
[UserAuthErrorCode.LINK_MOBILE_MISMATCH]:
"This mobile number is not allowed to use this SMS link",
"این شماره موبایل مجاز به استفاده از این لینک نیست",
};
export function userAuthErrorBody(code: UserAuthErrorCode) {