feat: add translate for zh-Hans

This commit is contained in:
JiPai
2024-09-05 20:19:28 +08:00
parent d3108ebf65
commit fe032d3d0f
12 changed files with 521 additions and 295 deletions

View File

@@ -1,63 +1,58 @@
import { Container } from "./Container";
import { useTranslations } from 'next-intl'
import { Container } from './Container'
const faqs = [
[
{
question: "What is dokploy?",
answer:
"Dokploy is a stable, easy-to-use deployment solution designed to simplify the application management process. Think of Dokploy as a free alternative self-hostable solution to platforms like Heroku, Vercel, and Netlify.",
question: 'faq.q1',
answer: 'faq.a2',
},
{
question: "Why Choose Dokploy?",
answer: "Simplicity, Flexibility, and Fast",
question: 'faq.q2',
answer: 'faq.a2',
},
{
question: "Is free?",
answer:
"Yes, dokploy is totally free. You can use it for personal projects, small teams, or even for large-scale applications.",
question: 'faq.q3',
answer: 'faq.a3',
},
{
question: "Is it open source?",
answer: "Yes, dokploy is open source and free to use.",
question: 'faq.q4',
answer: 'faq.a4',
},
],
[
{
question: "What type of applications can i deploy with dokploy?",
answer:
"Dokploy is a great choice for any type of application. You can deploy your code to dokploy and manage it from the dashboard. We support a wide range of languages and frameworks, so you can choose the one that best fits your needs.",
question: 'faq.q5',
answer: 'faq.a5',
},
{
question: "How do I request a feature or report a bug?",
answer:
"Currently we are working on fixing bug fixes, but we will be releasing new features soon. You can also request features or report bugs.",
question: 'faq.q6',
answer: 'faq.a6',
},
{
question: "Do you track the usage of Dokploy?",
answer: "No, we don't track any usage data.",
question: 'faq.q7',
answer: "faq.a7",
},
],
[
{
question:
"Are there any user forums or communities where I can interact with other users?",
answer:
"Yes, we have active github discussions where you can share ideas, ask for help, and connect with other users.",
'faq.q8',
answer: 'faq.a8',
},
{
question: "What types of applications can I deploy with Dokploy?",
answer:
"Dokploy supports a variety of applications, including those built with Docker, as well as applications from any Git repository, offering custom builds with Nixpacks, Dockerfiles, or Buildpacks like Heroku and Paketo.",
question: 'faq.q9',
answer: 'faq.a9',
},
{
question: "How does Dokploy handle database management?",
answer:
"Dokploy supports multiple database systems including Postgres, MySQL, MariaDB, MongoDB, and Redis, providing tools for easy deployment and management directly from the dashboard.",
question: 'faq.q10',
answer: 'faq.a10',
},
],
];
]
export function Faqs() {
const t = useTranslations('HomePage')
return (
<section
id="faqs"
@@ -70,11 +65,10 @@ export function Faqs() {
id="faq-title"
className="font-display text-3xl tracking-tight text-primary sm:text-4xl"
>
Frequently asked questions
{t('faq.title')}
</h2>
<p className="mt-4 text-lg tracking-tight text-muted-foreground">
If you cant find what youre looking for, email our support team
and if youre lucky someone will get back to you.
{t('faq.des')}
</p>
</div>
<ul className="mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:max-w-none lg:grid-cols-3">
@@ -84,10 +78,10 @@ export function Faqs() {
{column.map((faq, faqIndex) => (
<li key={faqIndex}>
<h3 className="font-display text-lg leading-7 text-primary">
{faq.question}
{t(faq.question)}
</h3>
<p className="mt-4 text-sm text-muted-foreground">
{faq.answer}
{t(faq.answer)}
</p>
</li>
))}
@@ -97,5 +91,5 @@ export function Faqs() {
</ul>
</Container>
</section>
);
)
}