diff --git a/en/application-dev/database/database-mdds-guidelines.md b/en/application-dev/database/database-mdds-guidelines.md index 70c0ee209975ff3322210041e123afbeec3b5e6f..b84b668ce377b03561f7f7fdd3cdd6eb5fb0d796 100644 --- a/en/application-dev/database/database-mdds-guidelines.md +++ b/en/application-dev/database/database-mdds-guidelines.md @@ -169,7 +169,7 @@ The following uses a single KV store as an example to describe the development p console.log(`dataChange callback call data: ${data}`); }); }catch(e){ - console.error(`An unexpected error occured. Code is ${e.code}, message is ${e.message}`); + console.error(`An unexpected error occurred. Code is ${e.code}, message is ${e.message}`); } ``` diff --git a/en/application-dev/file-management/medialibrary-resource-guidelines.md b/en/application-dev/file-management/medialibrary-resource-guidelines.md index 054591847ffa156f5ee85cf5e2412b215750e283..b5691ad2e7505f0b1df617dd94c933b09de350e7 100644 --- a/en/application-dev/file-management/medialibrary-resource-guidelines.md +++ b/en/application-dev/file-management/medialibrary-resource-guidelines.md @@ -147,7 +147,7 @@ async function example() { ## Obtaining Images and Videos in an Album You can obtain media assets in an album in either of the following ways: -- Call [MediaLibrary.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-1) with an album specified, as described in [Querying Media Assets with the Specfied Album Name](#querying-media-assets-with-the-specified-album-name). +- Call [MediaLibrary.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-1) with an album specified, as described in [Querying Media Assets with the Specified Album Name](#querying-media-assets-with-the-specified-album-name). - Call [Album.getFileAssets](../reference/apis/js-apis-medialibrary.md#getfileassets7-3) to obtain an **Album** instance, so as to obtain the media assets in it. **Prerequisites** diff --git a/en/application-dev/napi/neural-network-runtime-guidelines.md b/en/application-dev/napi/neural-network-runtime-guidelines.md index 9ae694fc12449634a75fae260050188b68e97804..0c86fd05801197bdd63a885c2071f258687a768e 100644 --- a/en/application-dev/napi/neural-network-runtime-guidelines.md +++ b/en/application-dev/napi/neural-network-runtime-guidelines.md @@ -244,7 +244,7 @@ The development process of the Neural Network Runtime consists of three phases: // Create a compilation instance to pass the model to the underlying hardware for compilation. OH_NNCompilation* compilation = OH_NNCompilation_Construct(model); if (compilation == nullptr) { - std::cout << "CreateCompilation failed, error happended when creating compilation." << std::endl; + std::cout << "CreateCompilation failed, error happened when creating compilation." << std::endl; return OH_NN_MEMORY_ERROR; } diff --git a/en/application-dev/reference/apis/js-apis-distributedKVStore.md b/en/application-dev/reference/apis/js-apis-distributedKVStore.md index 004ae7c0e58348787b80e7fd3013ff18c82f6b13..a283f9b58dc2719bd9169504ef1aeeb04c586924 100644 --- a/en/application-dev/reference/apis/js-apis-distributedKVStore.md +++ b/en/application-dev/reference/apis/js-apis-distributedKVStore.md @@ -2736,7 +2736,7 @@ try { console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -2785,7 +2785,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`) } ``` @@ -2841,7 +2841,7 @@ try { console.error(`Fail to get data.code is ${err.code},message is ${err.message} `); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`) } ``` @@ -3267,7 +3267,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -3335,7 +3335,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3398,7 +3398,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -3463,7 +3463,7 @@ try { console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3519,7 +3519,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3576,7 +3576,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3609,7 +3609,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3645,7 +3645,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3703,7 +3703,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3766,7 +3766,7 @@ try { console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -4154,7 +4154,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4191,7 +4191,7 @@ try { console.error(`Fail to commit.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.ode is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.ode is ${e.code},message is ${e.message}`); } ``` @@ -4230,7 +4230,7 @@ try { } }); }catch(e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4267,7 +4267,7 @@ try { console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4299,7 +4299,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4334,7 +4334,7 @@ try { console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4369,7 +4369,7 @@ try { console.log('Succeeded in setting syncRange'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4407,7 +4407,7 @@ try { console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4440,7 +4440,7 @@ try { console.log('Succeeded in setting syncParam'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4476,7 +4476,7 @@ try { console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4658,7 +4658,7 @@ try { console.log(`dataChange callback call data: ${data}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4832,7 +4832,7 @@ try { console.log('Succeeded in getting securityLevel'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4869,7 +4869,7 @@ try { console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -5678,7 +5678,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -5746,7 +5746,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6060,7 +6060,7 @@ try { console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6190,7 +6190,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6247,7 +6247,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6304,7 +6304,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6361,7 +6361,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6419,7 +6419,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6482,7 +6482,7 @@ try { console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` diff --git a/en/application-dev/reference/apis/js-apis-sensor.md b/en/application-dev/reference/apis/js-apis-sensor.md index e0438820b47438b2fa545723003edc91b7eef3f5..5d99ee002e6645ab65f503cac73f49d68dc2f8d5 100644 --- a/en/application-dev/reference/apis/js-apis-sensor.md +++ b/en/application-dev/reference/apis/js-apis-sensor.md @@ -5664,7 +5664,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi console.error("Operation failed. Error code: " + err.code + ", message: " + err.message); return; } - console.info("Operation successed. Data obtained: " + data); + console.info("Operation succeeded. Data obtained: " + data); for (var i=0; i < data.length; i++) { console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); } @@ -5700,7 +5700,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.trans ```js const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}); promise.then((data) => { - console.info("Operation successed."); + console.info("Operation succeeded."); for (var i=0; i < data.length; i++) { console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); } @@ -5807,7 +5807,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getDe "Operation failed. Error code: " + err.code + ", message: " + err.message); return; } - console.info("Successed to get getAltitude interface get data: " + data); + console.info("Succeeded to get getAltitude interface get data: " + data); }); ``` @@ -5874,7 +5874,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn err.message); return; } - console.info("Successed to get getGeomagneticDip interface get data: " + data); + console.info("Succeeded to get getGeomagneticDip interface get data: " + data); }) ``` @@ -5906,7 +5906,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getIn ```js const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]); promise.then((data) => { - console.info('getGeomagneticDip_promise successed', data); + console.info('getGeomagneticDip_promise succeeded', data); }).catch((err) => { console.error("Operation failed"); }) @@ -5976,7 +5976,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getAn ```js const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]); promise.then((data) => { - console.info('getAngleModifiy_promise success'); + console.info('getAngleModify_promise success'); for (var i=0; i < data.length; i++) { console.info("data[" + i + "]: " + data[i]); } @@ -6120,7 +6120,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getQu ```js const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]); promise.then((data) => { - console.info('createQuaternion_promise successed'); + console.info('createQuaternion_promise succeeded'); for (var i=0; i < data.length; i++) { console.info("data[" + i + "]: " + data[i]); } @@ -6157,7 +6157,7 @@ This API is deprecated since API version 9. You are advised to use [sensor.getOr err.message); return; } - console.info("SensorJsAPI--->Successed to get getDirection interface get data: " + data); + console.info("SensorJsAPI--->Succeeded to get getDirection interface get data: " + data); for (var i = 1; i < data.length; i++) { console.info("sensor_getDirection_callback" + data[i]); } diff --git a/en/application-dev/reference/apis/js-apis-xml.md b/en/application-dev/reference/apis/js-apis-xml.md index 2f793c39a2234eb16b30d634d53279d1b1c70de3..5259aede120c7b89b0ade477f8fb1bb27490cc1a 100644 --- a/en/application-dev/reference/apis/js-apis-xml.md +++ b/en/application-dev/reference/apis/js-apis-xml.md @@ -457,7 +457,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -528,7 +528,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -575,7 +575,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -625,7 +625,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -672,7 +672,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getName(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -718,7 +718,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getNamespace(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -764,7 +764,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getPrefix(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -811,7 +811,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getText(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -857,7 +857,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -903,7 +903,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -948,7 +948,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); diff --git a/en/application-dev/ui/ui-ts-layout-linear.md b/en/application-dev/ui/ui-ts-layout-linear.md index ec532b1cb68e6b9570bd8e5bbb3d90fcfc11cd8a..96259868f984a058aeb108189d331e590b971948 100644 --- a/en/application-dev/ui/ui-ts-layout-linear.md +++ b/en/application-dev/ui/ui-ts-layout-linear.md @@ -133,7 +133,7 @@ Adaptive scaling means that child components scale according to the preset ratio ## Positioning - Relative layout - You can use the **[offset](../reference/arkui-ts/ts-universal-attributes-location.md)** attribute to set the offset of a component relative to itself, thereby implmenting relative layout. Setting this attribute does not affect the layout of the parent container. It only adjusts the component position during drawing. The linear layout and offset can work together to meet most layout development requirements. + You can use the **[offset](../reference/arkui-ts/ts-universal-attributes-location.md)** attribute to set the offset of a component relative to itself, thereby implementing relative layout. Setting this attribute does not affect the layout of the parent container. It only adjusts the component position during drawing. The linear layout and offset can work together to meet most layout development requirements. ```ts @Entry diff --git a/en/design/OpenHarmony-API-quality.md b/en/design/OpenHarmony-API-quality.md index 3a657b44110372ee713b794cda9e36c28a244d49..74817a4b6e3b2ecc42d27701b6d47f91d0ef7c63 100644 --- a/en/design/OpenHarmony-API-quality.md +++ b/en/design/OpenHarmony-API-quality.md @@ -376,7 +376,7 @@ If an API implements too many features and cannot be named in a few words, it us Do not assume that developers have the same background information as you do. -For example, you may name a field **language** and believe all the readers know that you are talking about the programming language. In fact, someone might wonder whether you are talking about the language of speech. Name it **programmingLanuage** will eliminate the misunderstanding. +For example, you may name a field **language** and believe all the readers know that you are talking about the programming language. In fact, someone might wonder whether you are talking about the language of speech. Name it **programmingLanguage** will eliminate the misunderstanding. However, do not go to another extreme. If the class name or namespace name contains a prefix, do not repeat it in the function. diff --git a/zh-cn/application-dev/database/data-sync-of-kv-store.md b/zh-cn/application-dev/database/data-sync-of-kv-store.md index fba04ef73477f296401ff0fc30a57bb63d5bec81..14a5cdf0ec94f323f49a0d94d7084aa3b1a5289c 100644 --- a/zh-cn/application-dev/database/data-sync-of-kv-store.md +++ b/zh-cn/application-dev/database/data-sync-of-kv-store.md @@ -185,7 +185,7 @@ console.info(`dataChange callback call data: ${data}`); }); } catch (e) { - console.error(`An unexpected error occured. code:${e.code},message:${e.message}`); + console.error(`An unexpected error occurred. code:${e.code},message:${e.message}`); } ``` diff --git a/zh-cn/application-dev/napi/neural-network-runtime-guidelines.md b/zh-cn/application-dev/napi/neural-network-runtime-guidelines.md index d1db02f381152821b699ffcc3870081a46742641..4fa36ff1f15e23b4d8d1a311384fcf7e42ba2bea 100644 --- a/zh-cn/application-dev/napi/neural-network-runtime-guidelines.md +++ b/zh-cn/application-dev/napi/neural-network-runtime-guidelines.md @@ -244,7 +244,7 @@ Neural Network Runtime的开发流程主要包含**模型构造**、**模型编 // 创建编译实例,用于将模型传递至底层硬件编译 OH_NNCompilation* compilation = OH_NNCompilation_Construct(model); if (compilation == nullptr) { - std::cout << "CreateCompilation failed, error happended when creating compilation." << std::endl; + std::cout << "CreateCompilation failed, error happened when creating compilation." << std::endl; return OH_NN_MEMORY_ERROR; } diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md b/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md index 0de843b357c0bf049ec755163a339c1102fe2e9d..ccf2915c953c2a8fca6f5978cd60d8b4235d332e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md @@ -2808,7 +2808,7 @@ try { console.error(`Fail to put Batch.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -2857,7 +2857,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`) } ``` @@ -2913,7 +2913,7 @@ try { console.error(`Fail to get data.code is ${err.code},message is ${err.message} `); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`) + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`) } ``` @@ -3341,7 +3341,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -3410,7 +3410,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3474,7 +3474,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -3540,7 +3540,7 @@ try { console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3597,7 +3597,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3655,7 +3655,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3688,7 +3688,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3724,7 +3724,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3782,7 +3782,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -3845,7 +3845,7 @@ try { console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -4245,7 +4245,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4282,7 +4282,7 @@ try { console.error(`Fail to commit.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.ode is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.ode is ${e.code},message is ${e.message}`); } ``` @@ -4321,7 +4321,7 @@ try { } }); }catch(e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4358,7 +4358,7 @@ try { console.error(`Fail to rollback.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4390,7 +4390,7 @@ try { } }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4425,7 +4425,7 @@ try { console.error(`Fail to enable sync.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4460,7 +4460,7 @@ try { console.log('Succeeded in setting syncRange'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4498,7 +4498,7 @@ try { console.error(`Fail to set syncRange.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4531,7 +4531,7 @@ try { console.log('Succeeded in setting syncParam'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4567,7 +4567,7 @@ try { console.error(`Fail to set syncParam.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4749,7 +4749,7 @@ try { console.log(`dataChange callback call data: ${data}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4923,7 +4923,7 @@ try { console.log('Succeeded in getting securityLevel'); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -4960,7 +4960,7 @@ try { console.error(`Fail to get SecurityLevel.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -5770,7 +5770,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.message}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.message}`); } ``` @@ -5839,7 +5839,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6158,7 +6158,7 @@ try { console.error(`Fail to get resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6290,7 +6290,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6348,7 +6348,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6406,7 +6406,7 @@ try { }) }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6464,7 +6464,7 @@ try { console.error(`Fail to close resultset.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6522,7 +6522,7 @@ try { }); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` @@ -6585,7 +6585,7 @@ try { console.error(`Fail to get result size.code is ${err.code},message is ${err.message}`); }); } catch (e) { - console.error(`An unexpected error occured.code is ${e.code},message is ${e.code}`); + console.error(`An unexpected error occurred.code is ${e.code},message is ${e.code}`); } ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-sensor.md b/zh-cn/application-dev/reference/apis/js-apis-sensor.md index c7fb672f2ba72e3bd74f40b4816241fd4a127118..1de7bc927994102e956ddd4d4a9fe9818174e9bf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-sensor.md +++ b/zh-cn/application-dev/reference/apis/js-apis-sensor.md @@ -5584,7 +5584,7 @@ sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}, functi console.error("Operation failed. Error code: " + err.code + ", message: " + err.message); return; } - console.info("Operation successed. Data obtained: " + data); + console.info("Operation succeeded. Data obtained: " + data); for (var i=0; i < data.length; i++) { console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); } @@ -5618,7 +5618,7 @@ transformCoordinateSystem(inRotationVector: Array<number>, coordinates: Co ```js const promise = sensor.transformCoordinateSystem([1, 0, 0, 0, 1, 0, 0, 0, 1], {x:2, y:3}); promise.then((data) => { - console.info("Operation successed."); + console.info("Operation succeeded."); for (var i=0; i < data.length; i++) { console.info("transformCoordinateSystem data[ " + i + "] = " + data[i]); } @@ -5718,7 +5718,7 @@ getAltitude(seaPressure: number, currentPressure: number, callback: AsyncCallbac "Operation failed. Error code: " + err.code + ", message: " + err.message); return; } - console.info("Successed to get getAltitude interface get data: " + data); + console.info("Succeeded to get getAltitude interface get data: " + data); }); ``` @@ -5783,7 +5783,7 @@ getGeomagneticDip(inclinationMatrix: Array<number>, callback: AsyncCallbac err.message); return; } - console.info("Successed to get getGeomagneticDip interface get data: " + data); + console.info("Succeeded to get getGeomagneticDip interface get data: " + data); }) ``` @@ -5814,7 +5814,7 @@ getGeomagneticDip(inclinationMatrix: Array<number>): Promise<number> ```js const promise = sensor.getGeomagneticDip([1, 0, 0, 0, 1, 0, 0, 0, 1]); promise.then((data) => { - console.info('getGeomagneticDip_promise successed', data); + console.info('getGeomagneticDip_promise succeeded', data); }).catch((err) => { console.error("Operation failed"); }) @@ -5882,7 +5882,7 @@ getAngleModify(currentRotationMatrix: Array<number>, preRotationMatrix: Ar ```js const promise = sensor.getAngleModify([1,0,0,0,1,0,0,0,1], [1,0,0,0,0.87,-0.50,0,0.50,0.87]); promise.then((data) => { - console.info('getAngleModifiy_promise success'); + console.info('getAngleModify_promise success'); for (var i=0; i < data.length; i++) { console.info("data[" + i + "]: " + data[i]); } @@ -6022,7 +6022,7 @@ createQuaternion(rotationVector: Array<number>): Promise<Array<numbe ```js const promise = sensor.createQuaternion([0.20046076, 0.21907, 0.73978853, 0.60376877]); promise.then((data) => { - console.info('createQuaternion_promise successed'); + console.info('createQuaternion_promise succeeded'); for (var i=0; i < data.length; i++) { console.info("data[" + i + "]: " + data[i]); } @@ -6058,7 +6058,7 @@ getDirection(rotationMatrix: Array<number>, callback: AsyncCallback<Arr err.message); return; } - console.info("SensorJsAPI--->Successed to get getDirection interface get data: " + data); + console.info("SensorJsAPI--->Succeeded to get getDirection interface get data: " + data); for (var i = 1; i < data.length; i++) { console.info("sensor_getDirection_callback" + data[i]); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-xml.md b/zh-cn/application-dev/reference/apis/js-apis-xml.md index 93740ac120886dc62da6dab35d265410a029d6c9..cd5afe9467f8a4ab42c40cadbedb4ee0b3f1512e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-xml.md +++ b/zh-cn/application-dev/reference/apis/js-apis-xml.md @@ -456,7 +456,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -527,7 +527,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getColumnNumber(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -574,7 +574,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getDepth(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -624,7 +624,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getLineNumber(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -671,7 +671,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getName(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -717,7 +717,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getNamespace(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -763,7 +763,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getPrefix(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -810,7 +810,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getText(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -856,7 +856,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.isEmptyElementTag(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -902,7 +902,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.isWhitespace(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); @@ -947,7 +947,7 @@ function func(key, value){ arrTag[i] = 'key:'+key+' value:'+ value.getAttributeCount(); str += arrTag[i]; i++; - return true; // Determines whether to continuely parse, which is used to continue or terminate parsing. + return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} that.parse(options); diff --git a/zh-cn/design/OpenHarmony-API-quality.md b/zh-cn/design/OpenHarmony-API-quality.md index 7349216fc050877cd4475120a41badbf1f977c05..8249c8dbd374d2046213fde7e5f296bc31730fcd 100644 --- a/zh-cn/design/OpenHarmony-API-quality.md +++ b/zh-cn/design/OpenHarmony-API-quality.md @@ -379,7 +379,7 @@ doSomethingThird() 还有一些情况下,大家在做某件事的时候,会本能的以为别人也有同样的背景认识。但事实往往并不是这样。在编程时也是一样。 -例如,对于一个描述编程语言的字段,可能会将其命名为`language`。这是因为大家默认认为已经在讨论编程语言了,但是`language`到底是编程语言还是国际化语言?是不是叫做`programmingLanuage`更好一些呢? +例如,对于一个描述编程语言的字段,可能会将其命名为`language`。这是因为大家默认认为已经在讨论编程语言了,但是`language`到底是编程语言还是国际化语言?是不是叫做`programmingLanguage`更好一些呢? 当然,对于这一条还是要举一个反例,不要走到另外一个极端:如果类名或者namespace名称中已经明确带了一个前缀,在函数中就没必要再重复一遍了。毫无信息量的冗余是没有必要的。