Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: correct trigger events limit modal wording (#28463)

lyzno1b4e7239ac7a4
diff --git a/web/app/components/billing/trigger-events-limit-modal/index.stories.tsx b/web/app/components/billing/trigger-events-limit-modal/index.stories.tsx
deleted file mode 100644
index eed6acac9b4..00000000000
--- a/web/app/components/billing/trigger-events-limit-modal/index.stories.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/nextjs'
-import React, { useEffect, useState } from 'react'
-import i18next from 'i18next'
-import { I18nextProvider } from 'react-i18next'
-import TriggerEventsLimitModal from '.'
-import { Plan } from '../type'
-
-const i18n = i18next.createInstance()
-i18n.init({
- lng: 'en',
- resources: {
- en: {
- translation: {
- billing: {
- triggerLimitModal: {
- title: 'Upgrade to unlock unlimited triggers per workflow',
- description: 'You’ve reached the limit of 2 triggers per workflow for this plan. Upgrade to publish this workflow.',
- dismiss: 'Dismiss',
- upgrade: 'Upgrade',
- usageTitle: 'TRIGGER EVENTS',
- },
- usagePage: {
- triggerEvents: 'Trigger Events',
- resetsIn: 'Resets in {{count, number}} days',
- },
- upgradeBtn: {
- encourage: 'Upgrade Now',
- encourageShort: 'Upgrade',
- plain: 'View Plan',
- },
- },
- },
- },
- },
-})
-
-const Template = (args: React.ComponentProps<typeof TriggerEventsLimitModal>) => {
- const [visible, setVisible] = useState<boolean>(args.show ?? true)
- useEffect(() => {
- setVisible(args.show ?? true)
- }, [args.show])
- const handleHide = () => setVisible(false)
- return (
- <I18nextProvider i18n={i18n}>
- <div className="flex flex-col gap-4">
- <button
- className="rounded-lg border border-divider-subtle px-4 py-2 text-sm text-text-secondary hover:border-divider-deep hover:text-text-primary"
- onClick={() => setVisible(true)}
- >
- Open Modal
- </button>
- <TriggerEventsLimitModal
- {...args}
- show={visible}
- onDismiss={handleHide}
- onUpgrade={handleHide}
- />
- </div>
- </I18nextProvider>
- )
-}
-
-const meta = {
- title: 'Billing/TriggerEventsLimitModal',
- component: TriggerEventsLimitModal,
- parameters: {
- layout: 'centered',
- },
- args: {
- show: true,
- usage: 120,
- total: 120,
- resetInDays: 5,
- planType: Plan.professional,
- },
-} satisfies Meta<typeof TriggerEventsLimitModal>
-
-export default meta
-type Story = StoryObj<typeof meta>
-
-export const Professional: Story = {
- args: {
- onDismiss: () => { /* noop */ },
- onUpgrade: () => { /* noop */ },
- },
- render: args => <Template {...args} />,
-}
-
-export const Sandbox: Story = {
- render: args => <Template {...args} />,
- args: {
- onDismiss: () => { /* noop */ },
- onUpgrade: () => { /* noop */ },
- resetInDays: undefined,
- planType: Plan.sandbox,
- },
-}
diff --git a/web/i18n/en-US/billing.ts b/web/i18n/en-US/billing.ts
index f2b2b318356..233fd335921 100644
--- a/web/i18n/en-US/billing.ts
+++ b/web/i18n/en-US/billing.ts
@@ -13,8 +13,8 @@ const translation = {
},
teamMembers: 'Team Members',
triggerLimitModal: {
- title: 'Upgrade to unlock unlimited triggers per workflow',
- description: 'You’ve reached the limit of 2 triggers per workflow for this plan. Upgrade to publish this workflow.',
+ title: 'Upgrade to unlock more trigger events',
+ description: 'You\'ve reached the limit of workflow event triggers for this plan.',
dismiss: 'Dismiss',
upgrade: 'Upgrade',
usageTitle: 'TRIGGER EVENTS',
diff --git a/web/i18n/ja-JP/billing.ts b/web/i18n/ja-JP/billing.ts
index def779c9c15..97c3dafb9bb 100644
--- a/web/i18n/ja-JP/billing.ts
+++ b/web/i18n/ja-JP/billing.ts
@@ -12,8 +12,8 @@ const translation = {
resetsIn: '{{count,number}}日後にリセット',
},
triggerLimitModal: {
- title: 'アップグレードして、各ワークフローのトリガーを制限なく使用',
- description: 'このプランでは、各ワークフローのトリガー数は最大2個までです。公開するにはアップグレードしてください。',
+ title: 'アップグレードして、より多くのトリガーイベントを利用できるようになります',
+ description: 'このプランでは、ワークフローのトリガーイベント数の上限に達しています。',
dismiss: '閉じる',
upgrade: 'アップグレード',
usageTitle: 'TRIGGER EVENTS',
diff --git a/web/i18n/zh-Hans/billing.ts b/web/i18n/zh-Hans/billing.ts
index b61ad835eef..e247ce90672 100644
--- a/web/i18n/zh-Hans/billing.ts
+++ b/web/i18n/zh-Hans/billing.ts
@@ -12,8 +12,8 @@ const translation = {
resetsIn: '{{count,number}} 天后重置',
},
triggerLimitModal: {
- title: '升级以解锁每个工作流无限制的触发器',
- description: '您已达到此计划上每个工作流最多 2 个触发器的限制。请升级后再发布此工作流。',
+ title: '升级以解锁更多触发器事件数',
+ description: '您已达到此计划上工作流的触发器事件数限制。',
dismiss: '知道了',
upgrade: '升级',
usageTitle: '触发事件额度',