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')}
+
+
+
+
;
}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 41d6673..d25407b 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -12,7 +12,7 @@ export default function Header() {
-
+
{t("appName")}
diff --git a/src/components/SimpleEditor.tsx b/src/components/SimpleEditor.tsx
index cb5b3e4..0dbdd09 100644
--- a/src/components/SimpleEditor.tsx
+++ b/src/components/SimpleEditor.tsx
@@ -6,7 +6,7 @@ import BackgroundSelector, {
import PreviewToolbar from "./common/PreviewToolbar";
import SimpleTextSetting from "./common/SimpleTextSetting";
import { useEffect, useState } from "react";
-import { useTranslations } from "next-intl";
+import { useLocale, useTranslations } from "next-intl";
import { TextProp } from "./common/TextSetting";
import { useRouter } from "@/i18n/navigation";
@@ -60,6 +60,7 @@ export default function SimpleEditor({ textProp, backgroundProp }: { textProp: T
sessionStorage.setItem("text", JSON.stringify(text));
}, [text]);
+ const locale = useLocale();
return (
@@ -69,7 +70,7 @@ export default function SimpleEditor({ textProp, backgroundProp }: { textProp: T
setBackground={setBackground}
/>
- { router.push("/editor") }}>{tIndex("toolMore")} ?
+ {tIndex("toolMore")} ?