@@ -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}
-
@@ -181,17 +181,17 @@ const styles = StyleSheet.create({
});
```
-## 使用 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
{
@@ -202,18 +202,16 @@ const styles = StyleSheet.create({
}
```
-### 2.引入原生端代码
+### 2. Introducing Native Code
-目前有两种方法:
+Currently, two methods are available:
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
+Method 1 (recommended): Use the HAR file.
-方法一:通过 har 包引入
-> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
+> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
-打开 `entry/oh-package.json5`,添加以下依赖
+Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
@@ -222,22 +220,23 @@ const styles = StyleSheet.create({
}
```
-点击右上角的 `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] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
+> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md).
-### 3.在 ArkTs 侧引入 ImageEditorPackage
+### 3.Introducing ImageEditorPackage Component to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+
+Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
@@ -251,42 +250,43 @@ 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
-### 兼容性
+To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone.
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+Check the release version information in the release address of the third-party library: [@react-native-oh-library/react-native-image-editor Releases](https://github.com/react-native-oh-library/react-native-image-editor/releases)
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-editor/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 | Type | Description | Platform | HarmonyOS Support |
| --------- | -------- | ------------------------------------------------------------ | ----------- | ----------------- |
| cropImage | function | Crop the image specified by the URI param. If URI points to a remote image, it will be downloaded automatically. If the image cannot be loaded/downloaded, the promise will be rejected.
If the cropping process is successful, the resultant cropped image will be stored in the cache path, and the CropResult returned in the promise will point to the image in the cache path. ⚠️ Remember to delete the cropped image from the cache path when you are done with it. | ios/Android | yes |
-## 属性
+## Properties
-> [!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.
**cropData**
@@ -299,11 +299,11 @@ ohpm install
| `quality` | 0.0 - 1.0 | number | A value in range `0.0` - `1.0` specifying compression level of the result image. `1` means no compression (highest quality) and `0` the highest compression (lowest quality) **Default value**: `0.9` | no | All | yes |
| `format` | 'jpeg' \| 'png' \| 'webp' | string | The format of the resulting image. **Default value**: based on the provided image; if value determination is not possible, `'jpeg'` will be used as a fallback. | no | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [ [The MIT License (MIT)]](https://github.com/callstack/react-native-image-editor/blob/master/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [ [The MIT License (MIT)]](https://github.com/callstack/react-native-image-editor/blob/master/LICENSE), Please enjoy and participate freely in open source.
\ No newline at end of file
diff --git a/en/react-native-image-sequence-2.md b/en/react-native-image-sequence-2.md
index 3115b5b0215824aa2ce0a22ac6f7536adec66ef5..e29fee75eca4c9b02a4d7f198f4f122acc114076 100644
--- a/en/react-native-image-sequence-2.md
+++ b/en/react-native-image-sequence-2.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-image-sequence
@@ -13,15 +13,15 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-sequence)
+> [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-image-sequence)
-## 安装与使用
+## Installation and Usage
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-sequence Releases](https://github.com/react-native-oh-library/react-native-image-sequence/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-image-sequence Releases](https://github.com/react-native-oh-library/react-native-image-sequence/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 (#).
@@ -39,9 +39,9 @@ yarn add @react-native-oh-tpl/react-native-image-sequence-2@file:#
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
TestDemo.tsx
@@ -78,7 +78,7 @@ const ImageSequenceDemo = (props: any) => {
const [downsampleWidth, setDownSampleWidth] = useState(-1);
const [downsampleHeight, setDownSampleHeight] = useState(-1);
- // 设置采样宽度
+ // Set Sampling Width
const inputSampleWidth = (value: string) => {
if (isNaN(Number(value))) {
return;
@@ -86,7 +86,7 @@ const ImageSequenceDemo = (props: any) => {
setDownSampleWidth(Number(value));
};
- // 设置采样高度
+ // Set Sampling Height
const inputSampleHeight = (value: string) => {
if (isNaN(Number(value))) {
return;
@@ -94,7 +94,7 @@ const ImageSequenceDemo = (props: any) => {
setDownSampleHeight(Number(value));
};
- // 设置起始位置
+ // Set Starting Position
const [startFrameIndex, setFrameIndex] = useState(0);
const inputStartFrameIndex = (value: string) => {
if (isNaN(Number(value))) {
@@ -107,7 +107,7 @@ const ImageSequenceDemo = (props: any) => {
setFrameIndex(_value);
};
- // 设置速率
+ // Set Rate
const [framesPerSecond, setFramesPerSecond] = useState(24);
const inputFramesPerSecond = (value: string) => {
if (isNaN(Number(value))) {
@@ -146,10 +146,10 @@ const ImageSequenceDemo = (props: any) => {
Current view size:width: {winWidth}, height:{winHeight}
- 开启循环: setLoopData(value)}>
+ Activate Loop: setLoopData(value)}>
- 图片宽度/高度:
+ Image Width/Height: {
/>
- 开始位置:
+ Initial Position: inputStartFrameIndex(value)}
defaultValue="0"
keyboardType="numeric"
/>
- 播放速度:
+ Playback Speed: inputFramesPerSecond(value)}
@@ -180,7 +180,7 @@ const ImageSequenceDemo = (props: any) => {
keyboardType="numeric"
/>
- 采样宽度/高度:
+ Sampling Width/Height: inputSampleWidth(value)} defaultValue='-1' keyboardType='default' />
inputSampleHeight(value)} defaultValue='-1' keyboardType='default' />
@@ -188,9 +188,9 @@ const ImageSequenceDemo = (props: any) => {
{!isShow ? (
- buttonIsShow()} />
+ buttonIsShow()} />
) : (
- buttonIsShow()} />
+ buttonIsShow()} />
)}
{isShow ? (
[!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
+> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
-打开 `entry/oh-package.json5`,添加以下依赖
+Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
@@ -316,22 +313,23 @@ export default TestDemo2
}
```
-点击右上角的 `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 RNImageSequence Component to ArkTS
-### 3.在 ArkTs 侧引入 RNImageSequence组件
-找到 `function buildCustomRNComponent()`,一般位于 `entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets`,添加:
+(If the code of the repository is written through CAPI, delete this section.) Find `function buildCustomRNComponent()`, which is usually located in `entry/src/main/ets/pages/index.ets` or `entry/src/main/ets/rn/LoadBundle.ets`, and add the following code:
```diff
...
@@ -357,9 +355,10 @@ export function buildCustomRNComponent(ctx: ComponentBuilderContext) {
...
```
-### 4.在 ArkTs 侧引入 ImageSequencePackage
+### 4.在 Introducing ImageSequencePackage Package to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+
+Open the `entry/src/main/ets/RNPackagesFactory.ts`,file and add the following code:
```diff
...
@@ -373,36 +372,37 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 5.运行
+### 5.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
-### 兼容性
+To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone.
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-image-sequence Releases](https://github.com/react-native-oh-library/react-native-image-sequence/releases)
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-sequence Releases](https://github.com/react-native-oh-library/react-native-image-sequence/releases)
-本文档内容基于以下版本验证通过:
+This document is verified based on the following versions:
1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18;
-## 属性
+## Properties
-> [!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 |
| ---------------- | ------------------------------------------------------------ | ------- | -------- | -------- | ----------------- |
@@ -413,10 +413,10 @@ ohpm install
| downsampleWidth | The width to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 | number | No | All | Yes |
| downsampleHeight | The height to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 | number | No | All | Yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/bwindsor/react-native-image-sequence/blob/master/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [The MIT License (MIT)](https://github.com/bwindsor/react-native-image-sequence/blob/master/LICENSE), Please enjoy and participate freely in open source.
diff --git a/en/react-native-sensors.md b/en/react-native-sensors.md
index cff9a8253b933c8ece7d8af8185b236c1fa96da6..a7e90b60d19983998696279afbed08db8bbdd576 100644
--- a/en/react-native-sensors.md
+++ b/en/react-native-sensors.md
@@ -1,5 +1,5 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-sensors
@@ -13,15 +13,16 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-sensors)
+> [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-sensors)
-## 安装与使用
+## Installation and Usage
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-sensors Releases](https://github.com/react-native-oh-library/react-native-sensors/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-sensors Releases](https://github.com/react-native-oh-library/react-native-sensors/releases).
-进入到工程目录并输入以下命令:
-> [!TIP] # 处替换为 tgz 包的路径
+Go to the project directory and execute the following instruction:
+
+> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#).
@@ -39,9 +40,9 @@ yarn add @react-native-oh-tpl/react-native-sensors@file:#
-下面的代码展示了这个库的基本使用场景:
+react-native-sensors is used as an example.
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import {
@@ -54,32 +55,32 @@ import {
gravity,
} from "react-native-sensors";
-//accelerometer 加速度计 accelerometer: Observable<{x: number, y: number, z: number, timestamp: string}>
+//accelerometer accelerometer: Observable<{x: number, y: number, z: number, timestamp: string}>
accelerometer.subscribe(({ x, y, z, timestamp }) =>
console.log("accelerometer", { x, y, z, timestamp })
);
-//gyroscope 陀螺仪 gyroscope: Observable<{x: number, y: number, z: number, timestamp: string}>
+//gyroscope gyroscope: Observable<{x: number, y: number, z: number, timestamp: string}>
gyroscope
.pipe(filter((speed) => speed.x > 1))
.subscribe(({ x, y, z, timestamp }) =>
console.log("gyroscope", { x, y, z, timestamp })
);
-//magnetometer 磁力计 magnetometer: Observable<{x: number, y: number, z: number, timestamp: string}>
+//magnetometer magnetometer: Observable<{x: number, y: number, z: number, timestamp: string}>
magnetometer.subscribe(({ x, y, z, timestamp }) =>
console.log("magnetometer", { x, y, z, timestamp })
);
-//barometer 气压计 barometer: Observable<{pressure: number}>
+//barometer barometer: Observable<{pressure: number}>
barometer.subscribe(({ pressure }) => console.log("barometer", { pressure }));
-//orientation 方向 orientation: Observable<{x: number, y: number, z: number, timestamp: string}>
+//orientation orientation: Observable<{x: number, y: number, z: number, timestamp: string}>
orientation.subscribe(({ x, y, z, timestamp }) =>
console.log("orientation", { x, y, z, timestamp })
);
-//gravity 重力 gravity: Observable<{x: number, y: number, z: number, timestamp: string}>
+//gravity gravity: Observable<{x: number, y: number, z: number, timestamp: string}>
gravity.subscribe(({ x, y, z, timestamp }) =>
console.log("gravity", { x, y, z, timestamp })
);
@@ -87,17 +88,17 @@ gravity.subscribe(({ x, y, z, timestamp }) =>
setUpdateIntervalForType(SensorTypes.accelerometer, 100);
```
-## 使用 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
{
@@ -108,18 +109,15 @@ setUpdateIntervalForType(SensorTypes.accelerometer, 100);
}
```
-### 2.引入原生端代码
-
-目前有两种方法:
+### 2.Introducing Native Code
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
+Currently, two methods are available:
-方法一:通过 har 包引入(推荐)
+Method 1 (recommended): Use the HAR file.
-> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
+> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
-打开 `entry/oh-package.json5`,添加以下依赖
+Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
@@ -128,22 +126,23 @@ setUpdateIntervalForType(SensorTypes.accelerometer, 100);
}
```
-点击右上角的 `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] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
+> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md).
-### 3.在 ArkTs 侧引入 SensorsPackage
+### 3. Introducing SensorsPackage Component to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+
+Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
@@ -157,44 +156,45 @@ 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
-### 兼容性
+To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone.
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-sensors Releases](https://github.com/react-native-oh-library/react-native-sensors/releases)
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-sensors Releases](https://github.com/react-native-oh-library/react-native-sensors/releases)
-本文档内容基于以下版本验证通过:
+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;
-### 权限要求
+### Permission Requirements (If Any)
-在 module.json5 中配置所需要的权限
+Configure the required permissions in module. json 5
-accelerometer 需要的权限:ohos.permission.ACCELEROMETER
+accelerometer Required permissions: ohos.permission.ACCELEROMETER
-gyroscope 需要的权限:ohos.permission.GYROSCOPE
+gyroscope Required permissions: ohos.permission.GYROSCOPE
## 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 |
| ------------------------ | ------------ | ---------- | -------- | ----------- | ----------------- |
@@ -207,12 +207,12 @@ gyroscope 需要的权限:ohos.permission.GYROSCOPE
| setUpdateIntervalForType | setUpdateIntervalForType | function | no | ios/Android | yes |
| setLogLevelForType | setLogLevelForType | function | no | ios/Android | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/react-native-sensors/react-native-sensors/blob/master/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [The MIT License (MIT)](https://github.com/react-native-sensors/react-native-sensors/blob/master/LICENSE), Please enjoy and participate freely in open source.
\ No newline at end of file
diff --git a/en/redux-toolkit.md b/en/redux-toolkit.md
index 337da3dc73bb06ce1ce9ce3646ab9576cd29b9ee..ac96e828395d4e8811f60d9683fe5300f045fe05 100644
--- a/en/redux-toolkit.md
+++ b/en/redux-toolkit.md
@@ -1,5 +1,5 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
redux-toolkit
@@ -13,14 +13,13 @@
-> [!tip] [Github 地址](https://github.com/reduxjs/redux-toolkit)
+> [!tip] [Github address](https://github.com/reduxjs/redux-toolkit)
-## 安装与使用
+## Installation and Usage
-> [!tip] 该库依赖react-redux,可参考[react-redux文档](./react-redux.md)安装
+> [!tip] This library depends on react-redux,Can be referred to[react-redux documentation](./react-redux.md)install
-请到三方库的 Releases 发布地址查看配套的版本信息:[redux-toolkit Releases](https://github.com/reduxjs/redux-toolkit/releases),并下载适用版本的 tgz 包。
-进入到工程目录并输入以下命令:
+Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [redux-toolkit Releases](redux-toolkit Releases](https://github.com/reduxjs/redux-toolkit/releases).
@@ -38,9 +37,9 @@ yarn add @reduxjs/toolkit@2.2.1
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-1.在index.js入口文件引入provider组件,并添加sotre属性
+1.Introduce the provider component into the index.js entry file and add the sotre attribute
```js
// index.js
@@ -59,7 +58,7 @@ ReactDOM.render(
);
```
-2.创建一个createSlice切片,并将reducer属性导出:
+2.Create a created Slice slice and export the reducer attribute:
```js
// features/counter/counterSlice.js
@@ -95,7 +94,7 @@ export const { increment, decrement, incrementByAmount } = counterSlice.actions
export default counterSlice.reducer
```
-3.创建store.js使用configureStore引入上面导出的reducer
+3.Create store.js and use configurationStore to import the reducer exported above
```js
// app/store.js
@@ -113,7 +112,7 @@ export type RootState = ReturnType
export type AppDispatch = typeof store.dispatch
```
-4.编写conter组件实现简单的增加减少计数
+4.Write a conter component to implement simple counting increases and decreases
```js
// features/counter/Counter.js
@@ -148,21 +147,21 @@ export function Counter() {
}
```
-## 约束与限制
+## 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;
-## 方法和属性
+## Properties And Methods
-> [!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.
>
-> 详情见 [redux-toolkit 源库地址](https://github.com/reduxjs/redux-toolkit)
+> See details [redux-toolkit Source library address](https://github.com/reduxjs/redux-toolkit)
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ------------------------ | ------------------------------------------------- | -------- | -------- | -------- | ----------------- |
@@ -219,12 +218,12 @@ export function Counter() {
| nanoid | 生成随机字符串 | Function | yes | All | yes |
| miniSerializeError | 打印错误信息 | Function | yes | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/reduxjs/redux-toolkit?tab=readme-ov-file),请自由地享受和参与开源。
+This project is licensed under [The MIT License (MIT)](https://github.com/reduxjs/redux-toolkit?tab=readme-ov-file), Please enjoy and participate freely in open source.
\ No newline at end of file