Skip to content

修复BPMN流程设计器组件翻译问题 #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2025

Conversation

cactuer
Copy link

@cactuer cactuer commented May 29, 2025

image

@YunaiV
Copy link
Contributor

YunaiV commented Jun 4, 2025

收到!我 2.6.0 发布后,合并下哈。

= = 最近有点聚焦在 iot,疯狂设计协议中。。。

@YunaiV YunaiV requested a review from Copilot June 15, 2025 07:51
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a dedicated time event configuration panel to the BPMN process designer and corrects translation mappings.

  • Introduces TimeEventConfig.vue (with DurationConfig and CycleConfig) to let users configure time, duration, or cycle timers.
  • Updates PropertiesPanel.vue to include the new time event configuration section.
  • Fixes translation keys in zh.js and enhances customTranslate.js for case-insensitive matching.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue New time event UI and sync logic
src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue ISO 8601 duration picker component
src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue CRON/ISO cycle picker component
src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue Inserts TimeEventConfig into properties panel
src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js Corrects "Sub-Process" translation keys
src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js Adds case-insensitive lookup for translations
Comments suppressed due to low confidence (4)

src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue:268

  • The updateNode and related sync logic here duplicate functionality in TimeEventConfig.vue and reference props without a defineProps call. This will never be invoked and will throw errors. Remove this block and rely on the dedicated component for node updates.
function updateNode() {

src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue:92

  • The computed import is not used in this file. Removing unused imports will clean up the code.
import { ref, computed, watch, onMounted } from 'vue'

src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js:48

  • Ensure the key matches the actual BPMN library string. If the library still emits "Sub Process (collapsed)" (no hyphen), this mapping will not apply. Verify the source text or include both variants.
'Sub-Process (collapsed)': '子流程(折叠的)',

src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js:28

  • [nitpick] Performing a .toLowerCase() lookup on every translation call can be costly for larger dictionaries. Consider building a precomputed lowercase key map once to speed up repeated lookups.
const lowerTemplate = template.toLowerCase();

@YunaiV YunaiV merged commit f6ba881 into yudaocode:master Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants