mirror of https://github.com/langgenius/dify.git
fix: correct translation errors in Japanese and Chinese JSON files, and improve type safety in quota panel component
This commit is contained in:
parent
c976c1cb2d
commit
e34513cbc4
|
|
@ -1,5 +1,6 @@
|
|||
import type { FC } from 'react'
|
||||
import type { ModelProvider } from '../declarations'
|
||||
import type { Plugin } from '@/app/components/plugins/types'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
|
|
@ -46,7 +47,7 @@ const QuotaPanel: FC<QuotaPanelProps> = ({
|
|||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const { currentWorkspace } = useAppContext()
|
||||
const credits = Math.max(currentWorkspace.trial_credits - currentWorkspace.trial_credits_used || 0, 0)
|
||||
const credits = Math.max((currentWorkspace.trial_credits - currentWorkspace.trial_credits_used) || 0, 0)
|
||||
const providerMap = useMemo(() => new Map(
|
||||
providers.map(p => [p.provider, p.preferred_provider_type]),
|
||||
), [providers])
|
||||
|
|
@ -54,7 +55,7 @@ const QuotaPanel: FC<QuotaPanelProps> = ({
|
|||
const {
|
||||
plugins: allPlugins,
|
||||
} = useMarketplaceAllPlugins(providers, '')
|
||||
const [selectedPlugin, setSelectedPlugin] = useState<any>(null)
|
||||
const [selectedPlugin, setSelectedPlugin] = useState<Plugin | null>(null)
|
||||
const [isShowInstallModal, {
|
||||
setTrue: showInstallFromMarketplace,
|
||||
setFalse: hideInstallFromMarketplace,
|
||||
|
|
@ -147,7 +148,7 @@ const QuotaPanel: FC<QuotaPanelProps> = ({
|
|||
})}
|
||||
</div>
|
||||
</div>
|
||||
{isShowInstallModal && (
|
||||
{isShowInstallModal && selectedPlugin && (
|
||||
<InstallFromMarketplace
|
||||
manifest={selectedPlugin}
|
||||
uniqueIdentifier={selectedPlugin.latest_package_identifier}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@
|
|||
"modelProvider.card.callTimes": "通話回数",
|
||||
"modelProvider.card.modelAPI": "{{modelName}} は現在 APIキーを使用しています。",
|
||||
"modelProvider.card.modelNotSupported": "{{modelName}} 未インストール。",
|
||||
"modelProvider.card.modelSupported": "このクォータは現在{{modelName}}に使用されでいます。",
|
||||
"modelProvider.card.modelSupported": "このクォータは現在{{modelName}}に使用されています。",
|
||||
"modelProvider.card.onTrial": "トライアル中",
|
||||
"modelProvider.card.paid": "有料",
|
||||
"modelProvider.card.priorityUse": "優先利用",
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
"plansCommon.memberAfter": "个成员",
|
||||
"plansCommon.messageRequest.title": "{{count,number}} 条消息额度",
|
||||
"plansCommon.messageRequest.titlePerMonth": "{{count,number}} 条消息额度/月",
|
||||
"plansCommon.messageRequest.tooltip": "消息额度旨在帮助您便捷地试用 Dify 中来自 OpenAI、Anthropic、Gemini、xAI、深度求索、通义 的模型的的不同模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 API 密钥。",
|
||||
"plansCommon.messageRequest.tooltip": "消息额度旨在帮助您便捷地试用 Dify 中来自 OpenAI、Anthropic、Gemini、xAI、深度求索、通义 的不同模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 API 密钥。",
|
||||
"plansCommon.modelProviders": "支持 OpenAI/Anthropic/Llama2/Azure OpenAI/Hugging Face/Replicate",
|
||||
"plansCommon.month": "月",
|
||||
"plansCommon.mostPopular": "最受欢迎",
|
||||
|
|
|
|||
Loading…
Reference in New Issue