diff --git a/en/Immer.md b/en/Immer.md index 11ef4155b8b0892b750a7271efb78e2943970c41..0450f3d94e5a2612d2192beafafff35977e980b0 100644 --- a/en/Immer.md +++ b/en/Immer.md @@ -1,5 +1,5 @@ -模板版本:v0.2.1 +Template version: v0.2.1

immer

@@ -16,9 +16,9 @@ > [!TIP] [Github 地址](https://github.com/immerjs/immer) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -37,7 +37,7 @@ yarn add immer@10.0.4 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ```js import React, {useState, useEffect, Component} from 'react'; @@ -771,17 +771,17 @@ export default MyComponent; ``` -## 兼容性 +## Compatibility -在以下版本验证通过 +This document is verified based on the following versions: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; ## API -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. > | Name | Description | Required | Type | Platform | HarmonyOS Support | > | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------- | ----------------- | ----------------- | @@ -809,12 +809,12 @@ export default MyComponent; > | setAutoFreeze | Enable/disable recursive automatic freezing. Default enabled | NO | Function | Android IOS | YES | > | setUseStrictShallowCopy | Can be used to enable strict shallow copying, if enabled, the importer will replicate as many non enumerable attributes as possible | NO | Function | Android IOS | YES | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/immerjs/immer/blob/main/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/immerjs/immer/blob/main/LICENSE), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/axios.md b/en/axios.md index 6fb9a1875feaa61e4939a60daaf4780017e5a044..19f1a492f6396487ee4fc5faef22d3476151d298 100644 --- a/en/axios.md +++ b/en/axios.md @@ -1,4 +1,4 @@ -> 模板版本:v0.1.3 +> Template version: v0.1.3

axios

@@ -11,7 +11,7 @@ > [!tip] [Github 地址](https://github.com/axios/axios) -## 安装与使用 +## Installation and Usage #### **npm** @@ -47,9 +47,9 @@ console.log(axios.isCancel("something")); -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import axios from "axios"; @@ -98,19 +98,19 @@ async function getUser() { } ``` -## 约束与限制 +## Constraints -## 兼容性 +## Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; ## API -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | HarmonyOS Support | | :--------------------------------- | -------------------------- | :------: | :------: | :---------------: | @@ -146,8 +146,8 @@ async function getUser() { | AbortController | 中止控制器 | function | / | yes | | CancelToken | 取消令牌 | function | / | yes | -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/Kureev/react-native-blur/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/Kureev/react-native-blur/blob/master/LICENSE), Please enjoy and participate freely in open source. diff --git a/en/crypto-js.md b/en/crypto-js.md index b99b5546be4c438c7280875cd81e68925f98ad57..546c9321d131af923d3898916462e7c7defc5b7f 100644 --- a/en/crypto-js.md +++ b/en/crypto-js.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> Template version: v0.1.3

crypto-js

@@ -10,11 +10,11 @@

-> [!tip] [Github 地址](https://github.com/brix/crypto-js/tree/4.2.0) +> [!tip] [Github address](https://github.com/brix/crypto-js/tree/4.2.0) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -34,7 +34,7 @@ yarn add @types/crypto-js@^4.2.1 -快速使用: +Quick use: ```typescript import React, { useState } from 'react'; @@ -110,16 +110,16 @@ function CryptoJSDemo() { export default CryptoJSDemo; ``` -## 约束与限制 +## Constraints -#### 兼容性 +#### Compatibility 在下述版本验证通过: 1. RNOH:0.72.11; SDK:OpenHarmony(api11) 4.1.0.53; IDE:DevEco Studio 4.1.3.412; ROM:2.0.0.52; 2. RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.58; -## API列表 +## API List **以下 `C` 均为crypto-js导出的对象,即:** @@ -615,12 +615,12 @@ import C from "crypto-js"; | C.enc.Base64url.stringify | 将字节数组转换为Base64url格式字符串。 | function | no | yes | | C.enc.Base64url.parse | 将Base64url格式字符串转换为字节数组。 | function | no | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [MIT License](https://github.com/brix/crypto-js/blob/4.2.0/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [MIT License](https://github.com/brix/crypto-js/blob/4.2.0/LICENSE), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/jsbarcode.md b/en/jsbarcode.md index e52aee52de07760fbec682960d3049a935412b10..372b4e2613544ab64369ffb92c7e9adf9c7701e5 100644 --- a/en/jsbarcode.md +++ b/en/jsbarcode.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> Template version: v0.2.0

JsBarCode

@@ -10,11 +10,11 @@

-> [!tip] [Github 地址](https://github.com/lindell/JsBarcode) +> [!tip] [Github address](https://github.com/lindell/JsBarcode) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -32,15 +32,15 @@ yarn add jsbarcode@3.11.6 -快速使用: +quick-access: ```bash import JsBarCode from 'jsbarcode'; ``` -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. -下面的代码展示了这个库的基本使用示例: +The following code shows the basic use scenario of the repository: ### **With svg:** @@ -190,7 +190,7 @@ var canvas = createCanvas(); JsBarcode(canvas, "Hello"); ``` -如下是Options使用示例展示: +Here is an example of using Options: ```js // format @@ -279,17 +279,17 @@ JsBarcode("#barcode", "29012343", { flat: true, }); ``` -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; ## **All Options** -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | HarmonyOS Support | Remark | | ------------ | ----------------- | ------------------ | -------- | ----------------- | --------------------------------------------------------------------- | @@ -314,14 +314,14 @@ JsBarcode("#barcode", "29012343", { | flat | false | Boolean | no | yes | 仅支持format:EAN8/EAN13 | | valid | function(valid){} | Function | no | yes | | -## 遗留问题 +## Known Issues jsbarcode库依赖react-native-svg库进行条形码展示, 因svg 当前仅实现部分属性,其余还未实现 HarmonyOS 化,目前在HarmonyOS上条形码的文本位置效果不对,fontSize显示比较小。 -## 其他 +## Others -## 开源协议 +## License -本项目基于 [MIT License](https://github.com/lindell/JsBarcode/blob/master/MIT-LICENSE.txt) ,请自由地享受和参与开源。 +This project is licensed under [MIT License](https://github.com/lindell/JsBarcode/blob/master/MIT-LICENSE.txt), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/lodash.md b/en/lodash.md index 54e5843c17c4f6c429099a40c84c36a68af60859..cb5c06d922ada08ca17c722db85e9203ec511145 100644 --- a/en/lodash.md +++ b/en/lodash.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> Template version: v0.1.3

lodash

@@ -12,7 +12,7 @@ > [!tip] [Github 地址](https://github.com/lodash/lodash/tree/4.17.21) -## 安装与使用 +## Installation and Usage @@ -30,7 +30,7 @@ yarn add lodash@4.17.21 -直接使用: +direct use: ```js import React, { useState } from 'react'; @@ -74,18 +74,18 @@ const LodashDemo = () => { export default LodashDemo; ``` -### 兼容性 +### Compatibility -在下述版本验证通过: +Verified in the following version: 1. RNOH:0.72.11; SDK:OpenHarmony(api11) 4.1.0.53; IDE:DevEco Studio 4.1.3.412; ROM:2.0.0.52; 2. RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.58; -## 静态方法 +## static method -详情查看[lodash 官方文档](https://lodash.com/docs/4.17.15) +View details[lodash Official document](https://lodash.com/docs/4.17.15) -如下是已验证接口展示: +The following is a display of validated interfaces: #### **Collection** @@ -185,12 +185,12 @@ export default LodashDemo; | ----- | ----------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | | chain | Creates a lodash wrapper instance that wraps value with explicit method chain sequences enabled | function | NO | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/lodash/lodash/blob/4.17.21/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/lodash/lodash/blob/4.17.21/LICENSE) ,Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/mobx-react.md b/en/mobx-react.md index 5fb65ca4244759918d3f59bc6e2bbf31fd11009f..d966372fec210efd4678003e5594162be3132905 100644 --- a/en/mobx-react.md +++ b/en/mobx-react.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> Template version: v0.1.3

mobx-react

@@ -12,9 +12,9 @@ > [!tip] [Github 地址](https://github.com/mobxjs/mobx/tree/mobx-react%407.6.0) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -32,7 +32,7 @@ yarn add mobx-react@7.6.0 -快速使用: +Quick use: ```js module.exports = { @@ -44,7 +44,7 @@ module.exports = { }; ``` -安装babel相关依赖: +Install Babel related dependencies: ```bash npm install @babel/core @@ -54,7 +54,7 @@ npm install @babel/plugin-proposal-decorators --save-dev npm install @babel/plugin-transform-class-properties --save-dev ``` -下面的代码展示了这个库的基本使用场景: +mobx-react is used as an example. ```js import React from 'react'; @@ -84,7 +84,7 @@ class CounterStore { const counterStore = new CounterStore(); -// Counter 组件,使用 @inject 和 @observer 进行连接 +// Counter component, connect using @ inject and @ observer @inject('counterStore') @observer class Counter extends React.Component { @@ -126,22 +126,22 @@ const styles = StyleSheet.create({ export default App; ``` -### 兼容性 +### Compatibility -在下述版本验证通过: +The following is a display of validated interfaces: 1. RNOH:0.72.11; SDK:OpenHarmony(api11) 4.1.0.53; IDE:DevEco Studio 4.1.3.412; ROM:2.0.0.52; 2. RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.58; -## 属性 +## attribute -详情查看[mobx-react官方文档](https://github.com/mobxjs/mobx-react) +View details[Official documentation of mobx-react](https://github.com/mobxjs/mobx-react) -如下是已验证接口展示: +The following is a display of validated interfaces: -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | HarmonyOS Support | | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | @@ -149,10 +149,11 @@ export default App; | Provider | is a component that can pass stores (or other stuff) using React's context mechanism to child components | function | no | yes | | inject | can be used to pick up those stores. It is a higher order component that takes a list of strings and makes those stores available to the wrapped component | function | no | yes | -## 其他 +## Others -## 开源协议 +## License + +This project is licensed under [The MIT License (MIT)](https://github.com/mobxjs/mobx/blob/mobx-react%407.6.0/LICENSE), Please enjoy and participate freely in open source. -本项目基于 [The MIT License (MIT)](https://github.com/mobxjs/mobx/blob/mobx-react%407.6.0/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/en/mobx.md b/en/mobx.md index dcd20aff3f7a8f26053fd73fbbc31d228e440afa..f586bcb4cc106eb5fd16cbd475413041acdf119f 100644 --- a/en/mobx.md +++ b/en/mobx.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> Template version: v0.1.3

mobx

@@ -12,9 +12,9 @@ > [!tip] [Github 地址](https://github.com/mobxjs/mobx/tree/mobx%406.10.0) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -32,7 +32,7 @@ yarn add mobx@6.10.0 -快速使用: +Quick use: ```js module.exports = { @@ -44,7 +44,7 @@ module.exports = { }; ``` -安装babel相关依赖: +Install Babel related dependencies: ```bash npm install @babel/core @@ -54,7 +54,7 @@ npm install @babel/plugin-proposal-decorators --save-dev npm install @babel/plugin-transform-class-properties --save-dev ``` -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ```js import React from 'react'; @@ -78,10 +78,10 @@ class CounterStore { } } -// 创建一个store的实例 +// Create an instance of a store const counterStore = new CounterStore(); -// 使用observer包裹组件,监听状态变化 +// Use observer to package components and listen for status changes const Counter = observer(() => { return ( @@ -116,22 +116,22 @@ const styles = StyleSheet.create({ export default App; ``` -### 兼容性 +### Compatibility -在下述版本验证通过: +Verified in the following version: 1. RNOH:0.72.11; SDK:OpenHarmony(api11) 4.1.0.53; IDE:DevEco Studio 4.1.3.412; ROM:2.0.0.52; 2. RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.58; -## 属性 +## attribute -详情查看[mobx官方文档](https://mobx.js.org/api.html) +View details[MOBX official documentation](https://mobx.js.org/api.html) -如下是已验证接口展示: +The following is a display of validated interfaces: -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. #### **Creating observables** @@ -188,10 +188,10 @@ export default App; | ---- | ---------------------------------------------------------------- | -------- | -------- | ----------------- | | toJS | Recursively converts an observable object to a JavaScript object | function | no | yes | -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/mobxjs/mobx/blob/mobx%406.10.0/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/mobxjs/mobx/blob/mobx%406.10.0/LICENSE), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/moment.md b/en/moment.md index 059ccdc963454e42b073156d19545cfb73fb66df..f59da2a86babb0a366fb351d96c412638c91e09f 100644 --- a/en/moment.md +++ b/en/moment.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> Template version: v0.2.0

Moment

@@ -10,11 +10,11 @@

-> [!tip] [Github 地址](https://github.com/moment/moment) +> [!tip] [Github address](https://github.com/moment/moment) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -32,26 +32,26 @@ yarn add moment@2.30.1 -快速使用: +quick use: ```bash import moment from 'moment'; moment().format(); ``` -设定moment区域: +Set the moment area: ```bash -// import 方式 +// Import method import 'moment/locale/zh-cn'; moment.locale('zh-cn'); ``` -## 约束与限制 +## Constraints -## 兼容性 +## Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; @@ -65,7 +65,7 @@ moment.locale('zh-cn'); import moment from 'moment'; ``` -下面的代码展示了这个库的基本使用示例: +The following code shows the basic use scenario of the repository: ```js // 获取今天0时0分0秒 @@ -256,8 +256,8 @@ moment().format("hh:mm:ss a"); | ss | 有前导零的描述 | 01到59 | | X | Unix时间戳 | 1411572969 | -## 其他 +## Others -## 开源协议 +## License \ No newline at end of file diff --git a/en/react-native-audio.md b/en/react-native-audio.md index 1bf3918ee981643d40fda5ec89a689464af7c20f..ae46a4768ced66a1abe5d4394da95dc1f36820aa 100644 --- a/en/react-native-audio.md +++ b/en/react-native-audio.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-audio

@@ -14,16 +14,16 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-audio/) +> [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-audio/) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-audio Releases](https://github.com/react-native-oh-library/react-native-audio/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-audio Releases](https://github.com/react-native-oh-library/react-native-audio/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -41,9 +41,9 @@ yarn add @react-native-oh-tpl/react-native-audio@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ->[!WARNING] 使用时 import 的库名不变。 +>[!WARNING] The name of the imported repository remains unchanged. ```js import { AudioRecorder, AudioUtils } from "@react-native-oh-tpl/react-native-audio"; @@ -100,17 +100,17 @@ AudioRecorder.onFinished = (data) => { } ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -121,18 +121,15 @@ AudioRecorder.onFinished = (data) => { } ``` -### 2.引入原生端代码 +### 2.Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入 +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -141,23 +138,24 @@ AudioRecorder.onFinished = (data) => { } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. + +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +### 3. Introducing AudioPackage Component to ArkTS -### 3.在 ArkTs 侧引入 AudioPackage -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -171,34 +169,34 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4.Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: react-native-harmony:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[react-native-audio Releases](https://github.com/react-native-oh-library/react-native-audio/releases) +Check the release version information in the release address of the third-party library: [react-native-audio Releases](https://github.com/react-native-oh-library/react-native-audio/releases) ## API -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | @@ -210,10 +208,10 @@ react-native-harmony:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevE | resumeRecording | Resume recording | function | no | Android/IOS | yes | | stopRecording | stop recording | function | no | Android/IOS | yes | -## 遗留问题 +## Known Issues -## 其他 -### 不同系统支持的编码格式 +## Others +### Encoding formats supported by different systems Encodings supported on iOS: lpcm, ima4, aac, MAC3, MAC6, ulaw, alaw, mp1, mp2, alac, amr. @@ -223,7 +221,7 @@ Encodings supported on Harmony: aac. AudioQuality、MeteringEnabled、MeasurementMode is only for ios now. -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/jsierles/react-native-audio/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/jsierles/react-native-audio/blob/master/LICENSE), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/react-native-image-editor.md b/en/react-native-image-editor.md index 9e78f22e9f25a51918dd654d24249a49e65679d0..09103c188523b3f7b4e62cb9a60362be79f69e83 100644 --- a/en/react-native-image-editor.md +++ b/en/react-native-image-editor.md @@ -1,5 +1,5 @@ -> 模板版本:V0.2.2 +> Template version: V0.2.2

@react-native-community/image-editor

@@ -14,11 +14,11 @@

-> [Github 地址](https://github.com/react-native-oh-library/react-native-image-editor) +> [Github address](https://github.com/react-native-oh-library/react-native-image-editor) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/image-editor Releases](https://github.com/react-native-oh-library/react-native-image-editor/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package:[@react-native-oh-tpl/image-editor Releases](https://github.com/react-native-oh-library/react-native-image-editor/releases). #### **npm** @@ -32,9 +32,9 @@ npm install @react-native-oh-tpl/image-editor@file:# yarn add @react-native-oh-tpl/image-editor@file:# ``` -下面的代码展示了这个库的基本使用场景: +@react-native-community/image-editor is used as an example. -> [!TIP] 使用时 import 的库名不变。 +> [!TIP] The library name imported during use remains unchanged. ```js import React, { Component } from "react"; @@ -153,11 +153,11 @@ export default class ImageEditor extends Component { /> ) : ( - 未生成图片 + No image generated )} {croppedImageURI} -