mirror of
https://github.com/langgenius/dify-conversation.git
synced 2026-07-01 18:25:52 -04:00
feat: add en and zh support
This commit is contained in:
+5
-4
@@ -4,8 +4,9 @@ import { AppProps, LocaleProps } from '@/interface'
|
||||
import Welcome from '@/components/welcome'
|
||||
import Form from '@/components/form'
|
||||
import XPowerBy, { XPowerByPrivacy } from '@/components/x-power-by'
|
||||
import { t } from '@/i18n'
|
||||
|
||||
const Main: FC<AppProps & LocaleProps> = ({ user_input_form }) => {
|
||||
const Main: FC<AppProps & LocaleProps> = ({ user_input_form, locale }) => {
|
||||
const items = user_input_form.map((itm: any) => {
|
||||
const ik = Object.keys(itm)[0]
|
||||
const iv = Object.values(itm)[0] as any
|
||||
@@ -24,12 +25,12 @@ const Main: FC<AppProps & LocaleProps> = ({ user_input_form }) => {
|
||||
<div className='flex flex-col w-full pt-32 px-5 sm:px-8 md:px-72 '>
|
||||
<section className='mb-6'>
|
||||
<Welcome
|
||||
name='Welcome to Chat'
|
||||
description='Chat is a simple chat application.'
|
||||
name={t('app.welcome_message', locale)}
|
||||
description={t('app.welcome_message_description', locale)}
|
||||
/>
|
||||
</section>
|
||||
<section className='mb-4'>
|
||||
<Form hint='Init Prompt' items={items} />
|
||||
<Form hint={t('app.initial_prompt', locale)} items={items} />
|
||||
</section>
|
||||
|
||||
<section className='flex flex-col sm:flex-row items-center justify-between gap-4'>
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
"start_chat": "Start Chat",
|
||||
"try_to_ask": "Try to ask",
|
||||
"opening_statement": "Opening statement",
|
||||
"welcome_message": "Welcome to Dify.AI",
|
||||
"welcome_message_description": "Dify.AI is a platform that allows you to create your own chatbots. ",
|
||||
"initial_prompt": "Initial prompt",
|
||||
"opts": {
|
||||
"add": "Add",
|
||||
"edit": "Edit",
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
"start_chat": "开始聊天",
|
||||
"try_to_ask": "试着问问",
|
||||
"opening_statement": "开场白",
|
||||
"welcome_message": "欢迎使用 Dify.AI",
|
||||
"welcome_message_description": "Dify.AI 是一个基于人工智能的聊天机器人平台,它可以帮助您快速构建自己的聊天机器人。",
|
||||
"initial_prompt": "初始提示",
|
||||
"opts": {
|
||||
"add": "添加",
|
||||
"edit": "编辑",
|
||||
|
||||
Reference in New Issue
Block a user