From 8c241a51e314e0aab249f6ac24c2477c5e0c7420 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 14 Jan 2026 13:42:08 -0500 Subject: [PATCH 1/6] handle l10n setup on web using webworker messaging Signed-off-by: David Thompson --- src/server.ts | 32 +++++++++++++--- src/webworker/yamlServerMain.ts | 68 +++++++++++++++++---------------- src/yamlServerInit.ts | 49 +++++++----------------- test/utils/testHelper.ts | 18 ++++----- 4 files changed, 86 insertions(+), 81 deletions(-) diff --git a/src/server.ts b/src/server.ts index 4606dce64..d4156b034 100644 --- a/src/server.ts +++ b/src/server.ts @@ -5,13 +5,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createConnection, Connection, ProposedFeatures } from 'vscode-languageserver/node'; +import { promises as fs, existsSync } from 'fs'; +import { Connection, createConnection, InitializeParams, ProposedFeatures } from 'vscode-languageserver/node'; +import { TelemetryImpl } from './languageserver/telemetry'; import { schemaRequestHandler, workspaceContext } from './languageservice/services/schemaRequestHandler'; +import { convertErrorToTelemetryMsg } from './languageservice/utils/objects'; import { YAMLServerInit } from './yamlServerInit'; import { SettingsState } from './yamlSettings'; -import { promises as fs } from 'fs'; -import { convertErrorToTelemetryMsg } from './languageservice/utils/objects'; -import { TelemetryImpl } from './languageserver/telemetry'; +import * as path from 'path'; +import * as l10n from '@vscode/l10n'; +import { URI } from 'vscode-uri'; // Create a connection for the server. let connection: Connection = null; @@ -66,4 +69,23 @@ const schemaRequestHandlerWrapper = (connection: Connection, uri: string): Promi const schemaRequestService = schemaRequestHandlerWrapper.bind(this, connection); const telemetry = new TelemetryImpl(connection); -new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry).start(); +async function setupl10nBundle(params: InitializeParams): Promise { + const __dirname = path.dirname(__filename); + const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../../../l10n'); + const locale: string = params.locale || 'en'; + if (l10nPath) { + const bundleFile = !existsSync(path.join(l10nPath, `bundle.l10n.${locale}.json`)) + ? `bundle.l10n.json` + : `bundle.l10n.${locale}.json`; + const baseBundleFile = path.join(l10nPath, bundleFile); + process.env.VSCODE_NLS_CONFIG = JSON.stringify({ + locale, + _languagePackSupport: true, + }); + await l10n.config({ + uri: URI.file(baseBundleFile).toString(), + }); + } +} + +new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry, setupl10nBundle).start(); diff --git a/src/webworker/yamlServerMain.ts b/src/webworker/yamlServerMain.ts index ba7a5a3b8..234b2fc95 100644 --- a/src/webworker/yamlServerMain.ts +++ b/src/webworker/yamlServerMain.ts @@ -3,8 +3,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as l10n from '@vscode/l10n'; import { Connection, RequestType } from 'vscode-languageserver'; -import { createConnection, BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver/browser'; +import { BrowserMessageReader, BrowserMessageWriter, createConnection } from 'vscode-languageserver/browser'; import { TelemetryImpl } from '../languageserver/telemetry'; import { schemaRequestHandler, workspaceContext } from '../languageservice/services/schemaRequestHandler'; import { YAMLServerInit } from '../yamlServerInit'; @@ -15,35 +16,38 @@ namespace FSReadFile { export const type: RequestType = new RequestType('fs/readFile'); } -const messageReader = new BrowserMessageReader(globalThis); -const messageWriter = new BrowserMessageWriter(globalThis); - -const connection = createConnection(messageReader, messageWriter); - -const yamlSettings = new SettingsState(); - -const fileSystem = { - readFile: (fsPath: string) => { - return connection.sendRequest(FSReadFile.type, fsPath); - }, +self.onmessage = (e) => { + const messageReader = new BrowserMessageReader(globalThis); + const messageWriter = new BrowserMessageWriter(globalThis); + + const connection = createConnection(messageReader, messageWriter); + + const yamlSettings = new SettingsState(); + + const fileSystem = { + readFile: (fsPath: string) => { + return connection.sendRequest(FSReadFile.type, fsPath); + }, + }; + + /** + * Handles schema content requests given the schema URI + * @param uri can be a local file, vscode request, http(s) request or a custom request + */ + const schemaRequestHandlerWrapper = (connection: Connection, uri: string): Promise => { + return schemaRequestHandler( + connection, + uri, + yamlSettings.workspaceFolders, + yamlSettings.workspaceRoot, + yamlSettings.useVSCodeContentRequest, + fileSystem + ); + }; + + const schemaRequestService = schemaRequestHandlerWrapper.bind(this, connection); + const telemetry = new TelemetryImpl(connection); + + l10n.config({ contents: e.data.l10nBundle }); + new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry).start(); }; - -/** - * Handles schema content requests given the schema URI - * @param uri can be a local file, vscode request, http(s) request or a custom request - */ -const schemaRequestHandlerWrapper = (connection: Connection, uri: string): Promise => { - return schemaRequestHandler( - connection, - uri, - yamlSettings.workspaceFolders, - yamlSettings.workspaceRoot, - yamlSettings.useVSCodeContentRequest, - fileSystem - ); -}; - -const schemaRequestService = schemaRequestHandlerWrapper.bind(this, connection); -const telemetry = new TelemetryImpl(connection); - -new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry).start(); diff --git a/src/yamlServerInit.ts b/src/yamlServerInit.ts index b114fbcef..a2c4d4548 100644 --- a/src/yamlServerInit.ts +++ b/src/yamlServerInit.ts @@ -1,26 +1,23 @@ import { Connection, InitializeParams, InitializeResult, TextDocumentSyncKind } from 'vscode-languageserver'; -import { - getLanguageService as getCustomLanguageService, - LanguageService, - SchemaRequestService, - WorkspaceContextService, -} from './languageservice/yamlLanguageService'; -import { workspaceFoldersChanged } from './languageservice/utils/paths'; import { URI } from 'vscode-uri'; -import { SettingsState } from './yamlSettings'; +import { YamlCommands } from './commands'; +import { commandExecutor } from './languageserver/commandExecutor'; import { LanguageHandlers } from './languageserver/handlers/languageHandlers'; import { NotificationHandlers } from './languageserver/handlers/notificationHandlers'; import { RequestHandlers } from './languageserver/handlers/requestHandlers'; -import { ValidationHandler } from './languageserver/handlers/validationHandlers'; import { SettingsHandler } from './languageserver/handlers/settingsHandlers'; -import { YamlCommands } from './commands'; +import { ValidationHandler } from './languageserver/handlers/validationHandlers'; import { WorkspaceHandlers } from './languageserver/handlers/workspaceHandlers'; -import { commandExecutor } from './languageserver/commandExecutor'; -import { Telemetry } from './languageservice/telemetry'; import { registerCommands } from './languageservice/services/yamlCommands'; -import * as l10n from '@vscode/l10n'; -import * as path from 'path'; -import * as fs from 'fs'; +import { Telemetry } from './languageservice/telemetry'; +import { workspaceFoldersChanged } from './languageservice/utils/paths'; +import { + getLanguageService as getCustomLanguageService, + LanguageService, + SchemaRequestService, + WorkspaceContextService, +} from './languageservice/yamlLanguageService'; +import { SettingsState } from './yamlSettings'; export class YAMLServerInit { languageService: LanguageService; @@ -33,7 +30,8 @@ export class YAMLServerInit { private yamlSettings: SettingsState, private workspaceContext: WorkspaceContextService, private schemaRequestService: SchemaRequestService, - private telemetry: Telemetry + private telemetry: Telemetry, + public setupl10nBundle: (params: InitializeParams) => Promise = () => Promise.resolve() ) { this.yamlSettings.documents.listen(this.connection); @@ -57,25 +55,6 @@ export class YAMLServerInit { }); } - public async setupl10nBundle(params: InitializeParams): Promise { - const __dirname = path.dirname(__filename); - const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../../../l10n'); - const locale: string = params.locale || 'en'; - if (l10nPath) { - const bundleFile = !fs.existsSync(path.join(l10nPath, `bundle.l10n.${locale}.json`)) - ? `bundle.l10n.json` - : `bundle.l10n.${locale}.json`; - const baseBundleFile = path.join(l10nPath, bundleFile); - process.env.VSCODE_NLS_CONFIG = JSON.stringify({ - locale, - _languagePackSupport: true, - }); - await l10n.config({ - uri: URI.file(baseBundleFile).toString(), - }); - } - } - // public for test setup async connectionInitialized(params: InitializeParams): Promise { this.yamlSettings.capabilities = params.capabilities; diff --git a/test/utils/testHelper.ts b/test/utils/testHelper.ts index 93bc72119..8d9114618 100644 --- a/test/utils/testHelper.ts +++ b/test/utils/testHelper.ts @@ -2,20 +2,20 @@ * Copyright (c) Red Hat. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createConnection, Connection, ClientCapabilities as LSPClientCapabilities } from 'vscode-languageserver/node'; -import path = require('path'); import { promises as fs } from 'fs'; -import { SettingsState } from '../../src/yamlSettings'; -import { FileSystem, schemaRequestHandler, workspaceContext } from '../../src/languageservice/services/schemaRequestHandler'; -import { YAMLServerInit } from '../../src/yamlServerInit'; +import { ClientCapabilities } from 'vscode-json-languageservice'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +import { Connection, createConnection, ClientCapabilities as LSPClientCapabilities } from 'vscode-languageserver/node'; import { LanguageService, LanguageSettings } from '../../src'; -import { ValidationHandler } from '../../src/languageserver/handlers/validationHandlers'; import { LanguageHandlers } from '../../src/languageserver/handlers/languageHandlers'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { ClientCapabilities } from 'vscode-json-languageservice'; +import { ValidationHandler } from '../../src/languageserver/handlers/validationHandlers'; +import { JSONSchema } from '../../src/languageservice/jsonSchema'; import { yamlDocumentsCache } from '../../src/languageservice/parser/yaml-documents'; +import { FileSystem, schemaRequestHandler, workspaceContext } from '../../src/languageservice/services/schemaRequestHandler'; +import { YAMLServerInit } from '../../src/yamlServerInit'; +import { SettingsState } from '../../src/yamlSettings'; import { TestTelemetry } from './testsTypes'; -import { JSONSchema } from '../../src/languageservice/jsonSchema'; +import * as path from 'path'; export function toFsPath(str: unknown): string { if (typeof str !== 'string') { From 4645931fb124bc8b9e7598a5e0c411f8a01a0a64 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 15 Jan 2026 10:20:45 -0500 Subject: [PATCH 2/6] Update base translation text so it's all English On the client side, in VS Code's l10n library, it doesn't provide the translation bundle if the language is set to English. This change makes the text in the calls to `l10n.t` the English text, so that the English text appears if no translations are loaded. Signed-off-by: David Thompson --- l10n/bundle.l10n.de.json | 109 +++++++++--------- l10n/bundle.l10n.fr.json | 109 +++++++++--------- l10n/bundle.l10n.ja.json | 109 +++++++++--------- l10n/bundle.l10n.json | 109 +++++++++--------- l10n/bundle.l10n.ko.json | 109 +++++++++--------- l10n/bundle.l10n.zh-cn.json | 109 +++++++++--------- l10n/bundle.l10n.zh-tw.json | 109 +++++++++--------- src/languageservice/parser/jsonParser07.ts | 77 +++++++------ .../services/validation/unused-anchors.ts | 4 +- .../services/validation/yaml-style.ts | 4 +- .../services/yamlCodeActions.ts | 14 +-- .../services/yamlCompletion.ts | 8 +- src/languageservice/services/yamlHover.ts | 6 +- .../services/yamlSchemaService.ts | 25 ++-- test/bundlel10n.test.ts | 4 +- 15 files changed, 459 insertions(+), 446 deletions(-) diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index fbf73d332..538dfb4db 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -1,57 +1,58 @@ { - "Default Value": "Standardwert", - "json.schema.invalidref": "$ref '{0}' in '{1}' kann nicht aufgelöst werden.", - "json.schema.problemloadingref": "Probleme beim Laden der Referenz '{0}': {1}", - "json.schema.nocontent": "Schema konnte nicht von '{0}' geladen werden: Kein Inhalt.", - "json.schema.invalidFormat": "Inhalt von '{0}' konnte nicht analysiert werden: Analysefehler in Zeile:{1}, Spalte:{2}", - "json.schema.invalidSchema": "Schema '{0}' ist ungültig: {1}", - "colorHexFormatWarning": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", - "dateTimeFormatWarning": "Zeichenfolge ist kein RFC3339-Datum-Zeit-Wert.", - "dateFormatWarning": "Zeichenfolge ist kein RFC3339-Datum.", - "timeFormatWarning": "Zeichenfolge ist keine RFC3339-Zeit.", - "emailFormatWarning": "Zeichenfolge ist keine E-Mail-Adresse.", - "ipv4FormatWarning": "Zeichenfolge entspricht nicht dem IPv4-Format.", - "ipv6FormatWarning": "Zeichenfolge entspricht nicht dem IPv6-Format.", - "enumWarning": "Wert wird nicht akzeptiert. Gültige Werte: {0}.", - "typeArrayMismatchWarning": "Falscher Typ. Erwartet wird einer von {0}.", - "notSchemaWarning": "Entspricht einem Schema, das nicht zulässig ist.", - "oneOfWarning": "Entspricht mehreren Schemata, obwohl nur eines gültig sein darf.", - "ifFilePatternAssociation": "filePatternAssociation '{0}' stimmt nicht mit der Dokument-URI '{1}' überein", - "multipleOfWarning": "Wert ist nicht durch {0} teilbar.", - "exclusiveMinimumWarning": "Wert liegt unter dem exklusiven Minimum von {0}.", - "exclusiveMaximumWarning": "Wert liegt über dem exklusiven Maximum von {0}.", - "minimumWarning": "Wert liegt unter dem Minimum von {0}.", - "maximumWarning": "Wert liegt über dem Maximum von {0}.", - "minLengthWarning": "Zeichenfolge ist kürzer als die minimale Länge von {0}.", - "maxLengthWarning": "Zeichenfolge ist länger als die maximale Länge von {0}.", - "patternWarning": "Zeichenfolge stimmt nicht mit dem Muster \"{0}\" überein.", - "uriEmpty": "URI erwartet.", - "uriSchemeMissing": "URI mit Schema wird erwartet.", - "uriFormatWarning": "Zeichenfolge ist keine gültige URI: {0}", - "additionalItemsWarning": "Array hat zu viele Elemente laut Schema. Erwartet: {0} oder weniger.", - "requiredItemMissingWarning": "Array enthält das erforderliche Element nicht.", - "minItemsWarning": "Array hat zu wenige Elemente. Erwartet: {0} oder mehr.", - "maxItemsWarning": "Array hat zu viele Elemente. Erwartet: {0} oder weniger.", - "uniqueItemsWarning": "Array enthält doppelte Elemente.", - "DisallowedExtraPropWarning": "Eigenschaft {0} ist nicht erlaubt.", - "MaxPropWarning": "Objekt hat mehr Eigenschaften als das Limit von {0}.", - "MinPropWarning": "Objekt hat weniger Eigenschaften als die erforderliche Anzahl von {0}.", - "RequiredDependentPropWarning": "Objekt fehlt die Eigenschaft {0}, die von Eigenschaft {1} benötigt wird.", + "Default value": "Standardwert", + "$ref '{0}' in '{1}' cannot be resolved.": "$ref '{0}' in '{1}' kann nicht aufgelöst werden.", + "Problems loading reference '{0}': {1}": "Probleme beim Laden der Referenz '{0}': {1}", + "Unable to load schema from '{0}': No content.": "Schema konnte nicht von '{0}' geladen werden: Kein Inhalt.", + "Unable to load schema from '{0}': No content. {1}": "Schema konnte nicht von '{0}' geladen werden: Kein Inhalt. {1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "Inhalt von '{0}' konnte nicht analysiert werden: Analysefehler in Zeile:{1}, Spalte:{2}", + "Schema '{0}' is not valid: {1}": "Schema '{0}' ist ungültig: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", + "String is not a RFC3339 date-time.": "Zeichenfolge ist kein RFC3339-Datum-Zeit-Wert.", + "String is not a RFC3339 date.": "Zeichenfolge ist kein RFC3339-Datum.", + "String is not a RFC3339 time.": "Zeichenfolge ist keine RFC3339-Zeit.", + "String is not an e-mail address.": "Zeichenfolge ist keine E-Mail-Adresse.", + "String does not match IPv4 format.": "Zeichenfolge entspricht nicht dem IPv4-Format.", + "String does not match IPv6 format.": "Zeichenfolge entspricht nicht dem IPv6-Format.", + "Value is not accepted. Valid values: {0}.": "Wert wird nicht akzeptiert. Gültige Werte: {0}.", + "Incorrect type. Expected one of {0}.": "Falscher Typ. Erwartet wird einer von {0}.", + "Matches a schema that is not allowed.": "Entspricht einem Schema, das nicht zulässig ist.", + "Matches multiple schemas when only one must validate.": "Entspricht mehreren Schemata, obwohl nur eines gültig sein darf.", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' stimmt nicht mit der Dokument-URI '{1}' überein", + "Value is not divisible by {0}.": "Wert ist nicht durch {0} teilbar.", + "Value is below the exclusive minimum of {0}.": "Wert liegt unter dem exklusiven Minimum von {0}.", + "Value is above the exclusive maximum of {0}.": "Wert liegt über dem exklusiven Maximum von {0}.", + "Value is below the minimum of {0}.": "Wert liegt unter dem Minimum von {0}.", + "Value is above the maximum of {0}.": "Wert liegt über dem Maximum von {0}.", + "String is shorter than the minimum length of {0}.": "Zeichenfolge ist kürzer als die minimale Länge von {0}.", + "String is longer than the maximum length of {0}.": "Zeichenfolge ist länger als die maximale Länge von {0}.", + "String does not match the pattern of \"{0}\".": "Zeichenfolge stimmt nicht mit dem Muster \"{0}\" überein.", + "URI expected.": "URI erwartet.", + "URI with a scheme is expected.": "URI mit Schema wird erwartet.", + "String is not a URI: {0}": "Zeichenfolge ist keine gültige URI: {0}", + "Array has too many items according to schema. Expected {0} or fewer.": "Array hat zu viele Elemente laut Schema. Erwartet: {0} oder weniger.", + "Array does not contain required item.": "Array enthält das erforderliche Element nicht.", + "Array has too few items. Expected {0} or more.": "Array hat zu wenige Elemente. Erwartet: {0} oder mehr.", + "Array has too many items. Expected {0} or fewer.": "Array hat zu viele Elemente. Erwartet: {0} oder weniger.", + "Array has duplicate items.": "Array enthält doppelte Elemente.", + "Property {0} is not allowed.": "Eigenschaft {0} ist nicht erlaubt.", + "Object has more properties than limit of {0}.": "Objekt hat mehr Eigenschaften als das Limit von {0}.", + "Object has fewer properties than the required number of {0}": "Objekt hat weniger Eigenschaften als die erforderliche Anzahl von {0}.", + "Object is missing property {0} required by property {1}.": "Objekt fehlt die Eigenschaft {0}, die von Eigenschaft {1} benötigt wird.", "Inline schema": "Inline-Schema", - "create.item.array": "Ein Element eines Arrays erstellen{0}{1}", - "array.item": "- (Array-Element) ", - "allowedValues": "Erlaubte Werte:", - "example": "Beispiel:", - "source": "Quelle: [{0}]({1})", - "jumpToSchema": "Zur Schema-Position springen ({0})", - "convertToSpace": "Tab in Leerzeichen umwandeln", - "convertAllSpaceToTab": "Alle Tabs in Leerzeichen umwandeln", - "deleteUnusedAnchor": "Nicht verwendeten Anker löschen: {0}", - "convertToBoolean": "In Boolean umwandeln", - "convertToBlockStyle": "In Blockstil {0} umwandeln", - "fixKeyOrderToMap": "Schlüsselreihenfolge für diese Map korrigieren", - "flowStyleMapForbidden": "Flow-Stil-Mapping ist verboten", - "flowStyleSeqForbidden": "Flow-Stil-Sequenz ist verboten", - "unUsedAnchor": "Nicht verwendeter Anker \"{0}\"", - "unUsedAlias": "Nicht aufgelöstes Alias \"{0}\"" + "Create an item of an array{0}{1}": "Ein Element eines Arrays erstellen{0}{1}", + "- (array item) ": "- (Array-Element) ", + "Allowed Values:": "Erlaubte Werte:", + "Example:": "Beispiel:", + "Source: [{0}]({1})": "Quelle: [{0}]({1})", + "Jump to schema location ({0})": "Zur Schema-Position springen ({0})", + "Convert Tab to Spaces": "Tab in Leerzeichen umwandeln", + "Convert all Tabs to Spaces": "Alle Tabs in Leerzeichen umwandeln", + "Delete unused anchor: {0}": "Nicht verwendeten Anker löschen: {0}", + "Convert to boolean": "In Boolean umwandeln", + "Convert to block style {0}": "In Blockstil {0} umwandeln", + "Fix key order for this map": "Schlüsselreihenfolge für diese Map korrigieren", + "Flow style mapping is forbidden": "Flow-Stil-Mapping ist verboten", + "Flow style sequence is forbidden": "Flow-Stil-Sequenz ist verboten", + "Unused anchor \"{0}\"": "Nicht verwendeter Anker \"{0}\"", + "Unresolved alias \"{0}\"": "Nicht aufgelöstes Alias \"{0}\"" } diff --git a/l10n/bundle.l10n.fr.json b/l10n/bundle.l10n.fr.json index 7636639c7..d046c7b12 100644 --- a/l10n/bundle.l10n.fr.json +++ b/l10n/bundle.l10n.fr.json @@ -1,57 +1,58 @@ { - "Default Value": "Valeur par défaut", - "json.schema.invalidref": "$ref '{0}' dans '{1}' ne peut pas être résolu", - "json.schema.problemloadingref": "Problèmes de chargement de la référence '{0}' : {1}", - "json.schema.noContent": "Impossible de charger le schéma à partir de {0}: aucun contenu.", - "json.schema.invalidFormat": "Impossible d’analyser le contenu de {0}: erreur d’analyse à la ligne:{1}, colonne:{2}", - "json.schema.invalidSchema": "Le schéma '{0}' n’est pas valide: {1}", - "colorHexFormatWarning": "Format de couleur non valide. Utilisez #RGB, #RGBA, #RRGGBB ou #RRGGBBAA.", - "dateTimeFormatWarning": "La chaîne n'est pas une date-heure RFC3339.", - "dateFormatWarning": "La chaîne n'est pas une date RFC3339.", - "timeFormatWarning": "La chaîne n'est pas une heure RFC3339.", - "emailFormatWarning": "La chaîne n'est pas une adresse e-mail.", - "ipv4FormatWarning": "La chaîne ne correspond pas au format IPv4.", - "ipv6FormatWarning": "La chaîne ne correspond pas au format IPv6.", - "enumWarning": "Valeur non acceptée. Valeurs valides: {0}.", - "typeArrayMismatchWarning": "Type incorrect. On attend un des {0}.", - "notSchemaWarning": "Correspond à un schéma qui n'est pas autorisé.", - "oneOfWarning": "Correspond à plusieurs schémas lorsqu'un seul doit être validé.", - "ifFilePatternAssociation": "filePatternAssociation '{0}' ne correspond pas à l'URI du document '{1}'", - "multipleOfWarning": "La valeur n'est pas divisible par {0}.", - "exclusiveMinimumWarning": "La valeur est inférieure au minimum exclusif de {0}.", - "exclusiveMaximumWarning": "La valeur est supérieure au maximum exclusif de {0}.", - "minimumWarning": "La valeur est inférieure au minimum de {0}.", - "maximumWarning": "La valeur est supérieure au maximum de {0}.", - "minLengthWarning": "La chaîne est plus courte que la longueur minimale de {0}.", - "maxLengthWarning": "La chaîne est plus longue que la longueur maximale de {0}.", - "patternWarning": "La chaîne ne correspond pas au modèle de '{0}'.", - "uriEmpty": "URI attendu.", - "uriSchemeMissing": "Une URI avec un schéma est attendue.", - "uriFormatWarning": "La chaîne n'est pas un URI: {0}", - "additionalItemsWarning": "Le tableau contient trop d'éléments selon le schéma. Valeur attendue : {0} ou moins.", - "requiredItemMissingWarning": "Le tableau ne contient pas l'élément requis.", - "minItemsWarning": "Le tableau contient trop peu d'éléments. On attend {0} ou plus.", - "maxItemsWarning": "Le tableau contient trop d'éléments. On attend {0} ou moins.", - "uniqueItemsWarning": "Le tableau contient des éléments en double.", - "DisallowedExtraPropWarning": "La propriété {0} n'est pas autorisée.", - "MaxPropWarning": "L'objet a plus de propriétés que la limite de {0}.", - "MinPropWarning": "L'objet a moins de propriétés que le nombre requis de {0}", - "RequiredDependentPropWarning": "L'objet ne possède pas la propriété {0} requise par la propriété {1}.", + "Default value": "Valeur par défaut", + "$ref '{0}' in '{1}' cannot be resolved.": "$ref '{0}' dans '{1}' ne peut pas être résolu", + "Problems loading reference '{0}': {1}": "Problèmes de chargement de la référence '{0}' : {1}", + "Unable to load schema from '{0}': No content.": "Impossible de charger le schéma à partir de {0}: aucun contenu.", + "Unable to load schema from '{0}': No content. {1}": "Impossible de charger le schéma à partir de {0}: aucun contenu. {1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "Impossible d’analyser le contenu de {0}: erreur d’analyse à la ligne:{1}, colonne:{2}", + "Schema '{0}' is not valid: {1}": "Le schéma '{0}' n’est pas valide: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "Format de couleur non valide. Utilisez #RGB, #RGBA, #RRGGBB ou #RRGGBBAA.", + "String is not a RFC3339 date-time.": "La chaîne n'est pas une date-heure RFC3339.", + "String is not a RFC3339 date.": "La chaîne n'est pas une date RFC3339.", + "String is not a RFC3339 time.": "La chaîne n'est pas une heure RFC3339.", + "String is not an e-mail address.": "La chaîne n'est pas une adresse e-mail.", + "String does not match IPv4 format.": "La chaîne ne correspond pas au format IPv4.", + "String does not match IPv6 format.": "La chaîne ne correspond pas au format IPv6.", + "Value is not accepted. Valid values: {0}.": "Valeur non acceptée. Valeurs valides: {0}.", + "Incorrect type. Expected one of {0}.": "Type incorrect. On attend un des {0}.", + "Matches a schema that is not allowed.": "Correspond à un schéma qui n'est pas autorisé.", + "Matches multiple schemas when only one must validate.": "Correspond à plusieurs schémas lorsqu'un seul doit être validé.", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' ne correspond pas à l'URI du document '{1}'", + "Value is not divisible by {0}.": "La valeur n'est pas divisible par {0}.", + "Value is below the exclusive minimum of {0}.": "La valeur est inférieure au minimum exclusif de {0}.", + "Value is above the exclusive maximum of {0}.": "La valeur est supérieure au maximum exclusif de {0}.", + "Value is below the minimum of {0}.": "La valeur est inférieure au minimum de {0}.", + "Value is above the maximum of {0}.": "La valeur est supérieure au maximum de {0}.", + "String is shorter than the minimum length of {0}.": "La chaîne est plus courte que la longueur minimale de {0}.", + "String is longer than the maximum length of {0}.": "La chaîne est plus longue que la longueur maximale de {0}.", + "String does not match the pattern of \"{0}\".": "La chaîne ne correspond pas au modèle de '{0}'.", + "URI expected.": "URI attendu.", + "URI with a scheme is expected.": "Une URI avec un schéma est attendue.", + "String is not a URI: {0}": "La chaîne n'est pas un URI: {0}", + "Array has too many items according to schema. Expected {0} or fewer.": "Le tableau contient trop d'éléments selon le schéma. Valeur attendue : {0} ou moins.", + "Array does not contain required item.": "Le tableau ne contient pas l'élément requis.", + "Array has too few items. Expected {0} or more.": "Le tableau contient trop peu d'éléments. On attend {0} ou plus.", + "Array has too many items. Expected {0} or fewer.": "Le tableau contient trop d'éléments. On attend {0} ou moins.", + "Array has duplicate items.": "Le tableau contient des éléments en double.", + "Property {0} is not allowed.": "La propriété {0} n'est pas autorisée.", + "Object has more properties than limit of {0}.": "L'objet a plus de propriétés que la limite de {0}.", + "Object has fewer properties than the required number of {0}": "L'objet a moins de propriétés que le nombre requis de {0}", + "Object is missing property {0} required by property {1}.": "L'objet ne possède pas la propriété {0} requise par la propriété {1}.", "Inline schema": "Schéma en ligne", - "create.item.array": "Créer un élément d'un tableau {0} {1}", - "array.item": "- (élément de tableau)", - "allowedValues": "Valeurs autorisées:", - "example": "Exemple:", - "source": "Source: [{0}]{1}", - "jumpToSchema": "Accéder à l'emplacement du schéma ({0})", - "convertToSpace": "Convertir les tabulations en espaces", - "convertAllSpaceToTab": "Convertir toutes les tabulations en espaces", - "deleteUnusedAnchor": "Supprimer l'ancre inutilisée: {0}", - "convertToBoolean": "Convertir en booléen", - "convertToBlockStyle": "Convertir en style de bloc {0}", - "fixKeyOrderToMap": "Corriger l'ordre des touches pour cette carte", - "flowStyleMapForbidden": "Le mappage de style de flux est interdit", - "flowStyleSeqForbidden": "La séquence de style Flow est interdite", - "unUsedAnchor": "Ancre inutilisée '{0}'", - "unUsedAlias": "Alias ​​non résolu '{0}'" + "Create an item of an array{0}{1}": "Créer un élément d'un tableau {0} {1}", + "- (array item) ": "- (élément de tableau)", + "Allowed Values:": "Valeurs autorisées:", + "Example:": "Exemple:", + "Source: [{0}]({1})": "Source: [{0}]({1})", + "Jump to schema location ({0})": "Accéder à l'emplacement du schéma ({0})", + "Convert Tab to Spaces": "Convertir les tabulations en espaces", + "Convert all Tabs to Spaces": "Convertir toutes les tabulations en espaces", + "Delete unused anchor: {0}": "Supprimer l'ancre inutilisée: {0}", + "Convert to boolean": "Convertir en booléen", + "Convert to block style {0}": "Convertir en style de bloc {0}", + "Fix key order for this map": "Corriger l'ordre des touches pour cette carte", + "Flow style mapping is forbidden": "Le mappage de style de flux est interdit", + "Flow style sequence is forbidden": "La séquence de style Flow est interdite", + "Unused anchor \"{0}\"": "Ancre inutilisée '{0}'", + "Unresolved alias \"{0}\"": "Alias non résolu '{0}'" } diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index 943da607d..0d13d0872 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -1,57 +1,58 @@ { - "Default Value": "デフォルト値", - "json.schema.invalidref": "'{1}' の $ref '{0}' を解決できません。", - "json.schema.problemloadingref": "参照 '{0}' の読み込み中に問題が発生しました: {1}", - "json.schema.nocontent": "'{0}' からスキーマを読み込めませんでした: コンテンツがありません。", - "json.schema.invalidFormat": "'{0}' の内容を解析できませんでした: 行 {1}、列 {2} で解析エラーが発生しました", - "json.schema.invalidSchema": "スキーマ '{0}' は無効です: {1}", - "colorHexFormatWarning": "無効なカラー形式です。#RGB、#RGBA、#RRGGBB、または #RRGGBBAA を使用してください。", - "dateTimeFormatWarning": "文字列は RFC3339 の日付と時刻形式ではありません。", - "dateFormatWarning": "文字列は RFC3339 の日付形式ではありません。", - "timeFormatWarning": "文字列は RFC3339 の時刻形式ではありません。", - "emailFormatWarning": "文字列はメールアドレスではありません。", - "ipv4FormatWarning": "文字列が IPv4 形式と一致しません。", - "ipv6FormatWarning": "文字列が IPv6 形式と一致しません。", - "enumWarning": "値が許可されていません。有効な値: {0}。", - "typeArrayMismatchWarning": "タイプが正しくありません。期待される型: {0} のいずれか。", - "notSchemaWarning": "許可されていないスキーマに一致しています。", - "oneOfWarning": "複数のスキーマに一致しています。1つだけが有効である必要があります。", - "ifFilePatternAssociation": "filePatternAssociation '{0}' がドキュメント URI '{1}' と一致しません", - "multipleOfWarning": "値は {0} で割り切れません。", - "exclusiveMinimumWarning": "値が {0} の排他的最小値より小さいです。", - "exclusiveMaximumWarning": "値が {0} の排他的最大値を超えています。", - "minimumWarning": "値が最小値 {0} を下回っています。", - "maximumWarning": "値が最大値 {0} を超えています。", - "minLengthWarning": "文字列の長さが最小長 {0} 未満です。", - "maxLengthWarning": "文字列の長さが最大長 {0} を超えています。", - "patternWarning": "文字列がパターン \"{0}\" に一致しません。", - "uriEmpty": "URI が必要です。", - "uriSchemeMissing": "スキームを含む URI が必要です。", - "uriFormatWarning": "文字列が有効な URI ではありません: {0}", - "additionalItemsWarning": "配列に含まれる項目数がスキーマの上限 {0} を超えています。", - "requiredItemMissingWarning": "配列に必要な項目が含まれていません。", - "minItemsWarning": "配列の項目数が少なすぎます。{0} 項目以上必要です。", - "maxItemsWarning": "配列の項目数が多すぎます。{0} 項目以下にしてください。", - "uniqueItemsWarning": "配列に重複する項目があります。", - "DisallowedExtraPropWarning": "プロパティ {0} は許可されていません。", - "MaxPropWarning": "オブジェクトのプロパティ数が制限値 {0} を超えています。", - "MinPropWarning": "オブジェクトのプロパティ数が必要数 {0} に満たないです。", - "RequiredDependentPropWarning": "プロパティ {1} によって必要とされるプロパティ {0} が存在しません。", + "Default value": "デフォルト値", + "$ref '{0}' in '{1}' cannot be resolved.": "'{1}' の $ref '{0}' を解決できません。", + "Problems loading reference '{0}': {1}": "参照 '{0}' の読み込み中に問題が発生しました: {1}", + "Unable to load schema from '{0}': No content.": "'{0}' からスキーマを読み込めませんでした: コンテンツがありません。", + "Unable to load schema from '{0}': No content. {1}": "'{0}' からスキーマを読み込めませんでした: コンテンツがありません。{1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "'{0}' の内容を解析できませんでした: 行 {1}、列 {2} で解析エラーが発生しました", + "Schema '{0}' is not valid: {1}": "スキーマ '{0}' は無効です: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "無効なカラー形式です。#RGB、#RGBA、#RRGGBB、または #RRGGBBAA を使用してください。", + "String is not a RFC3339 date-time.": "文字列は RFC3339 の日付と時刻形式ではありません。", + "String is not a RFC3339 date.": "文字列は RFC3339 の日付形式ではありません。", + "String is not a RFC3339 time.": "文字列は RFC3339 の時刻形式ではありません。", + "String is not an e-mail address.": "文字列はメールアドレスではありません。", + "String does not match IPv4 format.": "文字列が IPv4 形式と一致しません。", + "String does not match IPv6 format.": "文字列が IPv6 形式と一致しません。", + "Value is not accepted. Valid values: {0}.": "値が許可されていません。有効な値: {0}。", + "Incorrect type. Expected one of {0}.": "タイプが正しくありません。期待される型: {0} のいずれか。", + "Matches a schema that is not allowed.": "許可されていないスキーマに一致しています。", + "Matches multiple schemas when only one must validate.": "複数のスキーマに一致しています。1つだけが有効である必要があります。", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' がドキュメント URI '{1}' と一致しません", + "Value is not divisible by {0}.": "値は {0} で割り切れません。", + "Value is below the exclusive minimum of {0}.": "値が {0} の排他的最小値より小さいです。", + "Value is above the exclusive maximum of {0}.": "値が {0} の排他的最大値を超えています。", + "Value is below the minimum of {0}.": "値が最小値 {0} を下回っています。", + "Value is above the maximum of {0}.": "値が最大値 {0} を超えています。", + "String is shorter than the minimum length of {0}.": "文字列の長さが最小長 {0} 未満です。", + "String is longer than the maximum length of {0}.": "文字列の長さが最大長 {0} を超えています。", + "String does not match the pattern of \"{0}\".": "文字列がパターン \"{0}\" に一致しません。", + "URI expected.": "URI が必要です。", + "URI with a scheme is expected.": "スキームを含む URI が必要です。", + "String is not a URI: {0}": "文字列が有効な URI ではありません: {0}", + "Array has too many items according to schema. Expected {0} or fewer.": "配列に含まれる項目数がスキーマの上限 {0} を超えています。", + "Array does not contain required item.": "配列に必要な項目が含まれていません。", + "Array has too few items. Expected {0} or more.": "配列の項目数が少なすぎます。{0} 項目以上必要です。", + "Array has too many items. Expected {0} or fewer.": "配列の項目数が多すぎます。{0} 項目以下にしてください。", + "Array has duplicate items.": "配列に重複する項目があります。", + "Property {0} is not allowed.": "プロパティ {0} は許可されていません。", + "Object has more properties than limit of {0}.": "オブジェクトのプロパティ数が制限値 {0} を超えています。", + "Object has fewer properties than the required number of {0}": "オブジェクトのプロパティ数が必要数 {0} に満たないです。", + "Object is missing property {0} required by property {1}.": "プロパティ {1} によって必要とされるプロパティ {0} が存在しません。", "Inline schema": "インラインスキーマ", - "create.item.array": "配列の項目を作成する{0}{1}", - "array.item": "- (配列項目)", - "allowedValues": "許可された値:", - "example": "例:", - "source": "出典: [{0}]({1})", - "jumpToSchema": "スキーマの位置へジャンプ ({0})", - "convertToSpace": "タブをスペースに変換", - "convertAllSpaceToTab": "すべてのスペースをタブに変換", - "deleteUnusedAnchor": "未使用のアンカーを削除: {0}", - "convertToBoolean": "ブール値に変換", - "convertToBlockStyle": "ブロックスタイル {0} に変換", - "fixKeyOrderToMap": "このマップのキーの順序を修正する", - "flowStyleMapForbidden": "フロースタイルのマッピングは禁止されています", - "flowStyleSeqForbidden": "フロースタイルのシーケンスは禁止されています", - "unUsedAnchor": "未使用のアンカー \"{0}\"", - "unUsedAlias": "未解決のエイリアス \"{0}\"" + "Create an item of an array{0}{1}": "配列の項目を作成する{0}{1}", + "- (array item) ": "- (配列項目)", + "Allowed Values:": "許可された値:", + "Example:": "例:", + "Source: [{0}]({1})": "出典: [{0}]({1})", + "Jump to schema location ({0})": "スキーマの位置へジャンプ ({0})", + "Convert Tab to Spaces": "タブをスペースに変換", + "Convert all Tabs to Spaces": "すべてのスペースをタブに変換", + "Delete unused anchor: {0}": "未使用のアンカーを削除: {0}", + "Convert to boolean": "ブール値に変換", + "Convert to block style {0}": "ブロックスタイル {0} に変換", + "Fix key order for this map": "このマップのキーの順序を修正する", + "Flow style mapping is forbidden": "フロースタイルのマッピングは禁止されています", + "Flow style sequence is forbidden": "フロースタイルのシーケンスは禁止されています", + "Unused anchor \"{0}\"": "未使用のアンカー \"{0}\"", + "Unresolved alias \"{0}\"": "未解決のエイリアス \"{0}\"" } diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json index f81f6e796..8172e543b 100644 --- a/l10n/bundle.l10n.json +++ b/l10n/bundle.l10n.json @@ -1,57 +1,58 @@ { - "Default Value": "Default value", - "json.schema.invalidref": "$ref '{0}' in '{1}' can not be resolved.", - "json.schema.problemloadingref": "Problems loading reference '{0}': {1}", - "json.schema.noContent": "Unable to load schema from '{0}': No content.", - "json.schema.invalidFormat": "Unable to parse content from '{0}': Parse error at line: {1} column: {2}", - "json.schema.invalidSchema": "Schema '{0}' is not valid: {1}", - "colorHexFormatWarning": "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.", - "dateTimeFormatWarning": "String is not a RFC3339 date-time.", - "dateFormatWarning": "String is not a RFC3339 date.", - "timeFormatWarning": "String is not a RFC3339 time.", - "emailFormatWarning": "String is not an e-mail address.", - "ipv4FormatWarning": "String does not match IPv4 format.", - "ipv6FormatWarning": "String does not match IPv6 format.", - "enumWarning": "Value is not accepted. Valid values: {0}.", - "typeArrayMismatchWarning": "Incorrect type. Expected one of {0}.", - "notSchemaWarning": "Matches a schema that is not allowed.", - "oneOfWarning": "Matches multiple schemas when only one must validate.", - "ifFilePatternAssociation": "filePatternAssociation '{0}' does not match with doc uri '{1}'", - "multipleOfWarning": "Value is not divisible by {0}.", - "exclusiveMinimumWarning": "Value is below the exclusive minimum of {0}.", - "exclusiveMaximumWarning": "Value is above the exclusive maximum of {0}.", - "minimumWarning": "Value is below the minimum of {0}.", - "maximumWarning": "Value is above the maximum of {0}.", - "minLengthWarning": "String is shorter than the minimum length of {0}.", - "maxLengthWarning": "String is longer than the maximum length of {0}.", - "patternWarning": "String does not match the pattern of \"{0}\".", - "uriEmpty": "URI expected.", - "uriSchemeMissing": "URI with a scheme is expected.", - "uriFormatWarning": "String is not a URI: {0}", - "additionalItemsWarning": "Array has too many items according to schema. Expected {0} or fewer.", - "requiredItemMissingWarning": "Array does not contain required item.", - "minItemsWarning": "Array has too few items. Expected {0} or more.", - "maxItemsWarning": "Array has too many items. Expected {0} or fewer.", - "uniqueItemsWarning": "Array has duplicate items.", - "DisallowedExtraPropWarning": "Property {0} is not allowed.", - "MaxPropWarning": "Object has more properties than limit of {0}.", - "MinPropWarning": "Object has fewer properties than the required number of {0}", - "RequiredDependentPropWarning": "Object is missing property {0} required by property {1}.", + "Default value": "Default value", + "$ref '{0}' in '{1}' cannot be resolved.": "$ref '{0}' in '{1}' cannot be resolved.", + "Problems loading reference '{0}': {1}": "Problems loading reference '{0}': {1}", + "Unable to load schema from '{0}': No content.": "Unable to load schema from '{0}': No content.", + "Unable to load schema from '{0}': No content. {1}": "Unable to load schema from '{0}': No content. {1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "Unable to parse content from '{0}': Parse error at line: {1} column: {2}", + "Schema '{0}' is not valid: {1}": "Schema '{0}' is not valid: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.", + "String is not a RFC3339 date-time.": "String is not a RFC3339 date-time.", + "String is not a RFC3339 date.": "String is not a RFC3339 date.", + "String is not a RFC3339 time.": "String is not a RFC3339 time.", + "String is not an e-mail address.": "String is not an e-mail address.", + "String does not match IPv4 format.": "String does not match IPv4 format.", + "String does not match IPv6 format.": "String does not match IPv6 format.", + "Value is not accepted. Valid values: {0}.": "Value is not accepted. Valid values: {0}.", + "Incorrect type. Expected one of {0}.": "Incorrect type. Expected one of {0}.", + "Matches a schema that is not allowed.": "Matches a schema that is not allowed.", + "Matches multiple schemas when only one must validate.": "Matches multiple schemas when only one must validate.", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' does not match with doc uri '{1}'", + "Value is not divisible by {0}.": "Value is not divisible by {0}.", + "Value is below the exclusive minimum of {0}.": "Value is below the exclusive minimum of {0}.", + "Value is above the exclusive maximum of {0}.": "Value is above the exclusive maximum of {0}.", + "Value is below the minimum of {0}.": "Value is below the minimum of {0}.", + "Value is above the maximum of {0}.": "Value is above the maximum of {0}.", + "String is shorter than the minimum length of {0}.": "String is shorter than the minimum length of {0}.", + "String is longer than the maximum length of {0}.": "String is longer than the maximum length of {0}.", + "String does not match the pattern of \"{0}\".": "String does not match the pattern of \"{0}\".", + "URI expected.": "URI expected.", + "URI with a scheme is expected.": "URI with a scheme is expected.", + "String is not a URI: {0}": "String is not a URI: {0}", + "Array has too many items according to schema. Expected {0} or fewer.": "Array has too many items according to schema. Expected {0} or fewer.", + "Array does not contain required item.": "Array does not contain required item.", + "Array has too few items. Expected {0} or more.": "Array has too few items. Expected {0} or more.", + "Array has too many items. Expected {0} or fewer.": "Array has too many items. Expected {0} or fewer.", + "Array has duplicate items.": "Array has duplicate items.", + "Property {0} is not allowed.": "Property {0} is not allowed.", + "Object has more properties than limit of {0}.": "Object has more properties than limit of {0}.", + "Object has fewer properties than the required number of {0}": "Object has fewer properties than the required number of {0}", + "Object is missing property {0} required by property {1}.": "Object is missing property {0} required by property {1}.", "Inline schema": "Inline schema", - "create.item.array": "Create an item of an array{0}{1}", - "array.item": "- (array item) ", - "allowedValues": "Allowed Values:", - "example": "Example:", - "source": "Source: [{0}]({1})", - "jumpToSchema": "Jump to schema location ({0})", - "convertToSpace": "Convert Tab to Spaces", - "convertAllSpaceToTab": "Convert all Tabs to Spaces", - "deleteUnusedAnchor": "Delete unused anchor: {0}", - "convertToBoolean": "Convert to boolean", - "convertToBlockStyle": "Convert to block style {0}", - "fixKeyOrderToMap": "Fix key order for this map", - "flowStyleMapForbidden": "Flow style mapping is forbidden", - "flowStyleSeqForbidden": "Flow style sequence is forbidden", - "unUsedAnchor": "Unused anchor \"{0}\"", - "unUsedAlias": "Unresolved alias \"{0}\"" + "Create an item of an array{0}{1}": "Create an item of an array{0}{1}", + "- (array item) ": "- (array item) ", + "Allowed Values:": "Allowed Values:", + "Example:": "Example:", + "Source: [{0}]({1})": "Source: [{0}]({1})", + "Jump to schema location ({0})": "Jump to schema location ({0})", + "Convert Tab to Spaces": "Convert Tab to Spaces", + "Convert all Tabs to Spaces": "Convert all Tabs to Spaces", + "Delete unused anchor: {0}": "Delete unused anchor: {0}", + "Convert to boolean": "Convert to boolean", + "Convert to block style {0}": "Convert to block style {0}", + "Fix key order for this map": "Fix key order for this map", + "Flow style mapping is forbidden": "Flow style mapping is forbidden", + "Flow style sequence is forbidden": "Flow style sequence is forbidden", + "Unused anchor \"{0}\"": "Unused anchor \"{0}\"", + "Unresolved alias \"{0}\"": "Unresolved alias \"{0}\"" } diff --git a/l10n/bundle.l10n.ko.json b/l10n/bundle.l10n.ko.json index 4d1180aeb..72e6f5e66 100644 --- a/l10n/bundle.l10n.ko.json +++ b/l10n/bundle.l10n.ko.json @@ -1,57 +1,58 @@ { - "Default Value": "기본값", - "json.schema.invalidref": "'{1}'의 $ref '{0}'을(를) 확인할 수 없습니다.", - "json.schema.problemloadingref": "'{0}' 참조를 불러오는 데 문제가 발생했습니다: {1}", - "json.schema.nocontent": "'{0}'에서 스키마를 불러올 수 없습니다: 내용이 없습니다.", - "json.schema.invalidFormat": "'{0}'의 내용을 구문 분석할 수 없습니다: {1}행 {2}열에서 구문 오류가 발생했습니다", - "json.schema.invalidSchema": "스키마 '{0}'이(가) 유효하지 않습니다: {1}", - "colorHexFormatWarning": "잘못된 색상 형식입니다. #RGB, #RGBA, #RRGGBB 또는 #RRGGBBAA를 사용하세요.", - "dateTimeFormatWarning": "문자열이 RFC3339 날짜-시간 형식이 아닙니다.", - "dateFormatWarning": "문자열이 RFC3339 날짜 형식이 아닙니다.", - "timeFormatWarning": "문자열이 RFC3339 시간 형식이 아닙니다.", - "emailFormatWarning": "문자열이 유효한 이메일 주소가 아닙니다.", - "ipv4FormatWarning": "문자열이 IPv4 형식과 일치하지 않습니다.", - "ipv6FormatWarning": "문자열이 IPv6 형식과 일치하지 않습니다.", - "enumWarning": "값이 허용되지 않았습니다. 허용 가능한 값: {0}.", - "typeArrayMismatchWarning": "잘못된 유형입니다. 예상 값: {0}.", - "notSchemaWarning": "허용되지 않은 스키마와 일치합니다.", - "oneOfWarning": "여러 스키마와 일치합니다. 하나만 유효해야 합니다.", - "ifFilePatternAssociation": "filePatternAssociation '{0}'이(가) 문서 URI '{1}'과(와) 일치하지 않습니다.", - "multipleOfWarning": "값이 {0}으로 나눌 수 없습니다.", - "exclusiveMinimumWarning": "값이 최소값 {0}보다 작습니다.", - "exclusiveMaximumWarning": "값이 최대값 {0}보다 큽니다.", - "minimumWarning": "값이 최소값 {0}보다 작습니다.", - "maximumWarning": "값이 최대값 {0}보다 큽니다.", - "minLengthWarning": "문자열 길이가 최소 길이 {0}보다 짧습니다.", - "maxLengthWarning": "문자열 길이가 최대 길이 {0}보다 깁니다.", - "patternWarning": "문자열이 \"{0}\" 패턴과 일치하지 않습니다.", - "uriEmpty": "URI가 필요합니다.", - "uriSchemeMissing": "스킴이 있는 URI가 필요합니다.", - "uriFormatWarning": "문자열이 URI 형식이 아닙니다: {0}", - "additionalItemsWarning": "배열의 항목 수가 스키마에서 허용된 {0}개를 초과합니다.", - "requiredItemMissingWarning": "배열에 필수 항목이 없습니다.", - "minItemsWarning": "배열 항목 수가 너무 적습니다. 최소 {0}개 필요합니다.", - "maxItemsWarning": "배열 항목 수가 너무 많습니다. 최대 {0}개 허용됩니다.", - "uniqueItemsWarning": "배열에 중복된 항목이 있습니다.", - "DisallowedExtraPropWarning": "속성 {0}은(는) 허용되지 않습니다.", - "MaxPropWarning": "객체에 허용된 속성 수 {0}을 초과했습니다.", - "MinPropWarning": "객체에 필요한 최소 속성 수 {0}보다 적습니다.", - "RequiredDependentPropWarning": "속성 {1}에 필요한 속성 {0}이 누락되었습니다.", + "Default value": "기본값", + "$ref '{0}' in '{1}' cannot be resolved.": "'{1}'의 $ref '{0}'을(를) 확인할 수 없습니다.", + "Problems loading reference '{0}': {1}": "'{0}' 참조를 불러오는 데 문제가 발생했습니다: {1}", + "Unable to load schema from '{0}': No content.": "'{0}'에서 스키마를 불러올 수 없습니다: 내용이 없습니다.", + "Unable to load schema from '{0}': No content. {1}": "'{0}'에서 스키마를 불러올 수 없습니다: 내용이 없습니다. {1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "'{0}'의 내용을 구문 분석할 수 없습니다: {1}행 {2}열에서 구문 오류가 발생했습니다", + "Schema '{0}' is not valid: {1}": "스키마 '{0}'이(가) 유효하지 않습니다: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "잘못된 색상 형식입니다. #RGB, #RGBA, #RRGGBB 또는 #RRGGBBAA를 사용하세요.", + "String is not a RFC3339 date-time.": "문자열이 RFC3339 날짜-시간 형식이 아닙니다.", + "String is not a RFC3339 date.": "문자열이 RFC3339 날짜 형식이 아닙니다.", + "String is not a RFC3339 time.": "문자열이 RFC3339 시간 형식이 아닙니다.", + "String is not an e-mail address.": "문자열이 유효한 이메일 주소가 아닙니다.", + "String does not match IPv4 format.": "문자열이 IPv4 형식과 일치하지 않습니다.", + "String does not match IPv6 format.": "문자열이 IPv6 형식과 일치하지 않습니다.", + "Value is not accepted. Valid values: {0}.": "값이 허용되지 않았습니다. 허용 가능한 값: {0}.", + "Incorrect type. Expected one of {0}.": "잘못된 유형입니다. 예상 값: {0}.", + "Matches a schema that is not allowed.": "허용되지 않은 스키마와 일치합니다.", + "Matches multiple schemas when only one must validate.": "여러 스키마와 일치합니다. 하나만 유효해야 합니다.", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}'이(가) 문서 URI '{1}'과(와) 일치하지 않습니다.", + "Value is not divisible by {0}.": "값이 {0}으로 나눌 수 없습니다.", + "Value is below the exclusive minimum of {0}.": "값이 최소값 {0}보다 작습니다.", + "Value is above the exclusive maximum of {0}.": "값이 최대값 {0}보다 큽니다.", + "Value is below the minimum of {0}.": "값이 최소값 {0}보다 작습니다.", + "Value is above the maximum of {0}.": "값이 최대값 {0}보다 큽니다.", + "String is shorter than the minimum length of {0}.": "문자열 길이가 최소 길이 {0}보다 짧습니다.", + "String is longer than the maximum length of {0}.": "문자열 길이가 최대 길이 {0}보다 깁니다.", + "String does not match the pattern of \"{0}\".": "문자열이 \"{0}\" 패턴과 일치하지 않습니다.", + "URI expected.": "URI가 필요합니다.", + "URI with a scheme is expected.": "스킴이 있는 URI가 필요합니다.", + "String is not a URI: {0}": "문자열이 URI 형식이 아닙니다: {0}", + "Array has too many items according to schema. Expected {0} or fewer.": "배열의 항목 수가 스키마에서 허용된 {0}개를 초과합니다.", + "Array does not contain required item.": "배열에 필수 항목이 없습니다.", + "Array has too few items. Expected {0} or more.": "배열 항목 수가 너무 적습니다. 최소 {0}개 필요합니다.", + "Array has too many items. Expected {0} or fewer.": "배열 항목 수가 너무 많습니다. 최대 {0}개 허용됩니다.", + "Array has duplicate items.": "배열에 중복된 항목이 있습니다.", + "Property {0} is not allowed.": "속성 {0}은(는) 허용되지 않습니다.", + "Object has more properties than limit of {0}.": "객체에 허용된 속성 수 {0}을 초과했습니다.", + "Object has fewer properties than the required number of {0}": "객체에 필요한 최소 속성 수 {0}보다 적습니다.", + "Object is missing property {0} required by property {1}.": "속성 {1}에 필요한 속성 {0}이 누락되었습니다.", "Inline schema": "인라인 스키마", - "create.item.array": "배열 항목 생성{0}{1}", - "array.item": "- (배열 항목)", - "allowedValues": "허용 값:", - "example": "예시:", - "source": "출처: [{0}]({1})", - "jumpToSchema": "스키마 위치로 이동 ({0})", - "convertToSpace": "탭을 공백으로 변환", - "convertAllSpaceToTab": "모든 공백을 탭으로 변환", - "deleteUnusedAnchor": "사용되지 않은 앵커 삭제: {0}", - "convertToBoolean": "불리언으로 변환", - "convertToBlockStyle": "블록 스타일 {0}(으)로 변환", - "fixKeyOrderToMap": "이 맵의 키 순서 정렬", - "flowStyleMapForbidden": "Flow 스타일 맵 사용이 금지됨", - "flowStyleSeqForbidden": "Flow 스타일 시퀀스 사용이 금지됨", - "unUsedAnchor": "사용되지 않은 앵커 \"{0}\"", - "unUsedAlias": "해결되지 않은 별칭 \"{0}\"" + "Create an item of an array{0}{1}": "배열 항목 생성{0}{1}", + "- (array item) ": "- (배열 항목)", + "Allowed Values:": "허용 값:", + "Example:": "예시:", + "Source: [{0}]({1})": "출처: [{0}]({1})", + "Jump to schema location ({0})": "스키마 위치로 이동 ({0})", + "Convert Tab to Spaces": "탭을 공백으로 변환", + "Convert all Tabs to Spaces": "모든 공백을 탭으로 변환", + "Delete unused anchor: {0}": "사용되지 않은 앵커 삭제: {0}", + "Convert to boolean": "불리언으로 변환", + "Convert to block style {0}": "블록 스타일 {0}(으)로 변환", + "Fix key order for this map": "이 맵의 키 순서 정렬", + "Flow style mapping is forbidden": "Flow 스타일 맵 사용이 금지됨", + "Flow style sequence is forbidden": "Flow 스타일 시퀀스 사용이 금지됨", + "Unused anchor \"{0}\"": "사용되지 않은 앵커 \"{0}\"", + "Unresolved alias \"{0}\"": "해결되지 않은 별칭 \"{0}\"" } diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index 0a94d14b4..047ef7a96 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -1,57 +1,58 @@ { - "Default Value": "默认值", - "json.schema.invalidref": "在 '{1}' 中的 $ref '{0}' 无法解析。", - "json.schema.problemloadingref": "加载引用 '{0}' 时出现问题:{1}", - "json.schema.nocontent": "无法从“{0}”加载架构:没有内容。", - "json.schema.invalidFormat": "无法解析来自“{0}”的内容:在第 {1} 行第 {2} 列发生解析错误", - "json.schema.invalidSchema": "架构 '{0}' 无效: {1}", - "colorHexFormatWarning": "无效的颜色格式。请使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA。", - "dateTimeFormatWarning": "字符串不是 RFC3339 日期时间格式。", - "dateFormatWarning": "字符串不是 RFC3339 日期格式。", - "timeFormatWarning": "字符串不是 RFC3339 时间格式。", - "emailFormatWarning": "字符串不是有效的电子邮件地址。", - "ipv4FormatWarning": "字符串与 IPv4 格式不匹配。", - "ipv6FormatWarning": "字符串与 IPv6 格式不匹配。", - "enumWarning": "值无效。允许的值:{0}。", - "typeArrayMismatchWarning": "类型不正确。应为以下之一:{0}。", - "notSchemaWarning": "匹配了不被允许的模式。", - "oneOfWarning": "同时匹配多个模式,必须只匹配一个。", - "ifFilePatternAssociation": "filePatternAssociation '{0}' 与文档 URI '{1}' 不匹配", - "multipleOfWarning": "值不能被 {0} 整除。", - "exclusiveMinimumWarning": "值低于最小(不包含)限制 {0}。", - "exclusiveMaximumWarning": "值高于最大(不包含)限制 {0}。", - "minimumWarning": "值低于最小值 {0}。", - "maximumWarning": "值高于最大值 {0}。", - "minLengthWarning": "字符串长度小于最小长度 {0}。", - "maxLengthWarning": "字符串长度超过最大长度 {0}。", - "patternWarning": "字符串不符合模式 \"{0}\"。", - "uriEmpty": "需要提供 URI。", - "uriSchemeMissing": "需要带有协议的 URI。", - "uriFormatWarning": "字符串不是有效的 URI:{0}", - "additionalItemsWarning": "数组项数超过了模式限制。最多允许 {0} 项。", - "requiredItemMissingWarning": "数组中缺少必需项。", - "minItemsWarning": "数组项数不足。应为 {0} 项或更多。", - "maxItemsWarning": "数组项数过多。应为 {0} 项或更少。", - "uniqueItemsWarning": "数组中包含重复项。", - "DisallowedExtraPropWarning": "属性 {0} 不被允许。", - "MaxPropWarning": "对象的属性数超过了限制 {0}。", - "MinPropWarning": "对象的属性数少于所需数量 {0}。", - "RequiredDependentPropWarning": "属性 {1} 依赖的属性 {0} 缺失。", + "Default value": "默认值", + "$ref '{0}' in '{1}' cannot be resolved.": "在 '{1}' 中的 $ref '{0}' 无法解析。", + "Problems loading reference '{0}': {1}": "加载引用 '{0}' 时出现问题:{1}", + "Unable to load schema from '{0}': No content.": "无法从“{0}”加载架构:没有内容。", + "Unable to load schema from '{0}': No content. {1}": "无法从“{0}”加载架构:没有内容。{1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "无法解析来自“{0}”的内容:在第 {1} 行第 {2} 列发生解析错误", + "Schema '{0}' is not valid: {1}": "架构 '{0}' 无效: {1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "无效的颜色格式。请使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA。", + "String is not a RFC3339 date-time.": "字符串不是 RFC3339 日期时间格式。", + "String is not a RFC3339 date.": "字符串不是 RFC3339 日期格式。", + "String is not a RFC3339 time.": "字符串不是 RFC3339 时间格式。", + "String is not an e-mail address.": "字符串不是有效的电子邮件地址。", + "String does not match IPv4 format.": "字符串与 IPv4 格式不匹配。", + "String does not match IPv6 format.": "字符串与 IPv6 格式不匹配。", + "Value is not accepted. Valid values: {0}.": "值无效。允许的值:{0}。", + "Incorrect type. Expected one of {0}.": "类型不正确。应为以下之一:{0}。", + "Matches a schema that is not allowed.": "匹配了不被允许的模式。", + "Matches multiple schemas when only one must validate.": "同时匹配多个模式,必须只匹配一个。", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' 与文档 URI '{1}' 不匹配", + "Value is not divisible by {0}.": "值不能被 {0} 整除。", + "Value is below the exclusive minimum of {0}.": "值低于最小(不包含)限制 {0}。", + "Value is above the exclusive maximum of {0}.": "值高于最大(不包含)限制 {0}。", + "Value is below the minimum of {0}.": "值低于最小值 {0}。", + "Value is above the maximum of {0}.": "值高于最大值 {0}。", + "String is shorter than the minimum length of {0}.": "字符串长度小于最小长度 {0}。", + "String is longer than the maximum length of {0}.": "字符串长度超过最大长度 {0}。", + "String does not match the pattern of \"{0}\".": "字符串不符合模式 \"{0}\"。", + "URI expected.": "需要提供 URI。", + "URI with a scheme is expected.": "需要带有协议的 URI。", + "String is not a URI: {0}": "字符串不是有效的 URI:{0}", + "Array has too many items according to schema. Expected {0} or fewer.": "数组项数超过了模式限制。最多允许 {0} 项。", + "Array does not contain required item.": "数组中缺少必需项。", + "Array has too few items. Expected {0} or more.": "数组项数不足。应为 {0} 项或更多。", + "Array has too many items. Expected {0} or fewer.": "数组项数过多。应为 {0} 项或更少。", + "Array has duplicate items.": "数组中包含重复项。", + "Property {0} is not allowed.": "属性 {0} 不被允许。", + "Object has more properties than limit of {0}.": "对象的属性数超过了限制 {0}。", + "Object has fewer properties than the required number of {0}": "对象的属性数少于所需数量 {0}。", + "Object is missing property {0} required by property {1}.": "属性 {1} 依赖的属性 {0} 缺失。", "Inline schema": "内联模式", - "create.item.array": "创建数组项{0}{1}", - "array.item": "- (数组项)", - "allowedValues": "允许的值:", - "example": "示例:", - "source": "来源:[ {0} ]({1})", - "jumpToSchema": "跳转到模式位置({0})", - "convertToSpace": "将 Tab 转换为空格", - "convertAllSpaceToTab": "将所有空格转换为 Tab", - "deleteUnusedAnchor": "删除未使用的锚点:{0}", - "convertToBoolean": "转换为布尔值", - "convertToBlockStyle": "转换为块样式 {0}", - "fixKeyOrderToMap": "修复此映射的键顺序", - "flowStyleMapForbidden": "禁止使用 flow 样式的映射", - "flowStyleSeqForbidden": "禁止使用 flow 样式的序列", - "unUsedAnchor": "未使用的锚点 \"{0}\"", - "unUsedAlias": "未解析的别名 \"{0}\"" + "Create an item of an array{0}{1}": "创建数组项{0}{1}", + "- (array item) ": "- (数组项)", + "Allowed Values:": "允许的值:", + "Example:": "示例:", + "Source: [{0}]({1})": "来源:[ {0} ]({1})", + "Jump to schema location ({0})": "跳转到模式位置({0})", + "Convert Tab to Spaces": "将 Tab 转换为空格", + "Convert all Tabs to Spaces": "将所有空格转换为 Tab", + "Delete unused anchor: {0}": "删除未使用的锚点:{0}", + "Convert to boolean": "转换为布尔值", + "Convert to block style {0}": "转换为块样式 {0}", + "Fix key order for this map": "修复此映射的键顺序", + "Flow style mapping is forbidden": "禁止使用 flow 样式的映射", + "Flow style sequence is forbidden": "禁止使用 flow 样式的序列", + "Unused anchor \"{0}\"": "未使用的锚点 \"{0}\"", + "Unresolved alias \"{0}\"": "未解析的别名 \"{0}\"" } diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index eb40562ad..b8a498f85 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -1,57 +1,58 @@ { - "Default Value": "預設值", - "json.schema.invalidref": "在 '{1}' 中的 $ref '{0}' 無法解析。", - "json.schema.problemloadingref": "載入參考 '{0}' 時出現問題:{1}", - "json.schema.nocontent": "無法從「{0}」載入結構描述:沒有內容。", - "json.schema.invalidFormat": "無法解析來自「{0}」的內容:在第 {1} 行第 {2} 欄發生解析錯誤", - "json.schema.invalidSchema": "結構描述 '{0}' 無效:{1}", - "colorHexFormatWarning": "無效的顏色格式。請使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA。", - "dateTimeFormatWarning": "字串不是 RFC3339 日期時間格式。", - "dateFormatWarning": "字串不是 RFC3339 日期格式。", - "timeFormatWarning": "字串不是 RFC3339 時間格式。", - "emailFormatWarning": "字串不是有效的電子郵件地址。", - "ipv4FormatWarning": "字串不符合 IPv4 格式。", - "ipv6FormatWarning": "字串不符合 IPv6 格式。", - "enumWarning": "值無效。有效值為:{0}。", - "typeArrayMismatchWarning": "類型不正確。應為以下其中之一:{0}。", - "notSchemaWarning": "符合了不被允許的結構。", - "oneOfWarning": "符合多個結構,但只能有一個有效。", - "ifFilePatternAssociation": "filePatternAssociation '{0}' 與文件 URI '{1}' 不相符", - "multipleOfWarning": "值不能被 {0} 整除。", - "exclusiveMinimumWarning": "值低於排除最小值 {0}。", - "exclusiveMaximumWarning": "值超過排除最大值 {0}。", - "minimumWarning": "值低於最小值 {0}。", - "maximumWarning": "值超過最大值 {0}。", - "minLengthWarning": "字串長度小於最小長度 {0}。", - "maxLengthWarning": "字串長度超過最大長度 {0}。", - "patternWarning": "字串不符合模式 \"{0}\"。", - "uriEmpty": "需要 URI。", - "uriSchemeMissing": "需要包含 scheme 的 URI。", - "uriFormatWarning": "字串不是有效的 URI:{0}", - "additionalItemsWarning": "陣列項目超出結構所允許的數量。應為 {0} 項或更少。", - "requiredItemMissingWarning": "陣列中缺少必要項目。", - "minItemsWarning": "陣列項目數太少。應為 {0} 項或更多。", - "maxItemsWarning": "陣列項目數太多。應為 {0} 項或更少。", - "uniqueItemsWarning": "陣列中有重複項目。", - "DisallowedExtraPropWarning": "不允許的屬性 {0}。", - "MaxPropWarning": "物件的屬性數量超過限制 {0}。", - "MinPropWarning": "物件的屬性數量少於所需的 {0}。", - "RequiredDependentPropWarning": "缺少由屬性 {1} 所需的屬性 {0}。", + "Default value": "預設值", + "$ref '{0}' in '{1}' cannot be resolved.": "在 '{1}' 中的 $ref '{0}' 無法解析。", + "Problems loading reference '{0}': {1}": "載入參考 '{0}' 時出現問題:{1}", + "Unable to load schema from '{0}': No content.": "無法從「{0}」載入結構描述:沒有內容。", + "Unable to load schema from '{0}': No content. {1}": "無法從「{0}」載入結構描述:沒有內容。{1}", + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}": "無法解析來自「{0}」的內容:在第 {1} 行第 {2} 欄發生解析錯誤", + "Schema '{0}' is not valid: {1}": "結構描述 '{0}' 無效:{1}", + "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.": "無效的顏色格式。請使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA。", + "String is not a RFC3339 date-time.": "字串不是 RFC3339 日期時間格式。", + "String is not a RFC3339 date.": "字串不是 RFC3339 日期格式。", + "String is not a RFC3339 time.": "字串不是 RFC3339 時間格式。", + "String is not an e-mail address.": "字串不是有效的電子郵件地址。", + "String does not match IPv4 format.": "字串不符合 IPv4 格式。", + "String does not match IPv6 format.": "字串不符合 IPv6 格式。", + "Value is not accepted. Valid values: {0}.": "值無效。有效值為:{0}。", + "Incorrect type. Expected one of {0}.": "類型不正確。應為以下其中之一:{0}。", + "Matches a schema that is not allowed.": "符合了不被允許的結構。", + "Matches multiple schemas when only one must validate.": "符合多個結構,但只能有一個有效。", + "filePatternAssociation '{0}' does not match with doc uri '{1}'": "filePatternAssociation '{0}' 與文件 URI '{1}' 不相符", + "Value is not divisible by {0}.": "值不能被 {0} 整除。", + "Value is below the exclusive minimum of {0}.": "值低於排除最小值 {0}。", + "Value is above the exclusive maximum of {0}.": "值超過排除最大值 {0}。", + "Value is below the minimum of {0}.": "值低於最小值 {0}。", + "Value is above the maximum of {0}.": "值超過最大值 {0}。", + "String is shorter than the minimum length of {0}.": "字串長度小於最小長度 {0}。", + "String is longer than the maximum length of {0}.": "字串長度超過最大長度 {0}。", + "String does not match the pattern of \"{0}\".": "字串不符合模式 \"{0}\"。", + "URI expected.": "需要 URI。", + "URI with a scheme is expected.": "需要包含 scheme 的 URI。", + "String is not a URI: {0}": "字串不是有效的 URI:{0}", + "Array has too many items according to schema. Expected {0} or fewer.": "陣列項目超出結構所允許的數量。應為 {0} 項或更少。", + "Array does not contain required item.": "陣列中缺少必要項目。", + "Array has too few items. Expected {0} or more.": "陣列項目數太少。應為 {0} 項或更多。", + "Array has too many items. Expected {0} or fewer.": "陣列項目數太多。應為 {0} 項或更少。", + "Array has duplicate items.": "陣列中有重複項目。", + "Property {0} is not allowed.": "不允許的屬性 {0}。", + "Object has more properties than limit of {0}.": "物件的屬性數量超過限制 {0}。", + "Object has fewer properties than the required number of {0}": "物件的屬性數量少於所需的 {0}。", + "Object is missing property {0} required by property {1}.": "缺少由屬性 {1} 所需的屬性 {0}。", "Inline schema": "內嵌結構", - "create.item.array": "建立陣列項目{0}{1}", - "array.item": "-(陣列項目)", - "allowedValues": "允許的值:", - "example": "範例:", - "source": "來源:[ {0} ]({1})", - "jumpToSchema": "跳至結構位置({0})", - "convertToSpace": "將 Tab 轉換為空格", - "convertAllSpaceToTab": "將所有空格轉換為 Tab", - "deleteUnusedAnchor": "刪除未使用的錨點:{0}", - "convertToBoolean": "轉換為布林值", - "convertToBlockStyle": "轉換為區塊樣式 {0}", - "fixKeyOrderToMap": "修正此映射的鍵順序", - "flowStyleMapForbidden": "禁止使用 Flow 風格的對應", - "flowStyleSeqForbidden": "禁止使用 Flow 風格的序列", - "unUsedAnchor": "未使用的錨點 \"{0}\"", - "unUsedAlias": "未解析的別名 \"{0}\"" + "Create an item of an array{0}{1}": "建立陣列項目{0}{1}", + "- (array item) ": "-(陣列項目)", + "Allowed Values:": "允許的值:", + "Example:": "範例:", + "Source: [{0}]({1})": "來源:[ {0} ]({1})", + "Jump to schema location ({0})": "跳至結構位置({0})", + "Convert Tab to Spaces": "將 Tab 轉換為空格", + "Convert all Tabs to Spaces": "將所有空格轉換為 Tab", + "Delete unused anchor: {0}": "刪除未使用的錨點:{0}", + "Convert to boolean": "轉換為布林值", + "Convert to block style {0}": "轉換為區塊樣式 {0}", + "Fix key order for this map": "修正此映射的鍵順序", + "Flow style mapping is forbidden": "禁止使用 Flow 風格的對應", + "Flow style sequence is forbidden": "禁止使用 Flow 風格的序列", + "Unused anchor \"{0}\"": "未使用的錨點 \"{0}\"", + "Unresolved alias \"{0}\"": "未解析的別名 \"{0}\"" } diff --git a/src/languageservice/parser/jsonParser07.ts b/src/languageservice/parser/jsonParser07.ts index eae340913..b5e6878f2 100644 --- a/src/languageservice/parser/jsonParser07.ts +++ b/src/languageservice/parser/jsonParser07.ts @@ -36,33 +36,33 @@ export interface IRange { export const formats = { 'color-hex': { - errorMessage: l10n.t('colorHexFormatWarning'), + errorMessage: l10n.t('Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/, }, 'date-time': { - errorMessage: l10n.t('dateTimeFormatWarning'), + errorMessage: l10n.t('String is not a RFC3339 date-time.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i, }, date: { - errorMessage: l10n.t('dateFormatWarning'), + errorMessage: l10n.t('String is not a RFC3339 date.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i, }, time: { - errorMessage: l10n.t('timeFormatWarning'), + errorMessage: l10n.t('String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i, }, email: { - errorMessage: l10n.t('emailFormatWarning'), + errorMessage: l10n.t('String is not an e-mail address.'), pattern: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, }, ipv4: { - errorMessage: l10n.t('ipv4FormatWarning'), + errorMessage: l10n.t('String does not match IPv4 format.'), pattern: /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/, }, ipv6: { - errorMessage: l10n.t('ipv6FormatWarning'), + errorMessage: l10n.t('String does not match IPv6 format.'), pattern: /^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i, }, }; @@ -374,7 +374,7 @@ export class ValidationResult { for (const error of this.problems) { if (error.code === ErrorCode.EnumValueMismatch) { error.message = l10n.t( - 'enumWarning', + 'Value is not accepted. Valid values: {0}.', [...new Set(this.enumValues)] .map((v) => { return JSON.stringify(v); @@ -697,7 +697,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: schema.errorMessage || l10n.t('typeArrayMismatchWarning', (schema.type).join(', ')), + message: schema.errorMessage || l10n.t('Incorrect type. Expected one of {0}.', (schema.type).join(', ')), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -731,7 +731,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('notSchemaWarning'), + message: l10n.t('Matches a schema that is not allowed.'), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -784,7 +784,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: 1 }, severity: DiagnosticSeverity.Warning, - message: l10n.t('oneOfWarning'), + message: l10n.t('Matches multiple schemas when only one must validate.'), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -840,7 +840,11 @@ function validate( subValidationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('ifFilePatternAssociation', filePatternAssociation, options.uri), + message: l10n.t( + "filePatternAssociation '{0}' does not match with doc uri '{1}'", + filePatternAssociation, + options.uri + ), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -882,7 +886,7 @@ function validate( message: schema.errorMessage || l10n.t( - 'enumWarning', + 'Value is not accepted. Valid values: {0}.', schema.enum .map((v) => { return JSON.stringify(v); @@ -936,7 +940,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('multipleOfWarning', schema.multipleOf), + message: l10n.t('Value is not divisible by {0}.', schema.multipleOf), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -962,7 +966,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('exclusiveMinimumWarning', exclusiveMinimum), + message: l10n.t('Value is below the exclusive minimum of {0}.', exclusiveMinimum), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -972,7 +976,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('exclusiveMaximumWarning', exclusiveMaximum), + message: l10n.t('Value is above the exclusive maximum of {0}.', exclusiveMaximum), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -982,7 +986,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('minimumWarning', minimum), + message: l10n.t('Value is below the minimum of {0}.', minimum), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -992,7 +996,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('maximumWarning', maximum), + message: l10n.t('Value is above the maximum of {0}.', maximum), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1004,7 +1008,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('minLengthWarning', schema.minLength), + message: l10n.t('String is shorter than the minimum length of {0}.', schema.minLength), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1014,7 +1018,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('maxLengthWarning', schema.maxLength), + message: l10n.t('String is longer than the maximum length of {0}.', schema.maxLength), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1026,7 +1030,10 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: schema.patternErrorMessage || schema.errorMessage || l10n.t('patternWarning', schema.pattern), + message: + schema.patternErrorMessage || + schema.errorMessage || + l10n.t('String does not match the pattern of "{0}".', schema.pattern), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1040,12 +1047,12 @@ function validate( { let errorMessage; if (!node.value) { - errorMessage = l10n.t('uriEmpty'); + errorMessage = l10n.t('URI expected.'); } else { try { const uri = URI.parse(node.value); if (!uri.scheme && schema.format === 'uri') { - errorMessage = l10n.t('uriSchemeMissing'); + errorMessage = l10n.t('URI with a scheme is expected.'); } } catch (e) { errorMessage = e.message; @@ -1055,7 +1062,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: schema.patternErrorMessage || schema.errorMessage || l10n.t('uriFormatWarning', errorMessage), + message: schema.patternErrorMessage || schema.errorMessage || l10n.t('String is not a URI: {0}', errorMessage), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1120,7 +1127,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('additionalItemsWarning', subSchemas.length), + message: l10n.t('Array has too many items according to schema. Expected {0} or fewer.', subSchemas.length), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1160,7 +1167,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: schema.errorMessage || l10n.t('requiredItemMissingWarning'), + message: schema.errorMessage || l10n.t('Array does not contain required item.'), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1171,7 +1178,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('minItemsWarning', schema.minItems), + message: l10n.t('Array has too few items. Expected {0} or more.', schema.minItems), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1181,7 +1188,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('maxItemsWarning', schema.maxItems), + message: l10n.t('Array has too many items. Expected {0} or fewer.', schema.maxItems), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1196,7 +1203,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('uniqueItemsWarning'), + message: l10n.t('Array has duplicate items.'), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1284,7 +1291,7 @@ function validate( length: propertyNode.keyNode.length, }, severity: DiagnosticSeverity.Warning, - message: schema.errorMessage || l10n.t('DisallowedExtraPropWarning', propertyName), + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1321,7 +1328,7 @@ function validate( length: propertyNode.keyNode.length, }, severity: DiagnosticSeverity.Warning, - message: schema.errorMessage || l10n.t('DisallowedExtraPropWarning', propertyName), + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1391,7 +1398,7 @@ function validate( }, severity: DiagnosticSeverity.Warning, code: ErrorCode.PropertyExpected, - message: schema.errorMessage || l10n.t('DisallowedExtraPropWarning', propertyName), + message: schema.errorMessage || l10n.t('Property {0} is not allowed.', propertyName), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }; @@ -1409,7 +1416,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('MaxPropWarning', schema.maxProperties), + message: l10n.t('Object has more properties than limit of {0}.', schema.maxProperties), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1421,7 +1428,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('MinPropWarning', schema.minProperties), + message: l10n.t('Object has fewer properties than the required number of {0}', schema.minProperties), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); @@ -1439,7 +1446,7 @@ function validate( validationResult.problems.push({ location: { offset: node.offset, length: node.length }, severity: DiagnosticSeverity.Warning, - message: l10n.t('RequiredDependentPropWarning', requiredProp, key), + message: l10n.t('Object is missing property {0} required by property {1}.', requiredProp, key), source: getSchemaSource(schema, originalSchema), schemaUri: getSchemaUri(schema, originalSchema), }); diff --git a/src/languageservice/services/validation/unused-anchors.ts b/src/languageservice/services/validation/unused-anchors.ts index f713505f1..8461da235 100644 --- a/src/languageservice/services/validation/unused-anchors.ts +++ b/src/languageservice/services/validation/unused-anchors.ts @@ -47,7 +47,7 @@ export class UnusedAnchorsValidator implements AdditionalValidator { ); const warningDiagnostic = Diagnostic.create( range, - l10n.t('unUsedAnchor', aToken.source), + l10n.t('Unused anchor "{0}"', aToken.source), DiagnosticSeverity.Information, 0 ); @@ -65,7 +65,7 @@ export class UnusedAnchorsValidator implements AdditionalValidator { const range = Range.create(document.positionAt(startOffset), document.positionAt(endOffset)); const warningDiagnostic = Diagnostic.create( range, - l10n.t('unUsedAlias', node.toString()), + l10n.t('Unresolved alias "{0}"', node.toString()), DiagnosticSeverity.Information, 0 ); diff --git a/src/languageservice/services/validation/yaml-style.ts b/src/languageservice/services/validation/yaml-style.ts index 54c996ffc..f50005756 100644 --- a/src/languageservice/services/validation/yaml-style.ts +++ b/src/languageservice/services/validation/yaml-style.ts @@ -22,7 +22,7 @@ export class YAMLStyleValidator implements AdditionalValidator { result.push( Diagnostic.create( this.getRangeOf(document, node.srcToken), - l10n.t('flowStyleMapForbidden', 'Flow style mapping is forbidden'), + l10n.t('Flow style mapping is forbidden', 'Flow style mapping is forbidden'), DiagnosticSeverity.Error, 'flowMap' ) @@ -32,7 +32,7 @@ export class YAMLStyleValidator implements AdditionalValidator { result.push( Diagnostic.create( this.getRangeOf(document, node.srcToken), - l10n.t('flowStyleSeqForbidden'), + l10n.t('Flow style sequence is forbidden'), DiagnosticSeverity.Error, 'flowSeq' ) diff --git a/src/languageservice/services/yamlCodeActions.ts b/src/languageservice/services/yamlCodeActions.ts index 059c60afa..1d90bdfa9 100644 --- a/src/languageservice/services/yamlCodeActions.ts +++ b/src/languageservice/services/yamlCodeActions.ts @@ -84,7 +84,7 @@ export class YamlCodeActions { const result = []; for (const schemaUri of schemaUriToDiagnostic.keys()) { const action = CodeAction.create( - l10n.t('jumpToSchema', path.basename(schemaUri)), + l10n.t('Jump to schema location ({0})', path.basename(schemaUri)), Command.create('JumpToSchema', YamlCommands.JUMP_TO_SCHEMA, schemaUri) ); action.diagnostics = schemaUriToDiagnostic.get(schemaUri); @@ -125,7 +125,7 @@ export class YamlCodeActions { } result.push( CodeAction.create( - l10n.t('convertToSpace'), + l10n.t('Convert Tab to Spaces'), createWorkspaceEdit(document.uri, [TextEdit.replace(resultRange, newText)]), CodeActionKind.QuickFix ) @@ -170,7 +170,7 @@ export class YamlCodeActions { if (replaceEdits.length > 0) { result.push( CodeAction.create( - l10n.t('convertAllSpaceToTab'), + l10n.t('Convert all Tabs to Spaces'), createWorkspaceEdit(document.uri, replaceEdits), CodeActionKind.QuickFix ) @@ -192,7 +192,7 @@ export class YamlCodeActions { const lastWhitespaceChar = getFirstNonWhitespaceCharacterAfterOffset(lineContent, range.end.character); range.end.character = lastWhitespaceChar; const action = CodeAction.create( - l10n.t('deleteUnusedAnchor', actual), + l10n.t('Delete unused anchor: {0}', actual), createWorkspaceEdit(document.uri, [TextEdit.del(range)]), CodeActionKind.QuickFix ); @@ -212,7 +212,7 @@ export class YamlCodeActions { const newValue = value.includes('true') ? 'true' : 'false'; results.push( CodeAction.create( - l10n.t('convertToBoolean'), + l10n.t('Convert to boolean'), createWorkspaceEdit(document.uri, [TextEdit.replace(diagnostic.range, newValue)]), CodeActionKind.QuickFix ) @@ -233,7 +233,7 @@ export class YamlCodeActions { const rewriter = new FlowStyleRewriter(this.indentation); results.push( CodeAction.create( - l10n.t('convertToBlockStyle', 'Convert to block style {0}', blockTypeDescription), + l10n.t('Convert to block style {0}', 'Convert to block style {0}', blockTypeDescription), createWorkspaceEdit(document.uri, [TextEdit.replace(diagnostic.range, rewriter.write(node))]), CodeActionKind.QuickFix ) @@ -308,7 +308,7 @@ export class YamlCodeActions { const replaceRange = Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length)); results.push( CodeAction.create( - l10n.t('fixKeyOrderToMap'), + l10n.t('Fix key order for this map'), createWorkspaceEdit(document.uri, [TextEdit.replace(replaceRange, CST.stringify(sorted.srcToken))]), CodeActionKind.QuickFix ) diff --git a/src/languageservice/services/yamlCompletion.ts b/src/languageservice/services/yamlCompletion.ts index 55de2b026..fd4807a2a 100644 --- a/src/languageservice/services/yamlCompletion.ts +++ b/src/languageservice/services/yamlCompletion.ts @@ -1002,12 +1002,12 @@ export class YamlCompletion { const schemaTypeTitle = schemaType ? ' type `' + schemaType + '`' : ''; const schemaDescription = schema.description ? ' (' + schema.description + ')' : ''; const documentation = this.getDocumentationWithMarkdownText( - l10n.t('create.item.array', schemaTypeTitle, schemaDescription), + l10n.t('Create an item of an array{0}{1}', schemaTypeTitle, schemaDescription), insertText ); collector.add({ kind: this.getSuggestionKind(schema.type), - label: l10n.t('array.item') + (schemaType || index), + label: l10n.t('- (array item) ') + (schemaType || index), documentation: documentation, insertText: insertText, insertTextFormat: InsertTextFormat.Snippet, @@ -1413,7 +1413,7 @@ export class YamlCompletion { } let label; if (typeof value === 'object') { - label = l10n.t('Default Value'); + label = l10n.t('Default value'); } else { label = this.getLabelForValue(value); } @@ -1422,7 +1422,7 @@ export class YamlCompletion { label, insertText: this.getInsertTextForValue(value, separatorAfter, type), insertTextFormat: InsertTextFormat.Snippet, - detail: l10n.t('Default Value'), + detail: l10n.t('Default value'), }); hasProposals = true; } diff --git a/src/languageservice/services/yamlHover.ts b/src/languageservice/services/yamlHover.ts index f56fcf972..b803f32d1 100644 --- a/src/languageservice/services/yamlHover.ts +++ b/src/languageservice/services/yamlHover.ts @@ -188,7 +188,7 @@ export class YAMLHover { } if (markdownEnums.length !== 0) { result = ensureLineBreak(result); - result += l10n.t('allowedValues') + '\n\n'; + result += l10n.t('Allowed Values:') + '\n\n'; if (enumIdx) { markdownEnums.unshift(markdownEnums.splice(enumIdx, 1)[0]); } @@ -203,13 +203,13 @@ export class YAMLHover { if (markdownExamples.length !== 0) { markdownExamples.forEach((example) => { result = ensureLineBreak(result); - result += l10n.t('example') + '\n\n'; + result += l10n.t('Example:') + '\n\n'; result += `\`\`\`yaml\n${example}\`\`\`\n`; }); } if (result.length > 0 && schema.schema.url) { result = ensureLineBreak(result); - result += l10n.t('source', getSchemaName(schema.schema), schema.schema.url); + result += l10n.t('Source: [{0}]({1})', getSchemaName(schema.schema), schema.schema.url); } return createHover(result); } diff --git a/src/languageservice/services/yamlSchemaService.ts b/src/languageservice/services/yamlSchemaService.ts index 489b7b426..56929d52d 100644 --- a/src/languageservice/services/yamlSchemaService.ts +++ b/src/languageservice/services/yamlSchemaService.ts @@ -184,7 +184,7 @@ export class YAMLSchemaService extends JSONSchemaService { const raw: unknown = schemaToResolve.schema; if (raw === null || Array.isArray(raw) || (typeof raw !== 'object' && typeof raw !== 'boolean')) { const got = raw === null ? 'null' : Array.isArray(raw) ? 'array' : typeof raw; - resolveErrors.push(l10n.t('json.schema.invalidSchema', loc, `expected a JSON Schema object or boolean, got ${got}`)); + resolveErrors.push(l10n.t("Schema '{0}' is not valid: {1}", loc, `expected a JSON Schema object or boolean, got ${got}`)); return new ResolvedSchema({}, resolveErrors); } @@ -196,7 +196,7 @@ export class YAMLSchemaService extends JSONSchemaService { for (const err of validator.errors as DefinedError[]) { errs.push(`${err.instancePath} : ${err.message}`); } - resolveErrors.push(l10n.t('json.schema.invalidSchema', loc, `\n${errs.join('\n')}`)); + resolveErrors.push(l10n.t("Schema '{0}' is not valid: {1}", loc, `\n${errs.join('\n')}`)); } const findSection = (schema: JSONSchema, path: string): JSONSchema => { @@ -224,7 +224,7 @@ export class YAMLSchemaService extends JSONSchemaService { } } } else { - resolveErrors.push(l10n.t('json.schema.invalidref', path, sourceURI)); + resolveErrors.push(l10n.t("$ref '{0}' in '{1}' cannot be resolved.", path, sourceURI)); } }; @@ -245,7 +245,7 @@ export class YAMLSchemaService extends JSONSchemaService { parentSchemaDependencies[uri] = true; if (unresolvedSchema.errors.length) { const loc = linkPath ? uri + '#' + linkPath : uri; - resolveErrors.push(l10n.t('json.schema.problemloadingref', loc, unresolvedSchema.errors[0])); + resolveErrors.push(l10n.t("Problems loading reference '{0}': {1}", loc, unresolvedSchema.errors[0])); } merge(node, unresolvedSchema.schema, uri, linkPath); node.url = uri; @@ -688,7 +688,6 @@ export class YAMLSchemaService extends JSONSchemaService { (content) => { if (!content) { const errorMessage = l10n.t( - 'json.schema.nocontent', "Unable to load schema from '{0}': No content. {1}", toDisplayString(schemaUri), unresolvedJsonSchema.errors @@ -700,12 +699,7 @@ export class YAMLSchemaService extends JSONSchemaService { const schemaContent = parse(content); return new UnresolvedSchema(schemaContent, []); } catch (yamlError) { - const errorMessage = l10n.t( - 'json.schema.invalidFormat', - "Unable to parse content from '{0}': {1}.", - toDisplayString(schemaUri), - yamlError - ); + const errorMessage = l10n.t("Unable to parse content from '{0}': {1}.", toDisplayString(schemaUri), yamlError); return new UnresolvedSchema({}, [errorMessage]); } }, @@ -730,7 +724,7 @@ export class YAMLSchemaService extends JSONSchemaService { } else if (unresolvedJsonSchema.errors && unresolvedJsonSchema.errors.length > 0) { let errorMessage: string = unresolvedJsonSchema.errors[0]; if (errorMessage.toLowerCase().indexOf('load') !== -1) { - errorMessage = l10n.t('json.schema.noContent', toDisplayString(schemaUri)); + errorMessage = l10n.t("Unable to load schema from '{0}': No content.", toDisplayString(schemaUri)); } else if (errorMessage.toLowerCase().indexOf('parse') !== -1) { const content = await requestService(schemaUri); const jsonErrors: Json.ParseError[] = []; @@ -738,7 +732,12 @@ export class YAMLSchemaService extends JSONSchemaService { if (jsonErrors.length && schemaContent) { const { offset } = jsonErrors[0]; const { line, column } = getLineAndColumnFromOffset(content, offset); - errorMessage = l10n.t('json.schema.invalidFormat', toDisplayString(schemaUri), line, column); + errorMessage = l10n.t( + "Unable to parse content from '{0}': Parse error at line: {1} column: {2}", + toDisplayString(schemaUri), + line, + column + ); } } return new UnresolvedSchema({}, [errorMessage]); diff --git a/test/bundlel10n.test.ts b/test/bundlel10n.test.ts index c449385e5..7f1134450 100644 --- a/test/bundlel10n.test.ts +++ b/test/bundlel10n.test.ts @@ -62,7 +62,7 @@ describe('Bundle l10n Test', () => { l10nPath: path.join(__dirname, '../l10n'), }, }); - assert.equal(l10n.t('Default Value'), 'Valeur par défaut'); + assert.equal(l10n.t('Default value'), 'Valeur par défaut'); }); it('un configured locale should return in english', async () => { @@ -75,7 +75,7 @@ describe('Bundle l10n Test', () => { l10nPath: path.join(__dirname, '../l10n'), }, }); - assert.equal(l10n.t('Default Value'), 'Default value'); + assert.equal(l10n.t('Default value'), 'Default value'); }); }); }); From dee8097caa27ffcaefd5467bc44791faf6b377a8 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 15 Jan 2026 11:13:21 -0500 Subject: [PATCH 3/6] Fix tests The localization tests need to initialize the language server with the correct translation loading function. Signed-off-by: David Thompson --- src/nodeTranslationSetup.ts | 35 +++++++++++++++++++++++++++++++++++ src/server.ts | 27 +++------------------------ test/bundlel10n.test.ts | 13 +++++++------ 3 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 src/nodeTranslationSetup.ts diff --git a/src/nodeTranslationSetup.ts b/src/nodeTranslationSetup.ts new file mode 100644 index 000000000..c2471492a --- /dev/null +++ b/src/nodeTranslationSetup.ts @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) IBM Corp. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as path from 'path'; +import { existsSync } from 'fs'; +import { URI } from 'vscode-uri'; +import * as l10n from '@vscode/l10n'; +import { InitializeParams } from 'vscode-languageserver'; + +/** + * Loads translations from the filesystem based on the configured locale and the folder of translations provided in hte initilaization parameters. + * + * This is the default implementation when running as binary, but isn't used when running as a web worker. + * + * @param params the language server initialization parameters + */ +export async function setupl10nBundle(params: InitializeParams): Promise { + const __dirname = path.dirname(__filename); + const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../../../l10n'); + const locale: string = params.locale || 'en'; + if (l10nPath) { + const bundleFile = !existsSync(path.join(l10nPath, `bundle.l10n.${locale}.json`)) + ? `bundle.l10n.json` + : `bundle.l10n.${locale}.json`; + const baseBundleFile = path.join(l10nPath, bundleFile); + process.env.VSCODE_NLS_CONFIG = JSON.stringify({ + locale, + _languagePackSupport: true, + }); + await l10n.config({ + uri: URI.file(baseBundleFile).toString(), + }); + } +} diff --git a/src/server.ts b/src/server.ts index d4156b034..5aaa7a791 100644 --- a/src/server.ts +++ b/src/server.ts @@ -5,16 +5,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { promises as fs, existsSync } from 'fs'; -import { Connection, createConnection, InitializeParams, ProposedFeatures } from 'vscode-languageserver/node'; +import { promises as fs } from 'fs'; +import { Connection, createConnection, ProposedFeatures } from 'vscode-languageserver/node'; import { TelemetryImpl } from './languageserver/telemetry'; import { schemaRequestHandler, workspaceContext } from './languageservice/services/schemaRequestHandler'; import { convertErrorToTelemetryMsg } from './languageservice/utils/objects'; +import { setupl10nBundle } from './nodeTranslationSetup'; import { YAMLServerInit } from './yamlServerInit'; import { SettingsState } from './yamlSettings'; -import * as path from 'path'; -import * as l10n from '@vscode/l10n'; -import { URI } from 'vscode-uri'; // Create a connection for the server. let connection: Connection = null; @@ -69,23 +67,4 @@ const schemaRequestHandlerWrapper = (connection: Connection, uri: string): Promi const schemaRequestService = schemaRequestHandlerWrapper.bind(this, connection); const telemetry = new TelemetryImpl(connection); -async function setupl10nBundle(params: InitializeParams): Promise { - const __dirname = path.dirname(__filename); - const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../../../l10n'); - const locale: string = params.locale || 'en'; - if (l10nPath) { - const bundleFile = !existsSync(path.join(l10nPath, `bundle.l10n.${locale}.json`)) - ? `bundle.l10n.json` - : `bundle.l10n.${locale}.json`; - const baseBundleFile = path.join(l10nPath, bundleFile); - process.env.VSCODE_NLS_CONFIG = JSON.stringify({ - locale, - _languagePackSupport: true, - }); - await l10n.config({ - uri: URI.file(baseBundleFile).toString(), - }); - } -} - new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry, setupl10nBundle).start(); diff --git a/test/bundlel10n.test.ts b/test/bundlel10n.test.ts index 7f1134450..f5daed522 100644 --- a/test/bundlel10n.test.ts +++ b/test/bundlel10n.test.ts @@ -2,15 +2,16 @@ * Copyright (c) Red Hat. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as l10n from '@vscode/l10n'; import * as assert from 'assert'; +import * as path from 'path'; +import { Connection, createConnection } from 'vscode-languageserver/node'; +import { schemaRequestHandler, workspaceContext } from '../src/languageservice/services/schemaRequestHandler'; +import { setupl10nBundle } from '../src/nodeTranslationSetup'; +import { YAMLServerInit } from '../src/yamlServerInit'; import { SettingsState } from '../src/yamlSettings'; import { TestCustomSchemaProvider, testFileSystem } from './utils/testHelper'; -import { createConnection, Connection } from 'vscode-languageserver/node'; -import { schemaRequestHandler, workspaceContext } from '../src/languageservice/services/schemaRequestHandler'; import { TestTelemetry } from './utils/testsTypes'; -import { YAMLServerInit } from '../src/yamlServerInit'; -import * as l10n from '@vscode/l10n'; -import * as path from 'path'; describe('Bundle l10n Test', () => { let serverInit: YAMLServerInit; @@ -36,7 +37,7 @@ describe('Bundle l10n Test', () => { }; const schemaRequestService = schemaRequestHandlerWrapper.bind(this, connection); const telemetry = new TestTelemetry(connection); - serverInit = new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry); + serverInit = new YAMLServerInit(connection, yamlSettings, workspaceContext, schemaRequestService, telemetry, setupl10nBundle); }); after(async () => { From a619891adcd975ca95eb5a3a004205cc2c0e55c5 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 19 Jan 2026 09:57:15 -0500 Subject: [PATCH 4/6] Fix message repeated twice in translation params Co-authored-by: Morgan Chang --- src/languageservice/services/yamlCodeActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languageservice/services/yamlCodeActions.ts b/src/languageservice/services/yamlCodeActions.ts index 1d90bdfa9..7cb4f6bc1 100644 --- a/src/languageservice/services/yamlCodeActions.ts +++ b/src/languageservice/services/yamlCodeActions.ts @@ -233,7 +233,7 @@ export class YamlCodeActions { const rewriter = new FlowStyleRewriter(this.indentation); results.push( CodeAction.create( - l10n.t('Convert to block style {0}', 'Convert to block style {0}', blockTypeDescription), + l10n.t('Convert to block style {0}', blockTypeDescription), createWorkspaceEdit(document.uri, [TextEdit.replace(diagnostic.range, rewriter.write(node))]), CodeActionKind.QuickFix ) From 4a85969309d8a4f4e40000e6b5e42c8b708d3d53 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 19 Jan 2026 09:57:46 -0500 Subject: [PATCH 5/6] Fix typos in nodeTranslationSetup.ts Co-authored-by: Morgan Chang --- src/nodeTranslationSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodeTranslationSetup.ts b/src/nodeTranslationSetup.ts index c2471492a..0d692d046 100644 --- a/src/nodeTranslationSetup.ts +++ b/src/nodeTranslationSetup.ts @@ -9,7 +9,7 @@ import * as l10n from '@vscode/l10n'; import { InitializeParams } from 'vscode-languageserver'; /** - * Loads translations from the filesystem based on the configured locale and the folder of translations provided in hte initilaization parameters. + * Loads translations from the filesystem based on the configured locale and the folder of translations provided in the initialization parameters. * * This is the default implementation when running as binary, but isn't used when running as a web worker. * From 3ea2a30a58e1d98c50d168b31fa03aea447c9464 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 19 Jan 2026 09:58:12 -0500 Subject: [PATCH 6/6] Fix message repeated twice in translation params Co-authored-by: Morgan Chang --- src/languageservice/services/validation/yaml-style.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languageservice/services/validation/yaml-style.ts b/src/languageservice/services/validation/yaml-style.ts index f50005756..b1c20aaf1 100644 --- a/src/languageservice/services/validation/yaml-style.ts +++ b/src/languageservice/services/validation/yaml-style.ts @@ -22,7 +22,7 @@ export class YAMLStyleValidator implements AdditionalValidator { result.push( Diagnostic.create( this.getRangeOf(document, node.srcToken), - l10n.t('Flow style mapping is forbidden', 'Flow style mapping is forbidden'), + l10n.t('Flow style mapping is forbidden'), DiagnosticSeverity.Error, 'flowMap' )