- Prompt: {bot.latest_version.prompt}
+ {t("chatbot_view.prompt")}: {bot.latest_version.prompt}
- Current Version: {bot.latest_version.version_number}
+ {t("chatbot_view.current_ver")}:{" "}
+ {bot.latest_version.version_number}
@@ -166,7 +171,7 @@ export default function ChatbotViewPage() {
}
>
- Like
+ {t("like")}
- Report
+ {t("report")}
@@ -222,7 +227,7 @@ export default function ChatbotViewPage() {
}
>
- Edit
+ {t("edit")}
)}
-
diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx
index 9e25905..ff69f46 100644
--- a/client/src/pages/Dashboard.tsx
+++ b/client/src/pages/Dashboard.tsx
@@ -10,11 +10,12 @@ import { Skeleton } from "@/components/ui/skeleton";
import { ChatbotCard } from "@/components/ChatbotCard";
import BotsLoading from "@/components/BotsLoading";
import { imageSrc, welcomeMessages } from "@/lib/utils";
+import { useTranslation } from "react-i18next";
export default function DashboardPage() {
const { user, loading } = useAuth();
const createChatbotModal = useCreateChatbotModal();
-
+ const { t } = useTranslation();
const {
data: botsData,
isLoading: botsLoading,
@@ -56,7 +57,7 @@ export default function DashboardPage() {
) : (
- Welcome 👋, {user.name}!
+ {t("dashboard.welcome")} 👋, {user.name}!
)}
@@ -65,7 +66,9 @@ export default function DashboardPage() {
-
Chatbot of the Day
+
+ {t("dashboard.chatbot_of_day")}
+
{trendsLoading ? (
<>
@@ -88,7 +91,9 @@ export default function DashboardPage() {
-
Message of the Day
+
+ {t("dashboard.message_of_day")}
+
-
Tip of the Day
+
+ {t("dashboard.tip_of_day")}
+
"{tip}"
@@ -107,7 +114,9 @@ export default function DashboardPage() {
-
Image of the Day
+
+ {t("dashboard.image_of_day")}
+
{trendsLoading ? (
<>
@@ -133,7 +142,9 @@ export default function DashboardPage() {
-
Your Chatbots
+
+ {t("dashboard.your_chatbots")}
+
{botsLoading ? (
@@ -149,7 +160,7 @@ export default function DashboardPage() {
className="h-72 max-w-sm rounded-lg border-[10px] border-dashed shadow flex items-center justify-center hover:cursor-pointer hover:border-primary/10 transition-colors"
>
- New Chatbot
+ {t("dashboard.new_chatbot")}
) : (
@@ -159,7 +170,7 @@ export default function DashboardPage() {
className="h-72 max-w-sm rounded-lg border-[10px] border-dashed shadow flex items-center justify-center hover:cursor-pointer hover:border-primary/10 transition-colors"
>
- New Chatbot
+ {t("dashboard.new_chatbot")}
{botsData?.my_bots!.map((bot) => (
@@ -173,7 +184,9 @@ export default function DashboardPage() {
)}
-
System Chatbots
+
+ {t("dashboard.system_chatbots")}
+
{systemBotsLoading ? (
@@ -184,7 +197,7 @@ export default function DashboardPage() {
) : systemBotsData && systemBotsData?.system_bots!.length == 0 ? (
-
No chatbots!
+
{t("dashboard.no")}
) : (
diff --git a/client/src/pages/Hub.tsx b/client/src/pages/Hub.tsx
index 32752b9..1e8bb0c 100644
--- a/client/src/pages/Hub.tsx
+++ b/client/src/pages/Hub.tsx
@@ -16,9 +16,11 @@ import { useQuery } from "@tanstack/react-query";
import { useState } from "react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { useTranslation } from "react-i18next";
export default function HubPage() {
const [searchTerm, setSearchTerm] = useState("");
+ const { t } = useTranslation();
const [selectedCategory, setSelectedCategory] = useState("All");
const {
data: botsData,
@@ -55,7 +57,7 @@ export default function HubPage() {
@@ -106,7 +110,9 @@ export default function HubPage() {
/>
))
) : (
-
No bots available.
+
+ {t("hub_page.no_bots")}
+
)}
@@ -128,7 +134,7 @@ export default function HubPage() {
))
) : (
- No Images available.
+ {t("hub_page.no_images")}
)}
diff --git a/client/src/pages/Landing.tsx b/client/src/pages/Landing.tsx
index 205add8..a2b0ef8 100644
--- a/client/src/pages/Landing.tsx
+++ b/client/src/pages/Landing.tsx
@@ -3,68 +3,69 @@ import Navbar from "../components/Navbar";
import Separator from "../components/Separator";
import Footer from "@/components/Footer";
import { useAuth } from "@/contexts/auth-context";
+import { useTranslation } from "react-i18next";
export default function LandingPage() {
const { user } = useAuth();
+ const { t } = useTranslation();
return (
<>
- Welcome to Bot Verse
+ {t("landing.top_heading")}
-
- Your hub for AI chatbots to solve queries effortlessly.
-
+ {t("landing.top_subheading")}
- Get Started
+ {t("landing.get_started")}
- About Bot Verse
-
- A platform for creating, sharing, and interacting with AI chatbots to
- enhance your productivity.
-
+
+ {t("landing.about_heading")}
+
+ {t("landing.about_subheading")}
- Features
+
+ {t("landing.feature_heading")}
+
-
Manage Your Chatbots
-
- Effortlessly create, update, or delete your chatbots all in one
- place.
-
+
+ {t("landing.f1_heading")}
+
+
{t("landing.f1_subheading")}
-
Share and Discover
-
- Show off your chatbots and explore others’ creations for
- inspiration.
-
+
+ {t("landing.f2_heading")}
+
+
{t("landing.f2_subheading")}
-
Chatbot Hub
-
Interact with multiple chatbots in one convenient location.
+
+ {t("landing.f3_heading")}
+
+
{t("landing.f3_subheading")}
{" "}
-
Helpful Chatbots
-
- Utilize our pre-made chatbots for quick solutions to common tasks.
-
+
+ {t("landing.f4_heading")}
+
+
{t("landing.f4_subheading")}
@@ -72,19 +73,20 @@ export default function LandingPage() {
- Open Source
+
+ {t("landing.contribute_heading")}
+
- Bot Verse is an open-source project.
+ {t("landing.contribute_subheading1")}
- Contribute to our development and join our growing community of
- contributors!
+ {t("landing.contribute_subheading2")}
- Contribute
+ {t("landing.contribute")}
diff --git a/client/src/pages/Leaderboard.tsx b/client/src/pages/Leaderboard.tsx
index 141bce4..03f63d0 100644
--- a/client/src/pages/Leaderboard.tsx
+++ b/client/src/pages/Leaderboard.tsx
@@ -4,8 +4,10 @@ import { Button } from "@/components/ui/button";
import { useNavigate } from "react-router-dom"; // Assuming you're using react-router for navigation
import { Skeleton } from "@/components/ui/skeleton";
import Navbar from "@/components/Navbar";
+import { useTranslation } from "react-i18next";
export default function LeaderboardPage() {
+ const { t } = useTranslation();
const { data, isLoading } = useQuery({
queryFn: () =>
fetchData({
@@ -40,8 +42,10 @@ export default function LeaderboardPage() {
// No data found, button redirects to dashboard
return (
-
No leaderboard data available.
-
+
{t("leaderboard_page.no")}
+
);
}
@@ -51,7 +55,9 @@ export default function LeaderboardPage() {
return (
-
Leaderboard
+
+ {t("navbar.leaderboard")}
+
{leaderboard.map((user, idx: number) => (
>({
@@ -63,10 +65,8 @@ export default function LoginPage() {
- Login to your account
-
- Use all new chatbots by other people like you.
-
+ {t("auth.login_title")}
+ {t("auth.login_subtitle")}
- Don't have an account.{" "}
+ {t("auth.dont_account")}{" "}
- create one
+ {t("auth.create_one")}
diff --git a/client/src/pages/MyChatbots.tsx b/client/src/pages/MyChatbots.tsx
index b11af04..0cad675 100644
--- a/client/src/pages/MyChatbots.tsx
+++ b/client/src/pages/MyChatbots.tsx
@@ -16,11 +16,13 @@ import {
} from "@/stores/modal-store";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Flag, Heart, Pencil, Send, Trash2 } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
export default function MyChatbotsPage() {
const { loading, user } = useAuth();
const qc = useQueryClient();
+ const { t } = useTranslation();
const deleteModal = useDeleteChatbotModal();
const updateModal = useUpdateChatbotModal();
const {
@@ -66,17 +68,19 @@ export default function MyChatbotsPage() {
- Analytics Summary
+ {t("analytics.title")}
- Total Likes:
+ {t("analytics.total_likes")}:
{totalLikes}
- Total Reports:
+
+ {t("analytics.total_reports")}:
+
{totalReports}
{topRankedBot && (
@@ -90,18 +94,22 @@ export default function MyChatbotsPage() {
{topRankedBot.latest_version.name.slice(0, 2).toUpperCase()}
- Top Ranked Bot
+
+ {t("analytics.top_ranked_bot")}
+
{topRankedBot.latest_version.name}
- Likes: {topRankedBot.likes}
+ {t("analytics.likes")}: {topRankedBot.likes}
)}
-
My Images
+
+ {t("analytics.my_chatbots")}
+
{botsLoading ? (
@@ -161,7 +169,7 @@ export default function MyChatbotsPage() {
}
>
- {chatbot.public ? "Unpublish" : "Publish"}
+ {chatbot.public ? t("unpublish") : t("publish")}
))
) : (
-
No Images available.
+
{t("no_bots")}
)}
diff --git a/client/src/pages/MyImages.tsx b/client/src/pages/MyImages.tsx
index efc5da7..0054ef2 100644
--- a/client/src/pages/MyImages.tsx
+++ b/client/src/pages/MyImages.tsx
@@ -14,12 +14,13 @@ import { useDeleteChatbotModal } from "@/stores/modal-store";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Flag, Heart, Send, Trash2 } from "lucide-react";
import { useMemo } from "react";
+import { useTranslation } from "react-i18next";
export default function MyImagesPage() {
const { loading, user } = useAuth();
const qc = useQueryClient();
const deleteModal = useDeleteChatbotModal();
-
+ const { t } = useTranslation();
const {
data: imagesData,
isLoading: imagesLoading,
@@ -69,33 +70,41 @@ export default function MyImagesPage() {
- Image Analytics
+ {t("analytics.title")}
- Total Likes:
+ {t("analytics.total_likes")}:
{totalLikes}
- Total Reports:
+
+ {t("analytics.total_reports")}:
+
{totalReports}
{topRankedImage && (
-
Top Image:
+
+ {t("analytics.top_ranked_image")}:
+
-
{topRankedImage.likes} Likes
+
+ {topRankedImage.likes} {t("analytics.likes")}
+
)}
-
My Images
+
+ {t("analytics.my_images")}
+
{imagesLoading ? (
@@ -143,7 +152,7 @@ export default function MyImagesPage() {
}
>
- {image.public ? "Unpublish" : "Publish"}
+ {image.public ? t("unpublish") : t("publish")}
))
) : (
-
No Images available.
+
{t("no_images")}
)}
diff --git a/client/src/pages/Profile.tsx b/client/src/pages/Profile.tsx
index 34c2e19..cd79447 100644
--- a/client/src/pages/Profile.tsx
+++ b/client/src/pages/Profile.tsx
@@ -24,11 +24,13 @@ import { Badge } from "@/components/ui/badge";
import { useEffect, useState } from "react";
import { Skeleton } from "@/components/ui/skeleton";
import { ImageCard } from "@/components/ImageCard";
+import { useTranslation } from "react-i18next";
export default function ProfilePage() {
const { username } = useParams();
const profileUpdateModal = useUpdateProfileModal();
const settingsModal = useSettingsModal();
+ const { t } = useTranslation();
const [userId, setUserId] = useState
(undefined);
const { user: currentUser, logout } = useAuth();
const { data, isLoading, isError, error } = useQuery({
@@ -89,7 +91,7 @@ export default function ProfilePage() {
{self && (
-
Profile
+
{t("navbar.profile")}
@@ -183,8 +185,8 @@ export default function ProfilePage() {
- Chatbots
- Images
+ {t("hub_page.chatbots")}
+ {t("hub_page.images")}
@@ -203,7 +205,7 @@ export default function ProfilePage() {
/>
))
) : (
-
No bots available.
+
{t("no_bots")}
)}
@@ -224,9 +226,7 @@ export default function ProfilePage() {
/>
))
) : (
-
- No Images available.
-
+ {t("no_images")}
)}
diff --git a/client/src/pages/Signup.tsx b/client/src/pages/Signup.tsx
index ae3cddd..6d550cd 100644
--- a/client/src/pages/Signup.tsx
+++ b/client/src/pages/Signup.tsx
@@ -28,9 +28,11 @@ import axios from "axios";
import { SERVER_URL } from "@/lib/utils";
import { useState } from "react";
import { Loader2 } from "lucide-react";
+import { useTranslation } from "react-i18next";
export default function SignupPage() {
const navigate = useNavigate();
+ const { t } = useTranslation();
const [loading, setLoading] = useState(false);
const form = useForm>({
resolver: zodResolver(signupSchema),
@@ -71,10 +73,8 @@ export default function SignupPage() {
- Create a new account
-
- Use all new chatbots by other people like you.
-
+ {t("auth.signup_title")}
+ {t("auth.signup_subtitle")}
- Already have an account{" "}
+ {t("auth.have_account")}{" "}
- login here
+ {t("auth.login")}
.