From a959bc0fa3d9be53db1d7b4811262e65e04df035 Mon Sep 17 00:00:00 2001 From: John Bieling Date: Mon, 6 May 2024 20:11:07 +0200 Subject: [PATCH] Rename the artificial messages API / messages.json to i18nMessages.json (#5279) * Rename the artificial messages API / messages.json to i18nMessages.json * fix review comments --- src/schema/{messages.json => i18n_messages.json} | 4 ++-- src/schema/validator.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/schema/{messages.json => i18n_messages.json} (94%) diff --git a/src/schema/messages.json b/src/schema/i18n_messages.json similarity index 94% rename from src/schema/messages.json rename to src/schema/i18n_messages.json index 42498e32ed4..41d11690102 100644 --- a/src/schema/messages.json +++ b/src/schema/i18n_messages.json @@ -1,5 +1,5 @@ { - "$id": "messages", + "$id": "i18nMessages", "types": { "i18nPlaceholder": { "type": "object", @@ -38,7 +38,7 @@ "message" ] }, - "WebExtensionMessages": { + "WebExtensionI18nMessages": { "type": "object", "patternProperties": { "^.*$": { diff --git a/src/schema/validator.js b/src/schema/validator.js index 35746d9f1b5..5027a4e3f7d 100644 --- a/src/schema/validator.js +++ b/src/schema/validator.js @@ -5,7 +5,7 @@ import { getDefaultConfigValue } from 'yargs-options'; import { deepPatch } from 'schema/deepmerge'; import schemaObject from 'schema/imported/manifest'; import themeSchemaObject from 'schema/imported/theme'; -import messagesSchemaObject from 'schema/messages'; +import messagesSchemaObject from 'schema/i18n_messages'; import { DEPRECATED_MANIFEST_PROPERTIES, MANIFEST_VERSION_DEFAULT, @@ -196,7 +196,7 @@ export class SchemaValidator { * An optional parameter with a set of custom schema data for the i18n messages json * files (to be used in unit tests if necessary). * If not passed the SchemaValidator instance defaults to the schema data exported - * from `schema/messages`. + * from `schema/i18n_messages`. */ constructor(validatorOptions) { this._options = validatorOptions; @@ -380,8 +380,8 @@ export class SchemaValidator { if (!this._localeValidator) { this._localeValidator = this._validator.compile({ ...this.messagesSchemaObject, - $id: 'messages', - $ref: '#/types/WebExtensionMessages', + $id: 'i18nMessages', + $ref: '#/types/WebExtensionI18nMessages', }); }