Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,20 @@
"noAccount": "Don't have an account? ",
"signUp": "Sign up",
"signIn": "Sign in",
"orContinueWith": "OR CONTINUE WITH"
"orContinueWith": "OR CONTINUE WITH",
"email": "Email",
"emailPlaceholder": "[email protected]",
"password": "Password"
},
"SignUp": {
"title": "Create an account",
"titleAdmin": "Create an Admin Account",
"signIn": "Sign in",
"email": "Email",
"emailPlaceholder": "[email protected]",
"name": "Name",
"namePlaceholder": "John Doe",
"password": "Password",
"description": "Sign up to your account",
"signUpDescription": "Start your journey with us",
"signUpDescriptionAdmin": "Welcome first user! You will be the admin of the system.",
Expand All @@ -180,12 +187,23 @@
"step1": "Start your journey with us by entering your email address",
"step2": "I'll use this name when we chat",
"step3": "Create a strong password to secure your account",
"stepProgress": "Step {current} of {total}",
"signUp": "Sign Up",
"invalidEmail": "Invalid email address",
"emailAlreadyExists": "Email already exists",
"nameRequired": "Name is required",
"passwordRequired": "Password is required",
"createAccount": "Create account"
"createAccount": "Create account",
"passwordHintLength": "8-20 characters",
"passwordHintLetter": "At least one letter",
"passwordHintNumber": "At least one number"
},
"Error": {
"title": "Auth Error",
"signupDisabled": "Signup is disabled",
"unauthorized": "Authentication required",
"unknownError": "Unknown error",
"goToHome": "Go to home"
},
"Intro": {
"description": "Welcome to better-chatbot. Sign in to experience our AI-powered conversational tools."
Expand Down
26 changes: 24 additions & 2 deletions messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,43 @@
"noAccount": "¿No tienes una cuenta?",
"signUp": "Registrarse",
"signIn": "Iniciar sesión",
"orContinueWith": "O CONTINÚA CON"
"orContinueWith": "O CONTINÚA CON",
"email": "Correo electrónico",
"emailPlaceholder": "[email protected]",
"password": "Contraseña"
},
"SignUp": {
"title": "Crear una cuenta",
"titleAdmin": "Crear una cuenta de administrador",
"signIn": "Iniciar sesión",
"email": "Correo electrónico",
"emailPlaceholder": "[email protected]",
"name": "Nombre",
"namePlaceholder": "Juan Pérez",
"password": "Contraseña",
"description": "Regístrate en tu cuenta",
"signUpDescription": "Comienza tu viaje con nosotros",
"signUpDescriptionAdmin": "¡Bienvenido, primer usuario! Serás el administrador del sistema.",
"step1": "Comienza tu viaje con nosotros ingresando tu dirección de correo electrónico",
"step2": "Usaré este nombre cuando charlemos",
"step3": "Crea una contraseña segura para proteger tu cuenta",
"stepProgress": "Paso {current} de {total}",
"signUp": "Registrarse",
"invalidEmail": "Dirección de correo electrónico inválida",
"emailAlreadyExists": "El correo electrónico ya existe",
"nameRequired": "El nombre es obligatorio",
"passwordRequired": "La contraseña es obligatoria",
"createAccount": "Crear cuenta"
"createAccount": "Crear cuenta",
"passwordHintLength": "8-20 caracteres",
"passwordHintLetter": "Al menos una letra",
"passwordHintNumber": "Al menos un número"
},
"Error": {
"title": "Error de autenticación",
"signupDisabled": "El registro está deshabilitado",
"unauthorized": "Se requiere autenticación",
"unknownError": "Error desconocido",
"goToHome": "Ir al inicio"
},
"Intro": {
"description": "Bienvenido a better-chatbot. Inicia sesión para experimentar nuestras herramientas conversacionales impulsadas por IA."
Expand Down
26 changes: 24 additions & 2 deletions messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,43 @@
"noAccount": "Vous n'avez pas de compte ?",
"signUp": "S'inscrire",
"signIn": "Se connecter",
"orContinueWith": "OU CONTINUER AVEC"
"orContinueWith": "OU CONTINUER AVEC",
"email": "E-mail",
"emailPlaceholder": "[email protected]",
"password": "Mot de passe"
},
"SignUp": {
"title": "Créer un compte",
"titleAdmin": "Créer un compte administrateur",
"signIn": "Se connecter",
"email": "E-mail",
"emailPlaceholder": "[email protected]",
"name": "Nom",
"namePlaceholder": "Jean Dupont",
"password": "Mot de passe",
"description": "Inscrivez-vous à votre compte",
"signUpDescription": "Commencez votre parcours avec nous",
"signUpDescriptionAdmin": "Bienvenue, premier utilisateur ! Vous serez l'administrateur du système.",
"step1": "Commencez votre parcours avec nous en saisissant votre adresse e-mail",
"step2": "J'utiliserai ce nom quand nous discuterons",
"step3": "Créez un mot de passe fort pour sécuriser votre compte",
"stepProgress": "Étape {current} sur {total}",
"signUp": "S'inscrire",
"invalidEmail": "Adresse e-mail invalide",
"emailAlreadyExists": "L'e-mail existe déjà",
"nameRequired": "Le nom est requis",
"passwordRequired": "Le mot de passe est requis",
"createAccount": "Créer un compte"
"createAccount": "Créer un compte",
"passwordHintLength": "8-20 caractères",
"passwordHintLetter": "Au moins une lettre",
"passwordHintNumber": "Au moins un chiffre"
},
"Error": {
"title": "Erreur d'authentification",
"signupDisabled": "L'inscription est désactivée",
"unauthorized": "Authentification requise",
"unknownError": "Erreur inconnue",
"goToHome": "Aller à l'accueil"
},
"Intro": {
"description": "Bienvenue sur better-chatbot. Connectez-vous pour découvrir nos outils de conversation alimentés par l'IA."
Expand Down
26 changes: 24 additions & 2 deletions messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,43 @@
"noAccount": "アカウントをお持ちでない方は",
"signUp": "サインアップ",
"signIn": "サインイン",
"orContinueWith": "または次で続行"
"orContinueWith": "または次で続行",
"email": "メールアドレス",
"emailPlaceholder": "[email protected]",
"password": "パスワード"
},
"SignUp": {
"title": "アカウントを作成",
"titleAdmin": "管理者アカウントを作成",
"signIn": "サインイン",
"email": "メールアドレス",
"emailPlaceholder": "[email protected]",
"name": "名前",
"namePlaceholder": "山田太郎",
"password": "パスワード",
"description": "アカウントにサインアップ",
"signUpDescription": "私たちと一緒に始めましょう",
"signUpDescriptionAdmin": "ようこそ、最初のユーザーです!あなたがシステムの管理者になります。",
"step1": "メールアドレスを入力して、私たちとの旅を始めましょう",
"step2": "チャット時にこの名前を使用します",
"step3": "アカウントを保護するための強力なパスワードを作成してください",
"stepProgress": "ステップ {current} / {total}",
"signUp": "サインアップ",
"invalidEmail": "無効なメールアドレス",
"emailAlreadyExists": "メールアドレスが既に存在します",
"nameRequired": "名前が必要です",
"passwordRequired": "パスワードが必要です",
"createAccount": "アカウントを作成"
"createAccount": "アカウントを作成",
"passwordHintLength": "8〜20文字",
"passwordHintLetter": "少なくとも1つの英字",
"passwordHintNumber": "少なくとも1つの数字"
},
"Error": {
"title": "認証エラー",
"signupDisabled": "サインアップは無効です",
"unauthorized": "認証が必要です",
"unknownError": "不明なエラー",
"goToHome": "ホームへ"
},
"Intro": {
"description": "better-chatbot へようこそ。AIを活用した会話ツールを体験するためにサインインしてください。"
Expand Down
26 changes: 24 additions & 2 deletions messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,43 @@
"noAccount": "계정이 없습니까?",
"signUp": "회원가입",
"signIn": "로그인",
"orContinueWith": "다른 계정으로 계속하기"
"orContinueWith": "다른 계정으로 계속하기",
"email": "이메일",
"emailPlaceholder": "[email protected]",
"password": "비밀번호"
},
"SignUp": {
"title": "회원가입",
"titleAdmin": "관리자 계정 생성",
"signIn": "로그인",
"email": "이메일",
"emailPlaceholder": "[email protected]",
"name": "이름",
"namePlaceholder": "홍길동",
"password": "비밀번호",
"description": "계정에 회원가입하여 계속합니다",
"signUpDescription": "우리와 함께 여정을 시작하세요",
"signUpDescriptionAdmin": "첫 번째 사용자를 환영합니다! 시스템 관리자가 됩니다.",
"step1": "우리와 함께 여정을 시작하기 위해 이메일 주소를 입력하세요",
"step2": "우리와 대화할 때 이 이름을 사용할 거예요",
"step3": "강력한 비밀번호를 만들어 계정을 보호하세요",
"stepProgress": "단계 {current} / {total}",
"signUp": "회원가입",
"invalidEmail": "이메일 주소가 유효하지 않습니다",
"emailAlreadyExists": "이메일이 이미 존재합니다",
"nameRequired": "이름이 필요합니다",
"passwordRequired": "비밀번호가 필요합니다",
"createAccount": "계정 생성"
"createAccount": "계정 생성",
"passwordHintLength": "8-20자",
"passwordHintLetter": "최소 1개의 문자",
"passwordHintNumber": "최소 1개의 숫자"
},
"Error": {
"title": "인증 오류",
"signupDisabled": "회원가입이 비활성화되었습니다",
"unauthorized": "인증이 필요합니다",
"unknownError": "알 수 없는 오류",
"goToHome": "홈으로 이동"
},
"Intro": {
"description": "better-chatbot에 오신 것을 환영합니다. 우리의 AI 기반 대화 도구를 경험하세요."
Expand Down
22 changes: 20 additions & 2 deletions messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,20 @@
"noAccount": "Har du ikke en konto? ",
"signUp": "Registrer deg",
"signIn": "Logg inn",
"orContinueWith": "ELLER FORTSETT MED"
"orContinueWith": "ELLER FORTSETT MED",
"email": "E-post",
"emailPlaceholder": "[email protected]",
"password": "Passord"
},
"SignUp": {
"title": "Opprett en konto",
"titleAdmin": "Opprett en administratorkonto",
"signIn": "Logg inn",
"email": "E-post",
"emailPlaceholder": "[email protected]",
"name": "Navn",
"namePlaceholder": "Ola Nordmann",
"password": "Passord",
"description": "Registrer deg for kontoen din",
"signUpDescription": "Start reisen din med oss",
"signUpDescriptionAdmin": "Velkommen, første bruker! Du vil bli administrator for systemet.",
Expand All @@ -180,12 +187,23 @@
"step1": "Start reisen din med oss ved å skrive inn e-postadressen din",
"step2": "Jeg bruker dette navnet når vi chatter",
"step3": "Opprett et sterkt passord for å sikre kontoen din",
"stepProgress": "Steg {current} av {total}",
"signUp": "Registrer deg",
"invalidEmail": "Ugyldig e-postadresse",
"emailAlreadyExists": "E-postadressen finnes allerede",
"nameRequired": "Navn er påkrevd",
"passwordRequired": "Passord er påkrevd",
"createAccount": "Opprett konto"
"createAccount": "Opprett konto",
"passwordHintLength": "8-20 tegn",
"passwordHintLetter": "Minst én bokstav",
"passwordHintNumber": "Minst ett tall"
},
"Error": {
"title": "Autentiseringsfeil",
"signupDisabled": "Registrering er deaktivert",
"unauthorized": "Autentisering kreves",
"unknownError": "Ukjent feil",
"goToHome": "Gå til forsiden"
},
"Intro": {
"description": "Velkommen til better-chatbot. Logg inn for å oppleve våre AI-drevne samtaleverktøy."
Expand Down
26 changes: 24 additions & 2 deletions messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,43 @@
"noAccount": "没有账户?",
"signUp": "注册",
"signIn": "登录",
"orContinueWith": "或继续使用"
"orContinueWith": "或继续使用",
"email": "邮箱",
"emailPlaceholder": "[email protected]",
"password": "密码"
},
"SignUp": {
"title": "创建账户",
"titleAdmin": "创建管理员账户",
"signIn": "登录",
"email": "邮箱",
"emailPlaceholder": "[email protected]",
"name": "姓名",
"namePlaceholder": "张三",
"password": "密码",
"description": "注册您的账户",
"signUpDescription": "与我们一起开始您的旅程",
"signUpDescriptionAdmin": "欢迎,第一位用户!您将成为系统管理员。",
"step1": "通过输入您的邮箱地址开始您的旅程",
"step2": "我会在聊天时使用这个名字",
"step3": "创建一个强密码来保护您的账户",
"stepProgress": "第 {current} 步,共 {total} 步",
"signUp": "注册",
"invalidEmail": "无效的邮箱地址",
"emailAlreadyExists": "邮箱已存在",
"nameRequired": "姓名是必需的",
"passwordRequired": "密码是必需的",
"createAccount": "创建账户"
"createAccount": "创建账户",
"passwordHintLength": "8-20个字符",
"passwordHintLetter": "至少一个字母",
"passwordHintNumber": "至少一个数字"
},
"Error": {
"title": "认证错误",
"signupDisabled": "注册已禁用",
"unauthorized": "需要认证",
"unknownError": "未知错误",
"goToHome": "返回首页"
},
"Intro": {
"description": "欢迎来到 MCP 聊天机器人。登录以体验我们的 AI 驱动的对话工具。"
Expand Down
32 changes: 18 additions & 14 deletions src/app/api/auth/error/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,26 @@ import {
CardTitle,
} from "ui/card";
import LightRays from "ui/light-rays";

const convertErrorToMessage = (error: string) => {
switch (error) {
case "signup_disabled":
return "Signup is disabled";
case "UNAUTHORIZED":
return "Authentication required";
default:
return error;
}
};
import { getTranslations } from "next-intl/server";

export default async function ErrorPage({
searchParams,
}: {
searchParams: Promise<{ error?: string }>;
}) {
const { error } = await searchParams;
const t = await getTranslations("Auth.Error");

const convertErrorToMessage = (error: string) => {
switch (error) {
case "signup_disabled":
return t("signupDisabled");
case "UNAUTHORIZED":
return t("unauthorized");
default:
return error;
}
};

return (
<div className="w-full h-screen flex items-center justify-center relative">
Expand All @@ -33,17 +35,19 @@ export default async function ErrorPage({
</div>
<Card className="w-sm z-10">
<CardHeader>
<CardTitle className="flex items-center gap-2">Auth Error</CardTitle>
<CardTitle className="flex items-center gap-2">
{t("title")}
</CardTitle>
<CardDescription>
{convertErrorToMessage(error ?? "Unknown error")}
{convertErrorToMessage(error ?? t("unknownError"))}
</CardDescription>
</CardHeader>
<CardContent className="flex justify-center">
<Link
className="text-sm text-muted-foreground text-center underline"
href="/"
>
Go to home
{t("goToHome")}
</Link>
</CardContent>
</Card>
Expand Down
Loading
Loading