diff --git a/frontend/components/navbar.tsx b/frontend/components/navbar.tsx
deleted file mode 100644
index 00281f4..0000000
--- a/frontend/components/navbar.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-import {
- Navbar as NextUINavbar,
- NavbarContent,
- NavbarMenuToggle,
- NavbarBrand,
- NavbarItem,
- Kbd,
- Link as NextUiLink,
- Input,
-} from "@nextui-org/react";
-import { Link } from "@/src/navigation";
-import { siteConfig } from "@/config/site";
-import { ThemeSwitch } from "@/components/theme-switch";
-import { GithubIcon, SearchIcon } from "@/components/icons";
-
-import Image from "next/image";
-
-export const Navbar = () => {
- const searchInput = (
-
- K
-
- }
- labelPlacement="outside"
- placeholder="Search..."
- startContent={
-
- }
- type="search"
- />
- );
-
- return (
-
-
-
-
-
- Test Case Manager
-
-
-
- {siteConfig.navItems.map((item) => (
-
-
- {item.label}
-
-
- ))}
-
-
-
-
-
-
-
-
-
-
- {searchInput}
-
-
-
-
-
-
-
-
-
-
- );
-};
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 92147ed..139845f 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -2,8 +2,22 @@
"Index": {
"title": "Hello world!"
},
- "ProjectPage": {
- "projects": "Projects",
- "newProject": "New Project"
+ "Projects": {
+ "projects": "プロジェクト",
+ "project": "プロジェクト",
+ "new_project": "新規プロジェクト",
+ "edit_project": "プロジェクトの編集",
+ "delete_project": "プロジェクトの削除",
+ "id": "ID",
+ "name": "名前",
+ "detail": "詳細",
+ "last_update": "最終更新",
+ "actions": "アクション",
+ "project_name": "プロジェクト名",
+ "project_detail": "プロジェクト詳細",
+ "close": "閉じる",
+ "create": "作成",
+ "update": "作成",
+ "please_enter": "プロジェクト名を入力してください"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json
index 8349a16..b194e49 100644
--- a/frontend/messages/ja.json
+++ b/frontend/messages/ja.json
@@ -2,8 +2,22 @@
"Index": {
"title": "はろー"
},
- "ProjectPage": {
- "projects": "プロジェクト",
- "newProject": "プロジェクトの作成"
+ "Projects": {
+ "projects": "Projects",
+ "project": "Project",
+ "new_project": "New Project",
+ "edit_project": "Edit Project",
+ "delete_project": "Delete Project",
+ "id": "ID",
+ "name": "Name",
+ "detail": "Detail",
+ "last_update": "Last update",
+ "actions": "Actions",
+ "project_name": "Project Name",
+ "project_detail": "Project Detail",
+ "close": "Close",
+ "create": "Create",
+ "update": "Update",
+ "please_enter": "Please enter project name"
}
}
diff --git a/frontend/src/app/[locale]/Header.tsx b/frontend/src/app/[locale]/Header.tsx
new file mode 100644
index 0000000..50a40ad
--- /dev/null
+++ b/frontend/src/app/[locale]/Header.tsx
@@ -0,0 +1,65 @@
+import {
+ Navbar as NextUINavbar,
+ NavbarContent,
+ NavbarMenuToggle,
+ NavbarBrand,
+ NavbarItem,
+ Link as NextUiLink
+} from "@nextui-org/react";
+import { useTranslations } from "next-intl";
+import { siteConfig } from "@/config/site";
+import { Link } from "@/src/navigation";
+import LangSwitch from "./LangSwitch";
+import { ThemeSwitch } from "@/components/theme-switch";
+import { GithubIcon } from "@/components/icons";
+
+import Image from "next/image";
+
+export default function Header(params: { locale: string }) {
+ const t = useTranslations("Index");
+
+ return (
+
+
+
+
+
+ Test Case Manager
+
+
+ {siteConfig.navItems.map((item) => (
+
+
+ {item.label}
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/frontend/src/app/[locale]/LangSwitch.tsx b/frontend/src/app/[locale]/LangSwitch.tsx
new file mode 100644
index 0000000..8cde304
--- /dev/null
+++ b/frontend/src/app/[locale]/LangSwitch.tsx
@@ -0,0 +1,44 @@
+"use client";
+import {
+ Button,
+ DropdownTrigger,
+ Dropdown,
+ DropdownMenu,
+ DropdownItem,
+} from "@nextui-org/react";
+import { Globe } from "lucide-react";
+import { useRouter } from "@/src/navigation";
+
+const locales = [
+ { code: "en", name: "English" },
+ { code: "ja", name: "日本語" },
+];
+
+export default function LangSwitch(params: { locale: string }) {
+ const router = useRouter();
+
+ async function changeLocale(locale: string) {
+ router.push("/", { locale: locale });
+ }
+
+ return (
+
+
+ }>
+ {locales.find((locale) => locale.code === params.locale)?.name ||
+ params.locale}
+
+
+
+ {locales.map((entry) => (
+ changeLocale(entry.code)}
+ >
+ {entry.name}
+
+ ))}
+
+
+ );
+}
diff --git a/frontend/src/app/[locale]/layout.tsx b/frontend/src/app/[locale]/layout.tsx
index 28b3d87..97a35ff 100644
--- a/frontend/src/app/[locale]/layout.tsx
+++ b/frontend/src/app/[locale]/layout.tsx
@@ -3,7 +3,7 @@ import { Metadata } from "next";
import { siteConfig } from "@/config/site";
import { fontSans } from "@/config/fonts";
import { Providers } from "./providers";
-import { Navbar } from "@/components/navbar";
+import Header from "./Header";
import clsx from "clsx";
export const metadata: Metadata = {
@@ -41,7 +41,7 @@ export default function RootLayout({
>
-
+
{children}
{/*