Skip to content

Add ajv-i18n support for localized schema validation messages#1239

Merged
datho7561 merged 2 commits into
redhat-developer:mainfrom
shin19991207:fix-1131
Apr 29, 2026
Merged

Add ajv-i18n support for localized schema validation messages#1239
datho7561 merged 2 commits into
redhat-developer:mainfrom
shin19991207:fix-1131

Conversation

@shin19991207
Copy link
Copy Markdown
Member

What does this PR do?

Added ajv-i18n support for localized schema validation messages

What issues does this PR fix or reference?

Fixes #1131

Is it tested? How?

Tested manually with the following steps:

  1. set VS Code display language to a supported language (Command Palette > Configure Display Language)
  2. create an invalid json schema file like the one provided below and test it in a yaml file:
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": [1, 2]
    }

Signed-off-by: Morgan Chang <shin19991207@gmail.com>
@shin19991207 shin19991207 requested a review from datho7561 as a code owner April 29, 2026 02:41
@datho7561
Copy link
Copy Markdown
Contributor

Seems the build is failing due formatting that prettier doesn't like

Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

After I addressed the prettier error locally, the code compiled fine and worked great!

I think this is good to merge after that error has been addressed. Would you like to do that, or would you like me to handle it?

Signed-off-by: Morgan Chang <shin19991207@gmail.com>
Comment thread src/languageservice/services/yamlSchemaService.ts Dismissed
Comment thread src/languageservice/services/yamlSchemaService.ts
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Tests pass locally, there's something going on with schemastore that's preventing them from passing on GitHub Actions I think. Thanks, Morgan!

@datho7561
Copy link
Copy Markdown
Contributor

Ahh shoot I can't merge until the tests are passing based on the repository rules.

@datho7561 datho7561 merged commit 35d8e53 into redhat-developer:main Apr 29, 2026
4 of 25 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.

Add support for ajv-i18n to localize validation messages

3 participants