Skip to content

Commit bbf1639

Browse files
authored
feat: add jp_ja for knowledge api (#16766)
1 parent cb12b44 commit bbf1639

File tree

2 files changed

+1988
-4
lines changed

2 files changed

+1988
-4
lines changed

web/app/(commonLayout)/datasets/Doc.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'
66
import { RiListUnordered } from '@remixicon/react'
77
import TemplateEn from './template/template.en.mdx'
88
import TemplateZh from './template/template.zh.mdx'
9+
import TemplateJa from './template/template.ja.mdx'
910
import I18n from '@/context/i18n'
1011
import { LanguagesSupported } from '@/i18n/language'
1112

@@ -106,10 +107,16 @@ const Doc = ({ apiBaseUrl }: DocProps) => {
106107
)}
107108
</div>
108109
<article className='prose-xl prose mx-1 rounded-t-xl bg-white px-4 pt-16 sm:mx-12'>
109-
{locale !== LanguagesSupported[1]
110-
? <TemplateEn apiBaseUrl={apiBaseUrl} />
111-
: <TemplateZh apiBaseUrl={apiBaseUrl} />
112-
}
110+
{(() => {
111+
switch (locale) {
112+
case LanguagesSupported[1]:
113+
return <TemplateZh apiBaseUrl={apiBaseUrl} />
114+
case LanguagesSupported[7]:
115+
return <TemplateJa apiBaseUrl={apiBaseUrl} />
116+
default:
117+
return <TemplateEn apiBaseUrl={apiBaseUrl} />
118+
}
119+
})()}
113120
</article>
114121
</div>
115122
)

0 commit comments

Comments
 (0)