Skip to content

Commit

Permalink
Rename the artificial messages API / messages.json to i18nMessages.js…
Browse files Browse the repository at this point in the history
…on (#5279)

* Rename the artificial messages API / messages.json to i18nMessages.json

* fix review comments
  • Loading branch information
jobisoft committed May 6, 2024
1 parent 0f3fdde commit a959bc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/schema/messages.json → src/schema/i18n_messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "messages",
"$id": "i18nMessages",
"types": {
"i18nPlaceholder": {
"type": "object",
Expand Down Expand Up @@ -38,7 +38,7 @@
"message"
]
},
"WebExtensionMessages": {
"WebExtensionI18nMessages": {
"type": "object",
"patternProperties": {
"^.*$": {
Expand Down
8 changes: 4 additions & 4 deletions src/schema/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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',
});
}

Expand Down

0 comments on commit a959bc0

Please sign in to comment.