From 6c8d39e73594976152d59caa163113efc433efeb Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 19 Dec 2023 15:53:41 +0800 Subject: [PATCH] Fix typo (#16626) * fix: correct spelling errors in EngineErrorMap.md * fix: correct typo in code literals in DebugInfos.cpp --------- Co-authored-by: Ryuu <2357622935@qq.com> --- EngineErrorMap.md | 8 ++++---- native/cocos/core/builtin/DebugInfos.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/EngineErrorMap.md b/EngineErrorMap.md index 0b373c2aa2..11de5f03fb 100644 --- a/EngineErrorMap.md +++ b/EngineErrorMap.md @@ -1510,7 +1510,7 @@ CCClass %s have conflict between its ctor and __ctor__. ### 3650 -No need to specifiy "%s" attribute for "%s" property in "%s" class. +No need to specify "%s" attribute for "%s" property in "%s" class. ### 3651 @@ -1525,7 +1525,7 @@ Please ensure the constructor can be called during the script's initialization. ### 3653 -Please do not specifiy "default" attribute in decorator of "%s" property in "%s" class. +Please do not specify "default" attribute in decorator of "%s" property in "%s" class. Default value must be initialized at their declaration: ``` @@ -1544,7 +1544,7 @@ myProp = null; // <-- ### 3654 -Please specifiy a default value for "%s.%s" property at its declaration: +Please specify a default value for "%s.%s" property at its declaration: ``` // Before: @@ -1557,7 +1557,7 @@ myProp = 0; ### 3655 -Can not specifiy "get" or "set" attribute in decorator for "%s" property in "%s" class. +Can not specify "get" or "set" attribute in decorator for "%s" property in "%s" class. Please use: ``` diff --git a/native/cocos/core/builtin/DebugInfos.cpp b/native/cocos/core/builtin/DebugInfos.cpp index d83f1db811..715ca24519 100644 --- a/native/cocos/core/builtin/DebugInfos.cpp +++ b/native/cocos/core/builtin/DebugInfos.cpp @@ -156,9 +156,9 @@ ccstd::unordered_map debugInfos = { { 3647, "The length of range array must be equal or greater than 2" }, { 3648, "Can not declare %s.%s method, it is already defined in the properties of %s." }, { 3652, "Failed to `new %s()` under the hood, %s\nIt is used for getting default values declared in TypeScript in the first place.\nPlease ensure the constructor can be called during the script's initialization." }, -{ 3653, "Please do not specifiy 'default' attribute in decorator of '%s' property in '%s' class.\nDefault value must be initialized at their declaration:\n\n \n// Before:\n@property({\n type: cc.SpriteFrame\n default: null // <--\n})\nmyProp;\n// After:\n@property({\n type: cc.SpriteFrame\n})\nmyProp = null; // <--" }, -{ 3654, "Please specifiy a default value for '%s.%s' property at its declaration:\n\n \n// Before:\n@property(...)\nmyProp;\n// After:\n@property(...)\nmyProp = 0;" }, -{ 3655, "Can not specifiy 'get' or 'set' attribute in decorator for '%s' property in '%s' class.\nPlease use:\n\n \n@property(...)\nget %s () {\n ...\n}\n@property\nset %s (value) {\n ...\n}" }, +{ 3653, "Please do not specify 'default' attribute in decorator of '%s' property in '%s' class.\nDefault value must be initialized at their declaration:\n\n \n// Before:\n@property({\n type: cc.SpriteFrame\n default: null // <--\n})\nmyProp;\n// After:\n@property({\n type: cc.SpriteFrame\n})\nmyProp = null; // <--" }, +{ 3654, "Please specify a default value for '%s.%s' property at its declaration:\n\n \n// Before:\n@property(...)\nmyProp;\n// After:\n@property(...)\nmyProp = 0;" }, +{ 3655, "Can not specify 'get' or 'set' attribute in decorator for '%s' property in '%s' class.\nPlease use:\n\n \n@property(...)\nget %s () {\n ...\n}\n@property\nset %s (value) {\n ...\n}" }, { 3659, "Violation error: extending enumerations shall have non-overlaped member names or member values" }, { 3660, "You are explicitly specifying `undefined` type to cc property '%s' of cc class '%s'.\nIs this intended? If not, this may indicate a circular reference.\nFor example:\n\n \n// foo.ts\nimport { _decorator } from 'cc';\nimport { Bar } from './bar'; // Given that './bar' also reference 'foo.ts'.\n // When importing './bar', execution of './bar' is hung on to wait execution of 'foo.ts',\n // the `Bar` imported here is `undefined` until './bar' finish its execution.\n // It leads to that\n@_decorator.ccclass // ↓\nexport class Foo { // ↓\n @_decorator.type(Bar) // → is equivalent to `@_decorator.type(undefined)`\n public bar: Bar; // To eliminate this error, either:\n // - Refactor your module structure(recommended), or\n // - specify the type as cc class name: `@_decorator.type('Bar'/* or any name you specified for `Bar` */)`\n}" }, { 3700, "internal error: _prefab is undefined" },