diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md index 1e80c3d5acaa2cb348f26fcbefb01ad4b3d9e50f..9b3805f5d1b89168c919abdceeb5a4b9512b9d5a 100644 --- a/en/application-dev/reference/apis/Readme-EN.md +++ b/en/application-dev/reference/apis/Readme-EN.md @@ -228,7 +228,7 @@ - [@ohos.data.dataShareResultSet (DataShare Result Set)](js-apis-data-DataShareResultSet.md) - [@ohos.data.distributedDataObject (Distributed Data Object)](js-apis-data-distributedobject.md) - [@ohos.data.distributedKVStore (Distributed KV Store)](js-apis-distributedKVStore.md) - - [@ohos.data.preferences (Preferences)](js-apis-data-preferences.md) + - [@ohos.data.preferences (User Preferences)](js-apis-data-preferences.md) - [@ohos.data.relationalStore (RDB Store)](js-apis-data-relationalStore.md) - [@ohos.data.ValuesBucket (Value Bucket)](js-apis-data-valuesBucket.md) @@ -239,7 +239,7 @@ - [@ohos.file.fileUri (File URI)](js-apis-file-fileUri.md) - [@ohos.file.fs (File Management)](js-apis-file-fs.md) - [@ohos.file.hash (File Hash Processing)](js-apis-file-hash.md) - - [@ohos.file.picker (Picker)](js-apis-file-picker.md) + - [@ohos.file.picker (File Picker)](js-apis-file-picker.md) - [@ohos.file.securityLabel (Data Label)](js-apis-file-securityLabel.md) - [@ohos.file.statvfs (File System Space Statistics)](js-apis-file-statvfs.md) - [@ohos.file.storageStatistics (Application Storage Statistics)](js-apis-file-storage-statistics.md) @@ -267,7 +267,7 @@ - [@ohos.request (Upload and Download)](js-apis-request.md) - Connectivity - - [@ohos.bluetooth (Bluetooth) (To Be Deprecated Soon)](js-apis-bluetooth.md) + - [@ohos.bluetooth (Bluetooth)(To Be Deprecated Soon)](js-apis-bluetooth.md) - [@ohos.bluetoothManager (Bluetooth)(js-apis-bluetoothManager.md) - [@ohos.connectedTag (Active Tags)](js-apis-connectedTag.md) - [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](js-apis-cardEmulation.md) @@ -276,8 +276,8 @@ - [@ohos.rpc (RPC)](js-apis-rpc.md) - [@ohos.wifiManager (WLAN)](js-apis-wifiManager.md) - [@ohos.wifiManagerExt (WLAN Extension)](js-apis-wifiManagerExt.md) - - [@ohos.wifi (To Be Deprecated Soon)](js-apis-wifi.md) - - [@ohos.wifiext (To Be Deprecated Soon)](js-apis-wifiext.md) + - [@ohos.wifi (WLAN)(To Be Deprecated Soon)](js-apis-wifi.md) + - [@ohos.wifiext (WLAN Extension)(To Be Deprecated Soon)](js-apis-wifiext.md) - tag - [nfctech (Standard NFC Technologies)](js-apis-nfctech.md) - [tagSession (Standard NFC Tag Session)](js-apis-tagSession.md) diff --git a/en/application-dev/reference/apis/js-apis-data-preferences.md b/en/application-dev/reference/apis/js-apis-data-preferences.md index 99e43bc6a0e1a748dcea5eb8777db5361ded3040..156078c63ad8f33a7747e493948f59d511a1c791 100644 --- a/en/application-dev/reference/apis/js-apis-data-preferences.md +++ b/en/application-dev/reference/apis/js-apis-data-preferences.md @@ -1,6 +1,6 @@ -# @ohos.data.preferences (Preferences) +# @ohos.data.preferences (User Preferences) -The **Preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required. +The **user preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required. The key is of the string type, and the value can be a number, a string, a Boolean value, or an array of numbers, strings, or Boolean values. @@ -176,12 +176,12 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi | Name | Type | Mandatory| Description | | -------- | ------------------------------------- | ---- | ---------------------------------------------------- | | context | Context | Yes | Application context.
For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).
For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md). | -| name | string | Yes | Name of the **Preferences** instance to delete. | +| name | string | Yes | Name of the **Preferences** instance to delete. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined**. Otherwise, **err** is an error code.| **Error codes** -For details about the following error codes, see [Preference Error Codes](../errorcodes/errorcode-preferences.md). +For details about the error codes, see [User Preference Error Codes](../errorcodes/errorcode-preferences.md). | ID| Error Message | | -------- | ------------------------------| @@ -213,6 +213,7 @@ Stage model: ```ts import UIAbility from '@ohos.app.ability.UIAbility'; + class EntryAbility extends UIAbility { onWindowStageCreate(windowStage) { try { @@ -257,7 +258,7 @@ The deleted **Preferences** instance cannot be used for data operations. Otherwi **Error codes** -For details about the following error codes, see [Preference Error Codes](../errorcodes/errorcode-preferences.md). +For details about the error codes, see [User Preference Error Codes](../errorcodes/errorcode-preferences.md). | ID| Error Message | | -------- | ------------------------------| @@ -288,6 +289,7 @@ Stage model: ```ts import UIAbility from '@ohos.app.ability.UIAbility'; + class EntryAbility extends UIAbility { onWindowStageCreate(windowStage) { try{ @@ -348,6 +350,7 @@ Stage model: ```ts import UIAbility from '@ohos.app.ability.UIAbility'; + class EntryAbility extends UIAbility { onWindowStageCreate(windowStage) { try { @@ -500,7 +503,7 @@ try { promise.then((data) => { console.info("Got the value of 'startup'. Data: " + data); }).catch((err) => { - console.info("Failed to get value of 'startup'. code =" + err.code + ", message =" + err.message); + console.info("Failed to obtain the value of 'startup'. code =" + err.code + ", message =" + err.message); }) } catch(err) { console.info("Failed to obtain the value of 'startup'. code =" + err.code + ", message =" + err.message); diff --git a/en/application-dev/reference/errorcodes/Readme-EN.md b/en/application-dev/reference/errorcodes/Readme-EN.md index 769c7d3905a01f7709e6a47c14590b8658f91f9d..32a9f00da8e8b45373629f13cadd7b9414855591 100644 --- a/en/application-dev/reference/errorcodes/Readme-EN.md +++ b/en/application-dev/reference/errorcodes/Readme-EN.md @@ -43,7 +43,7 @@ - [DataShare Error Codes](errorcode-datashare.md) - [Distributed Data Object Error Codes](errorcode-distributed-dataObject.md) - [Distributed KV Store Error Codes](errorcode-distributedKVStore.md) - - [Preferences Error Codes](errorcode-preferences.md) + - [User Preference Error Codes](errorcode-preferences.md) - File Management - [File Management Error Codes](errorcode-filemanagement.md) - Telephony Service diff --git a/en/application-dev/reference/errorcodes/errorcode-preferences.md b/en/application-dev/reference/errorcodes/errorcode-preferences.md index 22b53b682e21315f9cc66d56943d108ccd042b2f..67cd7ab9760d36627b0c29e0b4d3715bb3e9824a 100644 --- a/en/application-dev/reference/errorcodes/errorcode-preferences.md +++ b/en/application-dev/reference/errorcodes/errorcode-preferences.md @@ -1,17 +1,17 @@ -# Preferences Error Codes +# User Preference Error Codes > **NOTE** > > This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). -## 15500010 Failed to Delete Preferences +## 15500010 Failed to Delete the User Preference Persistence File **Error Message** Failed to delete preferences. **Description** -Failed to delete the preference. +The operation of deleting the user preference persistence file failed. **Possible Causes**