From a293f985f516e4a753eb3c0ed803677e77d5cf68 Mon Sep 17 00:00:00 2001 From: ymk Date: Thu, 7 Aug 2025 14:30:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8editor=E4=B8=AD=E5=A2=9E=E5=8A=A0faq?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dictionary/en.json | 5 ++++- dictionary/zh.json | 5 ++++- src/app/[locale]/editor/page.tsx | 25 ++++++++++++++++++++++--- src/components/Header.tsx | 2 +- src/components/SimpleEditor.tsx | 5 +++-- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/dictionary/en.json b/dictionary/en.json index 0f925f4..60f7e8e 100644 --- a/dictionary/en.json +++ b/dictionary/en.json @@ -83,7 +83,10 @@ "how2UploadFont": "How to Upload Font?", "fontWeight": "Font Weight", "uploadFontButton": "Upload Font | Files with the same name will replace the fonts uploaded previously", - "uploadedFonts": "Uploaded Fonts" + "uploadedFonts": "Uploaded Fonts", + "faqTitle": "FAQ", + "faqQuestion1": "Why do text characters sometimes appear as question marks in the preview?", + "faqAnswer1": "Because the selected font doesn't support the language of the text. Try changing the font or uploading a custom font that supports the language." }, "Footer": { "copyright": "© {year} Screen Designer. All rights reserved." diff --git a/dictionary/zh.json b/dictionary/zh.json index 5ec66cd..f7a3a12 100644 --- a/dictionary/zh.json +++ b/dictionary/zh.json @@ -83,7 +83,10 @@ "how2UploadFont": "如何上传字体?", "fontWeight": "字体粗细", "uploadFontButton": "上传字体 | 相同名字的文件会替换前面上传的字体", - "uploadedFonts": "已上传字体" + "uploadedFonts": "已上传字体", + "faqTitle": "常见问题", + "faqQuestion1": "为什么预览框内的文字内容会显示问号?", + "faqAnswer1": "因为该内容的语言没有被选中字体支持,建议更换字体或者上传自定义字体" }, "Footer": { "copyright": "© {year} 3D文字设计工具 版权所有" diff --git a/src/app/[locale]/editor/page.tsx b/src/app/[locale]/editor/page.tsx index a4c5f0f..1f36a1e 100644 --- a/src/app/[locale]/editor/page.tsx +++ b/src/app/[locale]/editor/page.tsx @@ -5,8 +5,10 @@ import Footer from "@/components/Footer"; import FullEditor from "@/components/FullEditor"; import Header from "@/components/Header"; import { Locales } from "@/i18n/config"; -import { Box, Flex } from "@radix-ui/themes"; +import { Box, Container, Flex, Heading, Text, Card } from "@radix-ui/themes"; +import { HelpCircle } from "lucide-react"; import { Metadata } from "next"; +import { useTranslations } from "next-intl"; import { getTranslations } from "next-intl/server"; const host = process.env.NEXT_PUBLIC_HOST; export default function Page() { @@ -15,14 +17,31 @@ export default function Page() { } export function OnlyPage({ textProp, backgroundProp }: { textProp: TextProp | undefined, backgroundProp: BackgroundProp | undefined }) { + const t = useTranslations('TextEditor'); + return
- + {t('title')} + - + + + {t('faqTitle')} + + + + + {t('faqQuestion1')} + + + {t('faqAnswer1')} + + + +