Skip to content

Show readable messages for syntax errors - #137

Merged
srivastava-diya merged 1 commit into
hyperjump-io:mainfrom
srivastava-diya:fluent-syntax-errors
Oct 6, 2026
Merged

srivastava-diya merged 1 commit into
hyperjump-io:mainfrom
srivastava-diya:fluent-syntax-errors

Conversation

@srivastava-diya

Copy link
Copy Markdown
Collaborator

Show readable messages for syntax errors

Syntax diagnostics used to show the raw error codes like "comma-expected" . They now show a message from a Fluent translation (e.g. "Expected a comma").

  • Added en-US messages for all 19 syntax error codes, plus a fallback message for codes without one
  • Added a Localization class that falls back to en-US when the client's locale is not supported
  • Read the locale from the initialize request
  • Added @fluent/bundle as a direct dependency

Closes #110

@jdesrosiers jdesrosiers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. This needs a rebase, but I think it will be fine once the conflicts resolve.

@srivastava-diya

Copy link
Copy Markdown
Collaborator Author

Looks good. This needs a rebase, but I think it will be fine once the conflicts resolve.

sure, I'll rebase and merge.

@srivastava-diya
srivastava-diya merged commit d55c739 into hyperjump-io:main Oct 6, 2026
3 checks passed
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.

Translate syntax error messages with Fluent

2 participants