From fe237802c97661d34f9ee017e18256ef70a3c6a2 Mon Sep 17 00:00:00 2001 From: NFish Date: Fri, 14 Mar 2025 19:09:51 +0800 Subject: [PATCH] fix: update Dify text --- web/app/(commonLayout)/datasets/template/template.en.mdx | 2 +- web/app/account/header.tsx | 4 +++- web/app/account/layout.tsx | 6 ------ web/app/account/page.tsx | 5 +++++ web/i18n/en-US/common.ts | 7 ++++--- web/i18n/en-US/explore.ts | 2 +- web/i18n/ja-JP/common.ts | 7 ++++--- web/i18n/ja-JP/explore.ts | 2 +- web/i18n/zh-Hans/common.ts | 7 ++++--- web/i18n/zh-Hans/explore.ts | 2 +- web/i18n/zh-Hant/common.ts | 7 ++++--- web/i18n/zh-Hant/explore.ts | 2 +- 12 files changed, 29 insertions(+), 24 deletions(-) diff --git a/web/app/(commonLayout)/datasets/template/template.en.mdx b/web/app/(commonLayout)/datasets/template/template.en.mdx index ac57e3aef2..a8ed59c04b 100644 --- a/web/app/(commonLayout)/datasets/template/template.en.mdx +++ b/web/app/(commonLayout)/datasets/template/template.en.mdx @@ -6,7 +6,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, PropertyInstructi
### Authentication - Service API of Dify authenticates using an `API-Key`. + Service API authenticates using an `API-Key`. It is suggested that developers store the `API-Key` in the backend instead of sharing or storing it in the client side to avoid the leakage of the `API-Key`, which may lead to property loss. diff --git a/web/app/account/header.tsx b/web/app/account/header.tsx index 694533e5ab..bdda2ec7f6 100644 --- a/web/app/account/header.tsx +++ b/web/app/account/header.tsx @@ -5,9 +5,11 @@ import { useRouter } from 'next/navigation' import Button from '../components/base/button' import Avatar from './avatar' import LogoSite from '@/app/components/base/logo/logo-site' +import { useGlobalPublicStore } from '@/context/global-public-context' const Header = () => { const { t } = useTranslation() + const { systemFeatures } = useGlobalPublicStore() const router = useRouter() const back = () => { @@ -25,7 +27,7 @@ const Header = () => {
diff --git a/web/app/account/layout.tsx b/web/app/account/layout.tsx index d64b72d1af..dd90237447 100644 --- a/web/app/account/layout.tsx +++ b/web/app/account/layout.tsx @@ -1,6 +1,5 @@ import React from 'react' import type { ReactNode } from 'react' -import { t } from 'i18next' import Header from './header' import SwrInitor from '@/app/components/swr-initor' import { AppContextProvider } from '@/context/app-context' @@ -33,9 +32,4 @@ const Layout = ({ children }: { children: ReactNode }) => { ) } - -export const metadata = { - title: t('common.menus.account'), -} - export default Layout diff --git a/web/app/account/page.tsx b/web/app/account/page.tsx index bb7e7f7feb..9ebf0225a0 100644 --- a/web/app/account/page.tsx +++ b/web/app/account/page.tsx @@ -1,6 +1,11 @@ +'use client' +import { useTranslation } from 'react-i18next' import AccountPage from './account-page' +import useDocumentTitle from '@/hooks/use-document-title' export default function Account() { + const { t } = useTranslation() + useDocumentTitle(t('common.menus.account')) return
diff --git a/web/i18n/en-US/common.ts b/web/i18n/en-US/common.ts index 6dbc3bf6e9..144b32f74e 100644 --- a/web/i18n/en-US/common.ts +++ b/web/i18n/en-US/common.ts @@ -132,6 +132,7 @@ const translation = { explore: 'Explore', apps: 'Studio', appDetail: 'App Detail', + account: 'Account', plugins: 'Plugins', pluginsTips: 'Integrate third-party plugins or create ChatGPT-compatible AI-Plugins.', datasets: 'Knowledge', @@ -168,7 +169,7 @@ const translation = { account: { account: 'Account', myAccount: 'My Account', - studio: 'Dify Studio', + studio: 'Studio', avatar: 'Avatar', name: 'Name', email: 'Email', @@ -180,8 +181,8 @@ const translation = { newPassword: 'New password', confirmPassword: 'Confirm password', notEqual: 'Two passwords are different.', - langGeniusAccount: 'Dify account', - langGeniusAccountTip: 'Your Dify account and associated user data.', + langGeniusAccount: 'Account\'s data', + langGeniusAccountTip: 'The user data of your account.', editName: 'Edit Name', showAppLength: 'Show {{length}} apps', delete: 'Delete Account', diff --git a/web/i18n/en-US/explore.ts b/web/i18n/en-US/explore.ts index d4368fb171..a8ee22f454 100644 --- a/web/i18n/en-US/explore.ts +++ b/web/i18n/en-US/explore.ts @@ -16,7 +16,7 @@ const translation = { }, }, apps: { - title: 'Explore Apps by Dify', + title: 'Explore Apps', description: 'Use these template apps instantly or customize your own apps based on the templates.', allCategories: 'Recommended', }, diff --git a/web/i18n/ja-JP/common.ts b/web/i18n/ja-JP/common.ts index 2215721467..0d66228b07 100644 --- a/web/i18n/ja-JP/common.ts +++ b/web/i18n/ja-JP/common.ts @@ -132,6 +132,7 @@ const translation = { explore: '探索', apps: 'スタジオ', appDetail: 'アプリの詳細', + account: 'アカウント', plugins: 'プラグイン', pluginsTips: 'サードパーティのプラグインを統合するか、ChatGPT互換のAIプラグインを作成します。', datasets: 'ナレッジ', @@ -177,8 +178,8 @@ const translation = { newPassword: '新しいパスワード', confirmPassword: 'パスワードを確認', notEqual: '2つのパスワードが異なります。', - langGeniusAccount: 'Difyアカウント', - langGeniusAccountTip: 'Difyアカウントと関連するユーザーデータ。', + langGeniusAccount: 'アカウント関連データ', + langGeniusAccountTip: 'アカウントに関連するユーザーデータ。', editName: '名前を編集', showAppLength: '{{length}}アプリを表示', delete: 'アカウントを削除', @@ -186,7 +187,7 @@ const translation = { deleteConfirmTip: '確認のため、登録したメールから次の内容をに送信してください ', account: 'アカウント', myAccount: 'マイアカウント', - studio: 'Difyスタジオ', + studio: 'スタジオ', deletePrivacyLinkTip: 'お客様のデータの取り扱い方法の詳細については、当社の', deletePrivacyLink: 'プライバシーポリシー。', deleteSuccessTip: 'アカウントの削除が完了するまでに時間が必要です。すべて完了しましたら、メールでお知らせします。', diff --git a/web/i18n/ja-JP/explore.ts b/web/i18n/ja-JP/explore.ts index cfc741bc3a..9d06420540 100644 --- a/web/i18n/ja-JP/explore.ts +++ b/web/i18n/ja-JP/explore.ts @@ -16,7 +16,7 @@ const translation = { }, }, apps: { - title: 'Difyによるアプリの探索', + title: 'アプリを探索', description: 'これらのテンプレートアプリを即座に使用するか、テンプレートに基づいて独自のアプリをカスタマイズしてください。', allCategories: '推奨', }, diff --git a/web/i18n/zh-Hans/common.ts b/web/i18n/zh-Hans/common.ts index 9e084b5609..b4d80736ec 100644 --- a/web/i18n/zh-Hans/common.ts +++ b/web/i18n/zh-Hans/common.ts @@ -132,6 +132,7 @@ const translation = { explore: '探索', apps: '工作室', appDetail: '应用详情', + account: '账户', plugins: '插件', pluginsTips: '集成第三方插件或创建与 ChatGPT 兼容的 AI 插件。', datasets: '知识库', @@ -168,7 +169,7 @@ const translation = { account: { account: '账户', myAccount: '我的账户', - studio: 'Dify 工作室', + studio: '工作室', avatar: '头像', name: '用户名', email: '邮箱', @@ -180,8 +181,8 @@ const translation = { newPassword: '新密码', notEqual: '两个密码不相同', confirmPassword: '确认密码', - langGeniusAccount: 'Dify 账号', - langGeniusAccountTip: '您的 Dify 账号和相关的用户数据。', + langGeniusAccount: '账号关联数据', + langGeniusAccountTip: '您的账号相关的用户数据。', editName: '编辑名字', showAppLength: '显示 {{length}} 个应用', delete: '删除账户', diff --git a/web/i18n/zh-Hans/explore.ts b/web/i18n/zh-Hans/explore.ts index bb7faf0396..05b219b311 100644 --- a/web/i18n/zh-Hans/explore.ts +++ b/web/i18n/zh-Hans/explore.ts @@ -16,7 +16,7 @@ const translation = { }, }, apps: { - title: '探索 Dify 的应用', + title: '探索应用', description: '使用这些模板应用程序,或根据模板自定义您自己的应用程序。', allCategories: '推荐', }, diff --git a/web/i18n/zh-Hant/common.ts b/web/i18n/zh-Hant/common.ts index 21bd9c925a..e36729342c 100644 --- a/web/i18n/zh-Hant/common.ts +++ b/web/i18n/zh-Hant/common.ts @@ -128,6 +128,7 @@ const translation = { explore: '探索', apps: '工作室', appDetail: '應用詳情', + account: '我的帳戶', plugins: '外掛', pluginsTips: '整合第三方外掛或建立與 ChatGPT 相容的 AI 外掛。', datasets: '知識庫', @@ -173,8 +174,8 @@ const translation = { newPassword: '新密碼', notEqual: '兩個密碼不相同', confirmPassword: '確認密碼', - langGeniusAccount: 'Dify 賬號', - langGeniusAccountTip: '您的 Dify 賬號和相關的使用者資料。', + langGeniusAccount: '賬號数据', + langGeniusAccountTip: '您的賬號和相關的使用者資料。', editName: '編輯名字', showAppLength: '顯示 {{length}} 個應用', delete: '刪除帳戶', @@ -182,7 +183,7 @@ const translation = { deleteConfirmTip: '請將以下內容從您的註冊電子郵件發送至 ', account: '帳戶', myAccount: '我的帳戶', - studio: 'Dify 工作室', + studio: '工作室', deletePrivacyLinkTip: '有關我們如何處理您的數據的更多資訊,請參閱我們的', deletePrivacyLink: '隱私策略。', deleteSuccessTip: '您的帳戶需要時間才能完成刪除。完成後,我們會給您發送電子郵件。', diff --git a/web/i18n/zh-Hant/explore.ts b/web/i18n/zh-Hant/explore.ts index 80dfe095dd..3bc90d0d6c 100644 --- a/web/i18n/zh-Hant/explore.ts +++ b/web/i18n/zh-Hant/explore.ts @@ -16,7 +16,7 @@ const translation = { }, }, apps: { - title: '探索 Dify 的應用', + title: '探索應用', description: '使用這些模板應用程式,或根據模板自定義您自己的應用程式。', allCategories: '推薦', },