diff --git a/messages/en.json b/messages/en.json index 1b0553d..96e7a8b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -7,6 +7,69 @@ "Sign up": "Sign up" }, "sign-up-form": { - "title": "Hello world!" + "title": "Hello world!", + "enter-your-email-below-to-sign-up-to-your-account": "enter-your-email-below-to-sign-up-to-your-account", + "sign-up-to-your-account": "Sign up to your account", + "or": "Or", + "already-have-an-account": "Already have an account?", + "sign-in": "Sign in" + }, + "appearance-settings": { + "choose-a-theme": "Choose a theme", + "toggle-theme": "Toggle theme", + "light": "Light", + "dark": "Dark", + "system": "System" + }, + "avatar-button": { + "log-in": "Log In", + "account": "Account", + "log-out": "Log out" + }, + "email": "Email", + "password": "Password", + "GithubSignInForm": { + "continue-with-github": "Continue with GitHub" + }, + "nav": { + "platform": "Platform", + "projects": "Projects", + "more": "More", + "view-project": "View Project", + "share-project": "Share Project", + "delete-project": "Delete Project", + "upgrade-to-pro": "Upgrade to Pro", + "billing": "Billing", + "notifications": "Notifications", + "home": "Home" + }, + "run-code": { + "run": "Run", + "run-code": "Run Code", + "running": "Running..." + }, + "settings": { + "settings": "Settings", + "appearance": "Appearance", + "language-and-region": "Language & region", + "code-editor": "Code Editor", + "advanced": "Advanced", + "customize-your-settings-here": "Customize your settings here." + }, + "submissions": { + "index": "Index", + "status": "Status", + "language": "Language", + "time": "Time", + "memory": "Memory", + "submitted": "Submitted" + }, + "teams": { + "teams": "Teams", + "add-team": "Add team" + }, + "test": { + "case": "Case", + "failed-to-submit-the-form-please-try-again": "Failed to submit the form. Please try again." } -} \ No newline at end of file +} diff --git a/messages/zh.json b/messages/zh.json index c3baa96..f90e32c 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -7,6 +7,69 @@ "Sign up": "注册" }, "sign-up-form": { - "title": "Hello world!" + "title": "Hello world!", + "already-have-an-account": "已经有账号了?", + "enter-your-email-below-to-sign-up-to-your-account": "在下面输入您的电子邮件以注册您的帐户", + "or": "或", + "sign-in": "登录", + "sign-up-to-your-account": "注册您的帐户" + }, + "appearance-settings": { + "dark": "暗", + "light": "亮", + "system": "系统", + "choose-a-theme": "选择一个主题", + "toggle-theme": "切换主题" + }, + "nav": { + "platform": "平台", + "projects": "项目", + "share-project": "共享项目", + "upgrade-to-pro": "升级到专业版", + "view-project": "查看项目", + "more": "更多", + "notifications": "通知", + "billing": "账务", + "delete-project": "删除项目", + "home": "主页" + }, + "GithubSignInForm": { + "continue-with-github": "继续使用GitHub" + }, + "avatar-button": { + "account": "账户", + "log-in": "登录", + "log-out": "注销" + }, + "password": "密码", + "run-code": { + "run-code": "运行代码", + "run": "运行", + "running": "正在运行。。。" + }, + "submissions": { + "status": "状态", + "submitted": "提交", + "time": "时间", + "language": "语言", + "memory": "内存", + "index": "指数" + }, + "teams": { + "teams": "团队", + "add-team": "添加团队" + }, + "email": "电子邮件", + "settings": { + "advanced": "高级", + "appearance": "外貌", + "code-editor": "代码编辑器", + "customize-your-settings-here": "在此处自定义您的设置。", + "language-and-region": "语言和地区", + "settings": "设置" + }, + "test": { + "case": "样例", + "failed-to-submit-the-form-please-try-again": "提交失败。请重试。" } -} \ No newline at end of file +} diff --git a/src/components/appearance-settings.tsx b/src/components/appearance-settings.tsx index ad5c0a7..6513a92 100644 --- a/src/components/appearance-settings.tsx +++ b/src/components/appearance-settings.tsx @@ -1,9 +1,11 @@ +//appearance-settings "use client"; import Image from "next/image"; import { useTheme } from "next-themes"; import { CheckIcon, MinusIcon } from "lucide-react"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; +import { useTranslations } from 'next-intl'; const items = [ { value: "system", label: "System", image: "/ui-system.png" }, @@ -13,11 +15,12 @@ const items = [ export default function AppearanceSettings() { const { theme, setTheme } = useTheme(); + const t = useTranslations('appearance-settings'); return (