From 414a4d58eecc77763519f1860fc76cac8aad6d02 Mon Sep 17 00:00:00 2001 From: Jiefeng Li Date: Wed, 12 Apr 2023 23:56:40 +0800 Subject: [PATCH] fix typo Signed-off-by: Jiefeng Li --- .../database/database-mdds-guidelines.md | 2 +- .../medialibrary-resource-guidelines.md | 2 +- .../napi/neural-network-runtime-guidelines.md | 2 +- .../apis/js-apis-distributedKVStore.md | 70 +++++++++---------- .../reference/apis/js-apis-sensor.md | 16 ++--- .../reference/apis/js-apis-xml.md | 22 +++--- en/application-dev/ui/ui-ts-layout-linear.md | 2 +- en/design/OpenHarmony-API-quality.md | 2 +- .../database/data-sync-of-kv-store.md | 2 +- .../napi/neural-network-runtime-guidelines.md | 2 +- .../apis/js-apis-distributedKVStore.md | 70 +++++++++---------- .../reference/apis/js-apis-sensor.md | 16 ++--- .../reference/apis/js-apis-xml.md | 22 +++--- zh-cn/design/OpenHarmony-API-quality.md | 2 +- 14 files changed, 116 insertions(+), 116 deletions(-) diff --git a/en/application-dev/database/database-mdds-guidelines.md b/en/application-dev/database/database-mdds-guidelines.md index 70c0ee2099..b84b668ce3 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 054591847f..b5691ad2e7 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 9ae694fc12..0c86fd0580 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 004ae7c0e5..a283f9b58d 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 e0438820b4..5d99ee002e 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 2f793c39a2..5259aede12 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 ec532b1cb6..96259868f9 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 06c5ae25d1..31887f7e75 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 fba04ef734..14a5cdf0ec 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 d1db02f381..4fa36ff1f1 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 e817c9c50c..b1eac91eb7 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 c7fb672f2b..1de7bc9279 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 93740ac120..cd5afe9467 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 21d0ca4e81..70ae4dd4ed 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名称中已经明确带了一个前缀,在函数中就没必要再重复一遍了。毫无信息量的冗余是没有必要的。 -- GitLab