mirror of
https://github.com/langgenius/dify.git
synced 2026-01-04 13:37:22 +00:00
fix: missing key for translation path (#25059)
This commit is contained in:
@@ -68,7 +68,12 @@ const StartBlocks = ({
|
||||
className='mb-2'
|
||||
type={block.type}
|
||||
/>
|
||||
<div className='system-md-medium mb-1 text-text-primary'>{block.title}</div>
|
||||
<div className='system-md-medium mb-1 text-text-primary'>
|
||||
{block.type === BlockEnumValues.TriggerWebhook
|
||||
? t('workflow.customWebhook')
|
||||
: t(`workflow.blocks.${block.type}`)
|
||||
}
|
||||
</div>
|
||||
<div className='system-xs-regular text-text-secondary'>{nodesExtraData[block.type].about}</div>
|
||||
{(block.type === BlockEnumValues.TriggerWebhook || block.type === BlockEnumValues.TriggerSchedule) && (
|
||||
<div className='system-xs-regular mb-1 mt-1 text-text-tertiary'>
|
||||
@@ -87,7 +92,7 @@ const StartBlocks = ({
|
||||
type={block.type}
|
||||
/>
|
||||
<div className='flex w-0 grow items-center justify-between text-sm text-text-secondary'>
|
||||
<span className='truncate'>{block.title}</span>
|
||||
<span className='truncate'>{t(`workflow.blocks.${block.type}`)}</span>
|
||||
{block.type === BlockEnumValues.Start && (
|
||||
<span className='system-xs-regular ml-2 shrink-0 text-text-quaternary'>{t('workflow.blocks.originalStartNode')}</span>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { ScheduleTriggerNodeType } from './types'
|
||||
|
||||
// Unified default values for trigger schedule
|
||||
export const getDefaultScheduleConfig = (): Partial<ScheduleTriggerNodeType> => ({
|
||||
mode: 'visual',
|
||||
frequency: 'weekly',
|
||||
|
||||
@@ -5,16 +5,16 @@ export type ScheduleMode = 'visual' | 'cron'
|
||||
export type ScheduleFrequency = 'hourly' | 'daily' | 'weekly' | 'monthly'
|
||||
|
||||
export type VisualConfig = {
|
||||
time?: string // User timezone time format: "2:30 PM"
|
||||
weekdays?: string[] // ['mon', 'tue', 'wed'] for weekly frequency
|
||||
on_minute?: number // 0-59 for hourly frequency
|
||||
monthly_days?: (number | 'last')[] // [1, 15, 'last'] for monthly frequency
|
||||
time?: string
|
||||
weekdays?: string[]
|
||||
on_minute?: number
|
||||
monthly_days?: (number | 'last')[]
|
||||
}
|
||||
|
||||
export type ScheduleTriggerNodeType = CommonNodeType & {
|
||||
mode: ScheduleMode // 'visual' or 'cron' configuration mode
|
||||
frequency: ScheduleFrequency // 'hourly' | 'daily' | 'weekly' | 'monthly'
|
||||
cron_expression?: string // Cron expression when mode is 'cron'
|
||||
visual_config?: VisualConfig // User-friendly configuration when mode is 'visual'
|
||||
timezone: string // User profile timezone (e.g., 'Asia/Shanghai', 'America/New_York')
|
||||
mode: ScheduleMode
|
||||
frequency: ScheduleFrequency
|
||||
cron_expression?: string
|
||||
visual_config?: VisualConfig
|
||||
timezone: string
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||
if (!payload.webhook_url) {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.nodes.webhook.validation.webhookUrlRequired'),
|
||||
errorMessage: t('workflow.nodes.triggerWebhook.validation.webhookUrlRequired'),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ const nodeDefault: NodeDefault<WebhookTriggerNodeType> = {
|
||||
if (!isValidParameterType(param.type)) {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.nodes.webhook.validation.invalidParameterType', {
|
||||
errorMessage: t('workflow.nodes.triggerWebhook.validation.invalidParameterType', {
|
||||
name: param.name,
|
||||
type: param.type,
|
||||
}),
|
||||
|
||||
@@ -280,6 +280,7 @@ const translation = {
|
||||
'trigger-webhook': 'Webhook Trigger',
|
||||
'trigger-plugin': 'Plugin Trigger',
|
||||
},
|
||||
customWebhook: 'Custom Webhook',
|
||||
blocksAbout: {
|
||||
'start': 'Define the initial parameters for launching a workflow',
|
||||
'end': 'Define the end and result type of a workflow',
|
||||
@@ -1028,6 +1029,10 @@ const translation = {
|
||||
responseBody: 'Response Body',
|
||||
responseBodyPlaceholder: 'Write your response body here',
|
||||
headers: 'Headers',
|
||||
validation: {
|
||||
webhookUrlRequired: 'Webhook URL is required',
|
||||
invalidParameterType: 'Invalid parameter type "{{type}}" for parameter "{{name}}"',
|
||||
},
|
||||
},
|
||||
},
|
||||
triggerStatus: {
|
||||
|
||||
@@ -253,7 +253,7 @@ const translation = {
|
||||
'start': '始める',
|
||||
},
|
||||
blocks: {
|
||||
'start': '開始',
|
||||
'start': 'ユーザー入力',
|
||||
'originalStartNode': '元の開始ノード',
|
||||
'end': '終了',
|
||||
'answer': '回答',
|
||||
@@ -280,6 +280,7 @@ const translation = {
|
||||
'trigger-webhook': 'Webhook トリガー',
|
||||
'trigger-schedule': 'スケジュールトリガー',
|
||||
},
|
||||
customWebhook: 'カスタムWebhook',
|
||||
blocksAbout: {
|
||||
'start': 'ワークフロー開始時の初期パラメータを定義します。',
|
||||
'end': 'ワークフローの終了条件と結果のタイプを定義します。',
|
||||
@@ -1028,6 +1029,10 @@ const translation = {
|
||||
responseBody: 'レスポンスボディ',
|
||||
responseBodyPlaceholder: 'ここにレスポンスボディを入力してください',
|
||||
headers: 'ヘッダー',
|
||||
validation: {
|
||||
webhookUrlRequired: 'Webhook URLが必要です',
|
||||
invalidParameterType: 'パラメータ"{{name}}"の無効なパラメータタイプ"{{type}}"です',
|
||||
},
|
||||
},
|
||||
},
|
||||
tracing: {
|
||||
|
||||
@@ -253,7 +253,7 @@ const translation = {
|
||||
'start': '开始',
|
||||
},
|
||||
blocks: {
|
||||
'start': '开始',
|
||||
'start': '用户输入',
|
||||
'originalStartNode': '原始开始节点',
|
||||
'end': '结束',
|
||||
'answer': '直接回复',
|
||||
@@ -280,6 +280,7 @@ const translation = {
|
||||
'trigger-schedule': '定时触发器',
|
||||
'trigger-plugin': '插件触发器',
|
||||
},
|
||||
customWebhook: '自定义 Webhook',
|
||||
blocksAbout: {
|
||||
'start': '定义一个 workflow 流程启动的初始参数',
|
||||
'end': '定义一个 workflow 流程的结束和结果类型',
|
||||
@@ -1028,6 +1029,10 @@ const translation = {
|
||||
responseBody: '响应体',
|
||||
responseBodyPlaceholder: '在此输入您的响应体',
|
||||
headers: 'Headers',
|
||||
validation: {
|
||||
webhookUrlRequired: '需要提供Webhook URL',
|
||||
invalidParameterType: '参数"{{name}}"的参数类型"{{type}}"无效',
|
||||
},
|
||||
},
|
||||
},
|
||||
tracing: {
|
||||
|
||||
Reference in New Issue
Block a user