Repository navigation
fix(js-processor): keep JSON braces out of Mongo filter i18n message - #659
Merged
Merged
Conversation
vue-i18n compiles messages at runtime and throws on `{"status": ...}` in
production builds, so the filter query dialog rendered only its mask.
Move the hint into an info tooltip beside the dialog title and keep the
$find JSON example as a code constant. Remove the unused
mock_json_placeholder message, which had the same problem.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages_form_js_processor_mock_filter_placeholderembedded JSON like{"status": "PAID"}. vue-i18n compiles messages at runtime and treats{}as interpolation. In dev, a compile error is onlyconsole.error'd; in production@intlify/core-baserethrows it, so the dialog content slot failed to render and onlyElOverlayremained.$findJSON example as a code constant (MONGO_FILTER_EXAMPLE) instead of an i18n message.packages_form_js_processor_mock_filter_tipwith brace-free text in zh-CN / zh-TW / en.packages_form_js_processor_mock_json_placeholder, which had the same problem.No Jira issue for this fix.
Validation
pnpm build:daassucceeded; built bundle containsmock_filter_tipand none of the removed keys.pnpm exec prettier --checkon the touched files: pass.node scripts/check-i18n.js packages/dag/src/components/form/js-processor/index.tsx: pass.packages/form/src/locale/lang/{zh-CN,zh-TW,en}.jswith@intlify/message-compiler@11.1.9: no failures.eslinton touched files reports only existing errors (getPrefixscope at index.tsx:529, default export in locale files).🤖 Generated with Claude Code