mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-11-16 23:04:24 +08:00
fix(i18n): use English runtime text and localize system UI
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { apiSections, DOCS_LAST_UPDATED } from '@/components/common/docs/api';
|
||||
import {
|
||||
createApiSections,
|
||||
DOCS_LAST_UPDATED,
|
||||
} from '@/components/common/docs/api';
|
||||
|
||||
export default function ApiDocPage() {
|
||||
const rt = useTranslations('runtime');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='API 接口文档'
|
||||
title={rt('api_documentation_cb3d2229')}
|
||||
lastUpdated={DOCS_LAST_UPDATED}
|
||||
sections={apiSections}
|
||||
sections={createApiSections(rt)}
|
||||
description={
|
||||
<p className='text-muted-foreground text-sm leading-relaxed'>
|
||||
OpenFlare 提供简单、强大的 API
|
||||
接口,支持多种编程语言和开发环境。通过标准化的 RESTful
|
||||
接口,您可以轻松地与后端服务进行集成与二次开发。
|
||||
{rt('openflare_provides_a_simple_powerful_api_for_ba400468')}
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { howToUseSections } from '@/components/common/docs/how-to-use';
|
||||
import { createHowToUseSections } from '@/components/common/docs/how-to-use';
|
||||
import { DOCS_LAST_UPDATED } from '@/components/common/docs/api';
|
||||
|
||||
export default function HowToUsePage() {
|
||||
const rt = useTranslations('runtime');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='平台使用指南'
|
||||
title={rt('platform_user_guide_d0ead991')}
|
||||
lastUpdated={DOCS_LAST_UPDATED}
|
||||
sections={howToUseSections}
|
||||
sections={createHowToUseSections(rt)}
|
||||
description={
|
||||
<p className='text-muted-foreground text-sm leading-relaxed'>
|
||||
欢迎使用 OpenFlare
|
||||
管理平台。本文档将引导您快速了解平台的核心组件、角色权限设计及二次开发流程,帮助您快速上手开发。
|
||||
{rt('welcome_to_the_openflare_management_platform_this_e8ecbe4d')}
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { privacySections } from '@/components/common/docs/privacy';
|
||||
import { createPrivacySections } from '@/components/common/docs/privacy';
|
||||
import { TERMS_LAST_UPDATED } from '@/components/common/docs/terms';
|
||||
|
||||
export default function PrivacyPolicyPage() {
|
||||
const rt = useTranslations('runtime');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='隐私政策 (Privacy)'
|
||||
title={rt('privacy_policy_b6da1ca6')}
|
||||
lastUpdated={TERMS_LAST_UPDATED}
|
||||
sections={privacySections}
|
||||
sections={createPrivacySections(rt)}
|
||||
description={
|
||||
<span>
|
||||
我们非常重视您的隐私保护。本政策将向您透明地展示我们如何收集、使用、存储您的个人信息,
|
||||
{rt('we_value_your_privacy_this_policy_explains_2c9e3c0b')}
|
||||
<br className='hidden md:block' />
|
||||
以及您享有的相关权利。
|
||||
{rt('and_the_rights_you_have_over_it_4560abf2')}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import {
|
||||
TERMS_LAST_UPDATED,
|
||||
termsSections,
|
||||
createTermsSections,
|
||||
} from '@/components/common/docs/terms';
|
||||
|
||||
export default function TermsOfServicePage() {
|
||||
const rt = useTranslations('runtime');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='服务协议 (Terms)'
|
||||
title={rt('terms_of_service_4e80a140')}
|
||||
lastUpdated={TERMS_LAST_UPDATED}
|
||||
sections={termsSections}
|
||||
description={<span>为了保障您的合法权益,请您仔细阅读以下条款。</span>}
|
||||
sections={createTermsSections(rt)}
|
||||
description={
|
||||
<span>
|
||||
{rt('please_read_the_following_terms_carefully_to_c46a6a61')}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user