Summary
In a type:'gantt' view, the dependency-conflict dialog renders its count placeholder literally as {2} instead of the number. Root cause is a placeholder-syntax mismatch between the render code and the locale bundle:
- Render side uses a literal string replace with single braces:
A(`gantt.conflict.body`).replace(`{count}`, String(n))
- zh-CN locale bundle writes the string with double braces (i18next style):
gantt.conflict.body: "此次移动与依赖约束冲突。是否自动重新排程 {{count}} 个受影响的任务?"
- Result:
"…{{count}}…".replace("{count}", "2") → "…{2}…".
The plugin's built-in English fallback string uses single braces, so the fallback path renders correctly — the bug only appears once a locale bundle is loaded (i.e. all real usage).
Scope (verified vs. suspected)
- Verified in the
@objectstack/console@17.0.0-rc.6 bundle: gantt.conflict.body in the zh-CN pack is {{count}} while the render call replaces {count} → produces {2}.
- Worth a sweep (not asserted): other locale packs and any other gantt string rendered via
.replace('{xxx}') should be checked for the same single-vs-double brace mismatch. Note some sibling keys (e.g. autoScheduleDlg.body, quickFilter.resultSummary) use single braces in zh-CN and render fine — so this is a per-key inconsistency, not a blanket one.
Fix direction
Prefer converting gantt.conflict.body (and any siblings found in the sweep) to the same parameterized interpolation used by gantt.delete.body (t('gantt.delete.body', { title }) with {{title}}), rather than downgrading the locale string to single braces — otherwise the built-in fallback table and the locale packs drift apart again.
Environment
@objectstack/console@17.0.0-rc.6 (also present in rc.5).
Steps to reproduce
- Any
type:'gantt' view with a dependenciesField; UI language zh-CN.
- Create two tasks A→B with a dependency; drag B so it starts before A finishes to trigger the conflict dialog (
data-testid="gantt-conflict-dialog").
- Read the dialog body.
Expected: "…auto-reschedule 2 affected task(s)?"
Actual: "…自动重新排程 {2} 个受影响的任务?"
Observed while building an ObjectStack 17 app.
Summary
In a
type:'gantt'view, the dependency-conflict dialog renders its count placeholder literally as{2}instead of the number. Root cause is a placeholder-syntax mismatch between the render code and the locale bundle:"…{{count}}…".replace("{count}", "2")→"…{2}…".The plugin's built-in English fallback string uses single braces, so the fallback path renders correctly — the bug only appears once a locale bundle is loaded (i.e. all real usage).
Scope (verified vs. suspected)
@objectstack/console@17.0.0-rc.6bundle:gantt.conflict.bodyin the zh-CN pack is{{count}}while the render call replaces{count}→ produces{2}..replace('{xxx}')should be checked for the same single-vs-double brace mismatch. Note some sibling keys (e.g.autoScheduleDlg.body,quickFilter.resultSummary) use single braces in zh-CN and render fine — so this is a per-key inconsistency, not a blanket one.Fix direction
Prefer converting
gantt.conflict.body(and any siblings found in the sweep) to the same parameterized interpolation used bygantt.delete.body(t('gantt.delete.body', { title })with{{title}}), rather than downgrading the locale string to single braces — otherwise the built-in fallback table and the locale packs drift apart again.Environment
@objectstack/console@17.0.0-rc.6(also present in rc.5).Steps to reproduce
type:'gantt'view with adependenciesField; UI language zh-CN.data-testid="gantt-conflict-dialog").Expected: "…auto-reschedule 2 affected task(s)?"
Actual: "…自动重新排程 {2} 个受影响的任务?"
Observed while building an ObjectStack 17 app.