Skip to content

Missing localization in some of the language services #1081

@sajeerzeji

Description

@sajeerzeji

Describe the bug

Some user-facing strings within the YAML language server are not being localized and appear in English, conflicting with the client-side localization of the library.

Expected Behavior

All user-facing strings should be localized according to the application's locale settings. The following strings should be localized:

yamlValidation.ts

NON-LOCALIZED:

  • "Matches multiple schemas when only one must validate."

yamlCompletion.ts

LOCALIZED:

  • "Default value"
    NON-LOCALIZED:
  • "Inline schema"
  • "Create an item of an array"
  • "- (array item) "
  • "Allowed Values:"
  • "Example:"
  • "Source: [{}]"

yamlHover.ts

NON-LOCALIZED:

  • "JSON Schema"
  • "Allowed Values:"
  • "Example:"
  • "Source: [{}]"

yamlCodeActions.ts

NON-LOCALIZED:

  • "Jump to schema location ({})"
  • "Convert Tab to Spaces"
  • "Convert all Tabs to Spaces"
  • "Delete unused anchor: {}"
  • "Convert to boolean"
  • "Convert to block style {}"
  • "Fix key order for this map"

yaml-style.ts

NON-LOCALIZED:

  • "Flow style mapping is forbidden"
  • "Flow style sequence is forbidden"

unused-anchors.ts

NON-LOCALIZED:

  • "Unused anchor "{}""
  • "Unresolved alias "{}""

map-key-order.ts

NON-LOCALIZED:

  • "Wrong ordering of key "{}" in mapping"

yamlSchemaService.ts

LOCALIZED:

  • "$ref '{0}' in '{1}' can not be resolved."
    NON-LOCALIZED:
  • "Schema '{}' is not valid:\n{}"

jsonParser07.ts

LOCALIZED:

  • "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."
  • "String is not a RFC3339 date-time."
  • "String is not a RFC3339 date."
  • "String is not a RFC3339 time."
  • "String is not an e-mail address."
  • "String does not match IPv4 format."
  • "String does not match IPv6 format."
    NON-LOCALIZED:
  • "Property {0} is not allowed."
  • "Missing property "{0}"."
  • "Incorrect type. Expected "{0}"."
  • "Value must be {0}."

Current Behavior

The strings listed above as NON-LOCALIZED are hardcoded and not being processed through any localization mechanism. This causes them to always appear in English, while there are other localized strings in it.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions