Skip to content
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

Localizaton of jsonValidation schema #78737

Closed
Colengms opened this issue Aug 8, 2019 · 2 comments
Closed

Localizaton of jsonValidation schema #78737

Colengms opened this issue Aug 8, 2019 · 2 comments
Assignees

Comments

@Colengms
Copy link
Contributor

Colengms commented Aug 8, 2019

We are using contributes.jsonValidation to provide a schema for our own json settings file. VS Code displays description from the schema when hovering on keys in our settings file.

There doesn't appear to be a way to localize those descriptions in the schema, or a way to vary the schema path in package.json based on the current language.

If there is a way to accomplish this, let me know. Otherwise, I'd like to suggest VS Code add support for localization of schema json files either using a similar approach as package.json (package.nls.json), or allow a separate uri to be provided per supported language within the jsonValidation node in package.json.

Related discussion on localization of schema files: json-schema-org/json-schema-spec#53

@aeschli
Copy link
Contributor

aeschli commented Aug 19, 2019

You could consider using dynamically created schemas as described here: #77433 (comment)
The text document provider would let you load the schema of the current language.

@Colengms
Copy link
Contributor Author

Thanks for the pointer. This approach works. :)

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants