diff --git a/.eslintrc.json b/.eslintrc.json index 3722418..798d8cb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": ["next/core-web-vitals", "next/typescript"] + "extends": ["next/core-web-vitals", "next/typescript"], + "rules": { + "@typescript-eslint/no-unused-vars": "off" + } } diff --git a/README.md b/README.md index fbe75bf..17727ca 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ - [ ] 添加更多工作类型模板 - [ ] 支持数据导出功能 - [ ] 添加历史记录功能 -- [ ] 支持多语言 +- [x] 支持多语言 - [ ] 添加更多可视化图表 ## 贡献指南 diff --git a/app/layout.tsx b/app/layout.tsx index 289565b..36b0b5f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import localFont from "next/font/local"; import "./globals.css"; +import { LanguageProvider } from "@/components/LanguageContext"; const geistSans = localFont({ src: "./fonts/GeistVF.woff", @@ -14,8 +15,17 @@ const geistMono = localFont({ }); export const metadata: Metadata = { - title: "这b班上得值不值", - description: "这b班上得值不值", + title: { + default: "这b班上得值不值", + template: "%s | 这b班上得值不值" + }, + alternates: { + languages: { + "en-US": "/en", + "zh-CN": "/", + }, + }, + description: "这b班上得值不值 - 计算你的工作性价比 | Is This Job Worth It? - Calculate your job's value", verification: { google: "_OQGiIpYz87USAsgJV2C07-JJhQ8myV_4GoM1kDjFic", }, @@ -36,7 +46,9 @@ export default function RootLayout({ - {children} + + {children} +