diff --git a/.vscode/settings.json b/.vscode/settings.json index 861b841..bfcdd11 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,8 +49,9 @@ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], ["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] ], - "i18n-ally.localesPaths": ["src/i18n", "src/i18n/locales"], - "i18n-ally.sourceLanguage": "en", - "i18n-ally.enabledFrameworks": ["i18next", "react"], - "i18n-ally.keystyle": "nested" + "i18n-ally.pathMatcher": "{locale}/{namespaces}.json", + "i18n-ally.namespace": true, + "i18n-ally.keystyle": "nested", + "i18n-ally.localesPaths": "locales", + "i18n-ally.displayLanguage": "zh-CN" } diff --git a/components.json b/components.json index 4dadb5a..680c2ac 100644 --- a/components.json +++ b/components.json @@ -4,7 +4,7 @@ "rsc": false, "tsx": true, "tailwind": { - "config": "tailwind.config.js", + "config": "tailwind.config.ts", "css": "src/styles/index.css", "baseColor": "slate", "cssVariables": true, diff --git a/docs/en/guide/what-is-shadcn-ui-boilerplate.md b/docs/en/guide/what-is-shadcn-ui-boilerplate.md index 7430b91..558b3b2 100644 --- a/docs/en/guide/what-is-shadcn-ui-boilerplate.md +++ b/docs/en/guide/what-is-shadcn-ui-boilerplate.md @@ -26,19 +26,3 @@ If you have any questions or suggestions, please submit an issue or pr. ## Donate If you find this project helpful, please consider giving us a star ⭐️ - -or 👇 - -[![TinsFox's Profile](https://afdian-connect-nine.vercel.app/profile.svg)](https://afdian.com/a/tinsfox) - -[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/TinsFox) - - - -## Join our WeChat group - -
- -
- -Scan the above QR code to join our WeChat group, and discuss with other developers! diff --git a/docs/zh/guide/what-is-shadcn-ui-boilerplate.md b/docs/zh/guide/what-is-shadcn-ui-boilerplate.md index 9e397de..0988d40 100644 --- a/docs/zh/guide/what-is-shadcn-ui-boilerplate.md +++ b/docs/zh/guide/what-is-shadcn-ui-boilerplate.md @@ -29,21 +29,3 @@ shadcn/ui boilerplate 是一个基于 [**shadcn/ui**](https://github.com/shadcn- ## 赞赏 如果你觉得这个项目对你有帮助,欢迎给我们一个 star ⭐️ - -或者 👇 - - -[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/TinsFox) - -[![TinsFox's Profile](https://afdian-connect-nine.vercel.app/profile.svg)](https://afdian.com/a/tinsfox) - - - -## 加入我们的微信群 - -- -
- -扫描上方二维码加入我们的微信群,与其他开发者交流讨论! - diff --git a/locales/en/auth.json b/locales/en/auth.json new file mode 100644 index 0000000..06e5495 --- /dev/null +++ b/locales/en/auth.json @@ -0,0 +1,37 @@ +{ + "login": { + "create_account": "Create an account", + "enter_email": "Enter your email below to create your account", + "terms_of_service": "Terms of Service", + "privacy_policy": "Privacy Policy", + "loading": "Loading...", + "login_successful": "Login successful", + "error": "Error", + "email": "Email", + "email_placeholder": "name@example.com", + "password": "Password", + "password_placeholder": "Password", + "sign_in_with_email": "Sign In with Email", + "or_continue_with": "Or continue with" + }, + "social_login": { + "github": "Sign in with Github", + "google": "Sign in with Google", + "apple": "Sign in with Apple", + "microsoft": "Sign in with Microsoft", + "linkedin": "Sign in with LinkedIn", + "twitter": "Sign in with Twitter", + "facebook": "Sign in with Facebook", + "instagram": "Sign in with Instagram", + "snapchat": "Sign in with Snapchat", + "tiktok": "Sign in with TikTok", + "youtube": "Sign in with YouTube" + }, + "company": { + "name": "Acme Inc", + "testimonial": { + "quote": "This library has saved me countless hours of work and helped me deliver stunning designs to my clients faster than ever before.", + "name": "Sofia Davis" + } + } +} diff --git a/locales/en/common.json b/locales/en/common.json new file mode 100644 index 0000000..d0a1661 --- /dev/null +++ b/locales/en/common.json @@ -0,0 +1,24 @@ +{ + "select_language": "Select a language", + "languages": { + "english": "English", + "french": "French", + "german": "German", + "spanish": "Spanish", + "portuguese": "Portuguese", + "russian": "Russian", + "japanese": "Japanese", + "korean": "Korean", + "chinese": "Chinese" + }, + "themes": { + "system": "System", + "light": "Light", + "dark": "Dark" + }, + "fonts": { + "inter": "Inter", + "manrope": "Manrope" + }, + "update": "Update" +} diff --git a/locales/en/errors.json b/locales/en/errors.json new file mode 100644 index 0000000..d467665 --- /dev/null +++ b/locales/en/errors.json @@ -0,0 +1,14 @@ +{ + "name_min_length": "Name must be at least 2 characters.", + "name_max_length": "Name must not be longer than 30 characters.", + "dob_required": "A date of birth is required.", + "language_required": "Please select a language.", + "bio_min_length": "Bio must be at least 10 characters.", + "bio_max_length": "Bio must not be longer than 160 characters.", + "username_min_length": "Username must be at least 2 characters.", + "username_max_length": "Username must not be longer than 30 characters.", + "email_required": "Please select an email to display.", + "notification_type_required": "You need to select a notification type.", + "item_selection_required": "You have to select at least one item.", + "invalid_email_or_password": "Invalid email or password." +} diff --git a/locales/en/forms.json b/locales/en/forms.json new file mode 100644 index 0000000..d88a7b6 --- /dev/null +++ b/locales/en/forms.json @@ -0,0 +1,55 @@ +{ + "actions": { + "update_account": "Update account", + "select_account": "Select account", + "update_preferences": "Update preferences" + }, + "labels": { + "name": "Name", + "email": "Email", + "password": "Password", + "confirm_password": "Confirm password", + "date_of_birth": "Date of birth", + "language": "Language", + "bio": "Bio", + "username": "Username", + "notifications": "Notifications", + "marketing": "Marketing", + "social": "Social", + "security": "Security", + "font": "Font", + "theme": "Theme" + }, + "placeholders": { + "your_name": "Your name", + "your_email": "Your email", + "your_password": "Your password", + "your_date_of_birth": "Your date of birth", + "your_language": "Your language", + "your_bio": "Your bio", + "your_username": "Your username", + "search_language": "Search language" + }, + "descriptions": { + "name": "This is the name that will be displayed on your profile.", + "email": "This is the email that will be displayed on your profile.", + "password": "This is the password that will be used to log in to your account.", + "confirm_password": "This is the password that will be used to confirm your password.", + "date_of_birth": "This is the date of birth that will be displayed on your profile.", + "language": "This is the language that will be displayed on your profile.", + "bio": "This is the bio that will be displayed on your profile.", + "username": "This is the username that will be displayed on your profile.", + "notifications": "This is the notifications that will be used to notify you of new messages, events, etc.", + "marketing": "This is the marketing that will be used to send you marketing emails.", + "social": "This is the social that will be used to send you social emails.", + "security": "This is the security that will be used to send you security emails.", + "font": "This is the font that will be displayed on your profile.", + "theme": "This is the theme that will be displayed on your profile.", + "select_language": "This is the language that will be displayed on your profile.", + "select_font": "This is the font that will be displayed on your profile.", + "select_theme": "This is the theme that will be displayed on your profile." + }, + "errors": { + "no_language_found": "No language found" + } +} diff --git a/locales/en/navigation.json b/locales/en/navigation.json new file mode 100644 index 0000000..3bb5dde --- /dev/null +++ b/locales/en/navigation.json @@ -0,0 +1,39 @@ +{ + "dashboard": "Dashboard", + "forms": "Forms", + "table": "Table", + "tables": "Tables", + "charts": "Charts", + "system": "System", + "settings": "Settings", + "overview": "Overview", + "analysis": "Analysis", + "workplace": "Workplace", + "analytics": "Analytics", + "chat": "Chat", + "email": "Email", + "calendar": "Calendar", + "basic_form": "Basic Form", + "step_form": "Step Form", + "advanced_form": "Advanced Form", + "basic_list": "Basic List", + "table_list": "Table List", + "card_list": "Card List", + "area_chart": "Area Chart", + "bar_chart": "Bar Chart", + "line_chart": "Line Chart", + "pie_chart": "Pie Chart", + "radar_chart": "Radar Chart", + "radial_chart": "Radial Chart", + "tooltip_chart": "Tooltip Chart", + "about": "About", + "user": { + "logout": "Log out", + "profile": "Profile", + "settings": "Settings", + "account": "Account", + "billing": "Billing", + "notifications": "Notifications", + "upgrade_pro": "Upgrade to Pro" + } +} diff --git a/locales/en/settings.json b/locales/en/settings.json new file mode 100644 index 0000000..8493a70 --- /dev/null +++ b/locales/en/settings.json @@ -0,0 +1,119 @@ +{ + "nav": { + "profile": "Profile", + "account": "Account", + "appearance": "Appearance", + "notifications": "Notifications", + "display": "Display", + "theme": "Theme" + }, + "sections": { + "profile": { + "title": "Profile", + "description": "This is the profile that will be displayed on your profile.", + "email_options": "Email options", + "urls": "Urls", + "add_url": "Add url", + "update_profile": "Update profile", + "username": "Username", + "username_description": "This is the username that will be displayed on your profile.", + "email": "Email", + "email_description": "This is the email that will be displayed on your profile.", + "password": "Password", + "password_description": "This is the password that will be used to log in to your account.", + "confirm_password": "Confirm password", + "confirm_password_description": "This is the password that will be used to confirm your password.", + "email_options_description": "This is the email options that will be displayed on your profile.", + "urls_description": "This is the urls that will be displayed on your profile.", + "bio": "Bio", + "bio_description": "This is the bio that will be displayed on your profile." + }, + "appearance": { + "title": "Appearance", + "description": "Customize the appearance of the app. Automatically switch between day and night themes.", + "font": "Font", + "select_font_description": "Select the font for the app.", + "theme": "Theme", + "theme_description": "This is the theme that will be displayed on your profile.", + "system": "System", + "light": "Light", + "dark": "Dark", + "inter": "Inter", + "manrope": "Manrope" + }, + "notifications": { + "title": "Notifications", + "description": "This is the notifications that will be displayed on your profile.", + "email_settings": { + "title": "Email notifications", + "communication": "Communication emails", + "marketing": "Marketing emails", + "social": "Social emails", + "security": "Security emails" + }, + "mobile_settings": { + "use_different": "Use different settings for my mobile devices", + "description": "You can manage your mobile notifications on the mobile settings.", + "page": "Mobile settings page" + }, + "preferences": { + "notify_about": "Notify me about...", + "options": { + "all_messages": "All new messages", + "direct_messages": "Direct messages and mentions", + "nothing": "Nothing" + } + }, + "update_notifications": "Update notifications", + "update_notifications_description": "This is the update notifications that will be displayed on your profile.", + "update_notifications_description_2": "You can manage your mobile notifications on the mobile settings page.", + "update_notifications_description_3": "You can manage your mobile notifications on the mobile settings page." + }, + "display": { + "title": "Display", + "description": "Turn items on or off to control what's displayed in the app.", + "sidebar": { + "title": "Sidebar", + "description": "Turn items on or off to control what's displayed in the app.", + "items": { + "recents": "Recents", + "home": "Home", + "applications": "Applications", + "desktop": "Desktop", + "downloads": "Downloads", + "documents": "Documents" + } + } + }, + "account": { + "title": "Account", + "description": "Update your account settings.", + "name": "Name", + "name_description": "This is your public display name.", + "your_name": "Your name", + "date_of_birth": "Date of birth", + "dob_description": "Your date of birth is used to calculate your age.", + "pick_date": "Pick a date", + "language": "Language", + "language_description": "This is the language that will be used in the application.", + "select_language": "Select a language", + "search_language": "Search language...", + "no_language_found": "No language found", + "update_account": "Update account", + "languages": { + "english": "English", + "french": "French", + "german": "German", + "spanish": "Spanish", + "portuguese": "Portuguese", + "russian": "Russian", + "japanese": "Japanese", + "korean": "Korean", + "chinese": "Chinese" + } + } + }, + "form": { + "you_submitted": "You submitted the following values:" + } +} diff --git a/locales/zh-CN/auth.json b/locales/zh-CN/auth.json new file mode 100644 index 0000000..18bbd99 --- /dev/null +++ b/locales/zh-CN/auth.json @@ -0,0 +1,37 @@ +{ + "login": { + "create_account": "创建账户", + "enter_email": "在下面输入您的电子邮件以创建账户", + "terms_of_service": "服务条款", + "privacy_policy": "隐私政策", + "loading": "加载中...", + "login_successful": "登录成功", + "error": "错误", + "email": "电子邮件", + "email_placeholder": "name@example.com", + "password": "密码", + "password_placeholder": "密码", + "sign_in_with_email": "使用电子邮件登录", + "or_continue_with": "或继续使用" + }, + "social_login": { + "github": "使用 Github 登录", + "google": "使用 Google 登录", + "apple": "使用 Apple 登录", + "microsoft": "使用 Microsoft 登录", + "linkedin": "使用 LinkedIn 登录", + "twitter": "使用 Twitter 登录", + "facebook": "使用 Facebook 登录", + "instagram": "使用 Instagram 登录", + "snapchat": "使用 Snapchat 登录", + "tiktok": "使用 TikTok 登录", + "youtube": "使用 YouTube 登录" + }, + "company": { + "name": "Acme Inc", + "testimonial": { + "quote": "这个库节省了我无数的时间,并帮助我更快地向我的客户交付令人惊叹的设计。", + "name": "Sofia Davis" + } + } +} diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.json new file mode 100644 index 0000000..129bad7 --- /dev/null +++ b/locales/zh-CN/common.json @@ -0,0 +1,24 @@ +{ + "select_language": "选择语言", + "languages": { + "english": "英语", + "french": "法语", + "german": "德语", + "spanish": "西班牙语", + "portuguese": "葡萄牙语", + "russian": "俄语", + "japanese": "日语", + "korean": "韩语", + "chinese": "中文" + }, + "themes": { + "system": "系统", + "light": "亮", + "dark": "暗" + }, + "fonts": { + "inter": "Inter", + "manrope": "Manrope" + }, + "update": "更新" +} diff --git a/locales/zh-CN/errors.json b/locales/zh-CN/errors.json new file mode 100644 index 0000000..d094082 --- /dev/null +++ b/locales/zh-CN/errors.json @@ -0,0 +1,14 @@ +{ + "name_min_length": "姓名必须至少为2个字符。", + "name_max_length": "姓名不得超过30个字符。", + "dob_required": "出生日期是必需的。", + "language_required": "请选择语言。", + "bio_min_length": "个人简介必须至少为10个字符。", + "bio_max_length": "个人简介不得超过160个字符。", + "username_min_length": "用户名必须至少为2个字符。", + "username_max_length": "用户名不得超过30个字符。", + "email_required": "请选择要显示的电子邮件。", + "notification_type_required": "您需要选择通知类型。", + "item_selection_required": "您必须选择至少一个项目。", + "invalid_email_or_password": "无效的电子邮件或密码。" +} diff --git a/locales/zh-CN/forms.json b/locales/zh-CN/forms.json new file mode 100644 index 0000000..266a3ca --- /dev/null +++ b/locales/zh-CN/forms.json @@ -0,0 +1,55 @@ +{ + "actions": { + "update_account": "更新账户", + "select_account": "选择账户", + "update_preferences": "更新偏好" + }, + "labels": { + "name": "姓名", + "email": "电子邮件", + "password": "密码", + "confirm_password": "确认密码", + "date_of_birth": "出生日期", + "language": "语言", + "bio": "个人简介", + "username": "用户名", + "notifications": "通知", + "marketing": "营销", + "social": "社交", + "security": "安全", + "font": "字体", + "theme": "主题" + }, + "placeholders": { + "your_name": "您的姓名", + "your_email": "您的电子邮件", + "your_password": "您的密码", + "your_date_of_birth": "您的出生日期", + "your_language": "您的语言", + "your_bio": "您的个人简介", + "your_username": "您的用户名", + "search_language": "搜索语言" + }, + "descriptions": { + "name": "这是将在您的个人资料中显示的姓名。", + "email": "这是将在您的个人资料中显示的电子邮件。", + "password": "这是将用于登录您的账户的密码。", + "confirm_password": "这是将用于确认您的密码的密码。", + "date_of_birth": "这是将在您的个人资料中显示的出生日期。", + "language": "这是将在您的个人资料中显示的语言。", + "bio": "这是将在您的个人资料中显示的个人简介。", + "username": "这是将在您的个人资料中显示的用户名。", + "notifications": "这是将用于通知您的新消息、事件等的通知。", + "marketing": "这是将用于发送营销电子邮件的营销。", + "social": "这是将用于发送社交电子邮件的社交。", + "security": "这是将用于发送安全电子邮件的安全。", + "font": "这是将在您的个人资料中显示的字体。", + "theme": "这是将在您的个人资料中显示的主题。", + "select_language": "这是将在您的个人资料中显示的语言。", + "select_font": "这是将在您的个人资料中显示的字体。", + "select_theme": "这是将在您的个人资料中显示的主题。" + }, + "errors": { + "no_language_found": "没有找到语言" + } +} diff --git a/locales/zh-CN/navigation.json b/locales/zh-CN/navigation.json new file mode 100644 index 0000000..2e39d9f --- /dev/null +++ b/locales/zh-CN/navigation.json @@ -0,0 +1,39 @@ +{ + "dashboard": "仪表板", + "forms": "表单", + "table": "表格", + "tables": "表格", + "charts": "图表", + "system": "系统", + "settings": "设置", + "overview": "概览", + "analysis": "分析", + "workplace": "工作台", + "analytics": "分析", + "chat": "聊天", + "email": "电子邮件", + "calendar": "日历", + "basic_form": "基本表单", + "step_form": "步骤表单", + "advanced_form": "高级表单", + "basic_list": "基本列表", + "table_list": "表格列表", + "card_list": "卡片列表", + "area_chart": "面积图", + "bar_chart": "柱状图", + "line_chart": "折线图", + "pie_chart": "饼图", + "radar_chart": "雷达图", + "radial_chart": "径向图", + "tooltip_chart": "提示图", + "about": "关于", + "user": { + "logout": "登出", + "profile": "个人资料", + "settings": "设置", + "account": "账户", + "billing": "账单", + "notifications": "通知", + "upgrade_pro": "升级到专业版" + } +} diff --git a/locales/zh-CN/settings.json b/locales/zh-CN/settings.json new file mode 100644 index 0000000..baab326 --- /dev/null +++ b/locales/zh-CN/settings.json @@ -0,0 +1,124 @@ +{ + "nav": { + "profile": "个人资料", + "account": "账户", + "appearance": "外观", + "notifications": "通知", + "display": "显示", + "theme": "主题" + }, + "sections": { + "profile": { + "title": "个人资料", + "description": "这是您在网站上看到的个人资料。", + "email_options": "电子邮件选项", + "urls": "链接", + "add_url": "添加链接", + "update_profile": "更新个人资料", + "username": "用户名", + "username_description": "这是将在您的个人资料中显示的用户名。", + "email": "电子邮件", + "email_description": "这是将在您的个人资料中显示的电子邮件。", + "password": "密码", + "password_description": "这是将用于登录您的账户的密码。", + "confirm_password": "确认密码", + "confirm_password_description": "这是将用于确认您的密码的密码。", + "email_options_description": "这是将在您的个人资料中显示的电子邮件选项。", + "urls_description": "这是将在您的个人资料中显示的链接。", + "bio": "个人简介", + "bio_description": "这是将在您的个人资料中显示的个人简介。" + }, + "appearance": { + "title": "外观", + "description": "自定义应用程序的外观。自动在白天和黑夜之间切换主题。", + "font": "字体", + "select_font_description": "选择应用程序的字体。", + "theme": "主题", + "theme_description": "这是将在您的个人资料中显示的主题。", + "system": "系统", + "light": "亮色", + "dark": "暗色", + "inter": "Inter", + "manrope": "Manrope" + }, + "notifications": { + "title": "通知", + "description": "这是您在网站上看到的通知。", + "email_settings": { + "title": "电子邮件通知", + "communication": "通信电子邮件", + "marketing": "营销电子邮件", + "social": "社交电子邮件", + "security": "安全电子邮件" + }, + "mobile_settings": { + "use_different": "为我的移动设备使用不同的设置", + "description": "您可以在移动设置页面中管理您的移动通知。", + "page": "移动设置" + }, + "preferences": { + "notify_about": "通知我关于", + "options": { + "all_messages": "所有新消息", + "mentions": "所有新提及", + "reactions": "所有新反应", + "followers": "所有新关注者", + "direct_messages": "直接消息和提及", + "comments": "所有新评论", + "replies": "所有新回复", + "posts": "所有新帖子", + "nothing": "无" + } + }, + "update_notifications": "更新通知", + "update_notifications_description": "这是将在您的个人资料中显示的更新通知。", + "update_notifications_description_2": "您可以在移动设置页面中管理您的移动通知。", + "update_notifications_description_3": "您可以在移动设置页面中管理您的移动通知。" + }, + "display": { + "title": "显示", + "description": "打开或关闭项目以控制应用程序中显示的内容。", + "sidebar": { + "title": "侧边栏", + "description": "打开或关闭项目以控制应用程序中显示的内容。", + "items": { + "recents": "最近", + "home": "主页", + "applications": "应用程序", + "desktop": "桌面", + "downloads": "下载", + "documents": "文档" + } + } + }, + "account": { + "title": "账户", + "name": "姓名", + "name_description": "这是您的公开显示名称。", + "your_name": "您的姓名", + "date_of_birth": "出生日期", + "dob_description": "您的出生日期用于计算您的年龄。", + "pick_date": "选择日期", + "language": "语言", + "language_description": "这是将在应用程序中使用的语言。", + "select_language": "选择语言", + "search_language": "搜索语言...", + "no_language_found": "未找到语言", + "update_account": "更新账户", + "languages": { + "english": "英语", + "french": "法语", + "german": "德语", + "spanish": "西班牙语", + "portuguese": "葡萄牙语", + "russian": "俄语", + "japanese": "日语", + "korean": "韩语", + "chinese": "中文" + } + } + }, + "form": { + "you_submitted": "您提交了以下值:" + } +} diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx new file mode 100644 index 0000000..3d47afc --- /dev/null +++ b/src/components/app-sidebar.tsx @@ -0,0 +1,67 @@ +import { env } from "@env" +import { + Command, + LifeBuoy, + Send, +} from "lucide-react" +import * as React from "react" +import { Link } from "react-router-dom" + +import { NavMain } from "@/components/nav-main" +import { NavSecondary } from "@/components/nav-secondary" +import { NavUser } from "@/components/nav-user" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "@/components/ui/sidebar" + +import { menus } from "./layout/sidebar/data" + +const navSecondary = [ + { + title: "Support", + url: "#", + icon: LifeBuoy, + }, + { + title: "Feedback", + url: "#", + icon: Send, + }, +] + +export function AppSidebar({ ...props }: React.ComponentProps