diff --git a/en/jpush-react-native.md b/en/jpush-react-native.md
index 159f16b8e2cc43e356f1f18ab64c7ac3f6858f37..fad87bb54ae9417a25ead9013bf764e9ac3034e2 100644
--- a/en/jpush-react-native.md
+++ b/en/jpush-react-native.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
jpush-react-native
@@ -12,14 +12,14 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/jpush-react-native)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/jpush-react-native)
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/jpush-react-native Releases](https://github.com/react-native-oh-library/jpush-react-native/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -36,11 +36,11 @@ yarn add @react-native-oh-tpl/jpush-react-native
```
-另外还需按照[极光推送SDK-HarmonyOS集成指南](https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide)完成极光推送相关的配置
+Additionally, it is necessary to follow the [Aurora Push SDK HarmonyOS Integration Guide]( https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide )Complete the configuration related to Aurora Push
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import React from 'react';
@@ -48,7 +48,7 @@ import { Text, View, Button } from 'react-native';
import JPush from 'jpush-react-native';
function App() {
- let localNotification = { messageID: '1', title: 'add local notification', content: '测试添加一个本地通知', broadcastTime: new Date().getTime(), extras: { content: '附加内容' } };
+ let localNotification = { messageID: '1', title: 'add local notification', content: 'Test adding a local notification', broadcastTime: new Date().getTime(), extras: { content: 'Additional content' } };
return (
请先前往手机"设置"-->"通知和状态栏"打开测试应用的通知
+ }}>Please go to your phone's "Settings" ->"Notifications and Status Bar" to open the notification for the test application first
[!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
-方法一:通过 har 包引入(推荐)
-
-> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
-
-打开 `entry/oh-package.json5`,添加以下依赖
+Open `entry/oh-package.json5` file and add the following dependencies:
```json
@@ -122,23 +118,23 @@ export default App;
```
-点击右上角的 `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](/en/link-source-code.md).
-### 3. 在 ArkTs 侧引入 RNJPushPackage
+### 3. Introducing RNJPushPackage to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,由于引入的是ets文件,请将RNPackagesFactory.ts文件名后缀 ts 修改为 ets,添加:
+Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
+ import {RNJPushPackage} from "@react-native-oh-tpl/jpush-react-native/ts";
@@ -151,94 +147,94 @@ 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
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/jpush-react-native Releases](https://github.com/react-native-oh-library/jpush-react-native/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/jpush-react-native Releases](https://github.com/react-native-oh-library/jpush-react-native/releases)
-## 静态方法
+## Static 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.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| -------------------- | ------------------- | ------ | ------ | ---------- | ----------- |
-| setLoggerEnable(enable: boolean): void | 设置调试模式,默认关闭状态,RN侧调用不起作用,请按照[极光推送SDK-HarmonyOS集成指南](https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide)调用 | function | no | iOS,Android | yes |
-| init(params: {appKey: string;channel:string;production:string;}): void |初始化极光推送,RN侧调用不起作用,请按照[极光推送SDK-HarmonyOS集成指南](https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide)文档中集成调用 | function | yes | iOS,Android | yes |
-| getRegistrationID(callback: Callback<{ registerID: string }>): void | 调用此 API 来取得应用程序对应的 RegistrationID。 | function | no | iOS,Android | yes |
-| addTags(params: {"sequence":number,"tags":string[]}): void | 新增标签 |function | no | iOS,Android | yes |
-| updateTags(params: {"sequence":number,"tags":string[]}): void | 覆盖标签 | function | no | iOS,Android |yes |
-| deleteTag(params: {"sequence":number,"tags":string[]}): void | 删除指定标签 | function | no | iOS,Android |yes |
-| deleteTags(params: {"sequence":number}): void | 清除所有标签 | function | no | iOS,Android |yes |
-| queryTag(params:{"sequence":number,"tag":string}): void | 查询指定 tag 与当前用户绑定的状态 | function | no | iOS,Android |yes |
-| queryTags(params: {"sequence":number}): void | 查询所有标签 | function | no | iOS,Android |yes |
-| setAlias(params: {"sequence":number,"alias":string}): void | 设置别名 | function | no | iOS,Android |yes |
-| deleteAlias({"sequence":number}): void | 删除别名 | function | no | iOS,Android |yes |
-| queryAlias(params: {"sequence":number}): void | 查询别名 | function | no | iOS,Android |yes |
-| setProperties(params:{pros:any}):void; | 设置推送个性化属性/更新用户指定推送个性化属性 |function | no | iOS,Android | no |
-| deleteProperties(params:{pros:any}):void; | 删除指定推送个性化属性 |function | no | iOS,Android | no |
-| cleanProperties():void; | 清除所有推送个性化属性 |function | no | iOS,Android | no |
-| pageEnterTo(pageName: string): void | 进入页面 | function | no | iOS,Android |no |
-| pageLeave(pageName: string): void | 离开页面 | function | no | iOS,Android |no |
-| setMobileNumber(params: {"sequence":number,"mobileNumber":string}): void | 设置手机号码。该接口会控制调用频率,频率为 10s 之内最多 3 次 | function | no | iOS,Android |yes |
-| initCrashHandler(): void | 开启 CrashLog 上报 | function | no | iOS,Android |no |
-| setPowerSaveMode(enable: boolean):void | Push SDK 开启和关闭省电模式,默认为关闭 | function | no | Android |no |
-| isNotificationEnabled(callback: Callback): void | 检查当前应用的通知开关是否开启 | function | no | iOS,Android |yes |
-| addLocalNotification(params:{messageID: stringtitle: string;content: string;extras: Extra}): void | 添加一个本地通知 | function | no | iOS,Android |yes |
-| removeLocalNotification(params: { messageID: string }): void | 移除指定的本地通知 | function | no | iOS,Android |yes |
-| clearLocalNotifications(): void | 移除所有的本地通知 | function | no | iOS,Android |yes |
-| clearAllNotifications():void | 清除所有 JPush 展现的通知(不包括非 JPush SDK 展现的) | function | no | Android |no |
-| clearNotificationById(params: {notificationId:number}):void | 删除指定的通知 | function | no | iAndroid |no |
-| setMaxGeofenceNumber(params: {geoFenceMaxNumber:number}): void | 设置最多允许保存的地理围栏数量,超过最大限制后,如果继续创建先删除最早创建的地理围栏。 默认数量为10个,允许设置最小1个,最大100个。 | function | no | iOS,Android |no |
-| deleteGeofence(params: { geoFenceID: string }): void | 删除指定id的地理围栏 | function | no | iOS,Android |no |
-| addConnectEventListener(callback: Callback<{connectEnable: boolean }>): void | 监听连接状态 | function | no | iOS,Android |yes |
-| addCommandEventListener(callback: Callback<{ cmd:number, errorCode:number,msg:string,extra:Extra}>): void | CommandEvent 事件回调 | function | no | iOS,Android |yes |
-| addNotificationListener(callback: Callback <{messageID:string;title:string;content:string;extras:Extra;notificationEventType: "notificationArrived" "notificationOpened"}>):void | 远程通知事件 | function | no | iOS,Android |no |
-| addLocalNotificationListener(callback: Callback <{messageID:string;title:string;content:string;extras:Extra;notificationEventType: "notificationArrived" "notificationOpened"}> | 本地通知事件 | function | no | iOS,Android |yes |
-| addCustomMessageListener(callback: Callback<{messageID: string;content: string;extras: Extra;title:string}>):void | 自定义信息通知回调 | function | no | iOS,Android |yes |
-| addInappMessageListener(callback: Callback<{mesageId: string;title: string;content: string;target:string;clickAction: string;extras:Extra:inappEventType: "inappShow" "inappClick"}>):void| inapp消息事件 | function | no | iOS,Android |no |
-| addTagAliasListener(callback: Callback<{ code: number;tagEnable: boolean;Tags:string[];alias:string;sequence:number}>): void | tag alias事件 | function | no | iOS,Android |yes |
-| addMobileNumberListener(callback: Callback<{ code: number;sequence:number }>): void | 手机号码事件 | function | no | iOS,Android |yes |
-| removeListener(callback: Function): void | 移除事件 | function | no | iOS,Android |yes |
-| requestPermission(): void | 在 Android 6.0 及以上的系统上,需要去请求一些用到的权限 | function | no | Android |no |
-| stopPush(): void | 停止推送服务 | function | no | Android |yes |
-| resumePush(): void | 恢复推送服务 | function | no | iAndroid |yes |
-| isPushStopped(callback: Callback): void | 用来检查 Push Service 是否已经被停止 | function | no | Android |yes |
-| setPushTime(params: {pushTimeDays: number[];pushTimeStartHour: number;pushTimeEndHour: number;}):void | 设置允许推送时间 | function | no | Android |no |
-| setSilenceTime(params: {silenceTimeStartHour: number;silenceTimeStartMinute: number;silenceTimeEndHour: number; silenceTimeEndMinute: number;}): void | 设置保留最近通知条数 | function | no | Android |no |
-| setLatestNotificationNumber(params: {notificationMaxNumber: number;}): void | 设置保留最近通知条数 |function | no | Android | no |
-| setChannel(params: { channel: string }): void | 动态配置 channel,优先级比 AndroidManifest 里配置的高 |function | no | Android | no |
-| setBadge(params: {badge: number;appBadge: number;}):void | 设置 Badge |function | no | iOS,Android | yes |
-| setChannelAndSound(params: {channel:string;sound:string;channelId:string}):void | 设置通知渠道声音 |function | no | Android | no |
-| setLinkMergeEnable(enable:boolean):void | 是否开启通知合并 |function | no | Android | no |
-| setSmartPushEnable(enable:boolean):void | 是否开启智能推送 |function | no | iOS,Android | no |
-| setGeofenceEnable(enable:boolean):void | 是否开启地理围栏 |function | no |Android | no |
-| setCollectControl(enable:boolean):void | 是否开启集中控制 |function | no | iOS、Android | no |
-
-## 遗留问题
-- [ ] setProperties、deleteProperties、cleanProperties、pageEnterTo、pageLeave、initCrashHandler、setMaxGeofenceNumber、deleteGeofence、addNotificationListener、addInappMessageListener,setCollectControl、setSmartPushEnable这些方法在极光推送harmonyOS-SDK中暂未支持[issue#1](https://github.com/react-native-oh-library/jpush-react-native/issues/1)
-
-## 其他
-
-
-## 开源协议
-
-本项目基于 [The MIT License (MIT)](https://github.com/jpush/jpush-react-native/blob/master/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
+| setLoggerEnable(enable: boolean): void | To set the debug mode, which is disabled by default, and if the RN (React Native) side configuration does not work, please follow the [ JPush SDK-HarmonyOS Integration Guide](https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide)for proper setup. | function | no | iOS,Android | yes |
+| init(params: {appKey: string;channel:string;production:string;}): void |If the initialization of JPush on the RN (React Native) side is not working, please follow the integration instructions provided in the[JPush SDK-HarmonyOS Integration Guide](https://docs.jiguang.cn/jpush/client/HarmonyOS/hmos_guide)to properly set it up. | function | yes | iOS,Android | yes |
+| getRegistrationID(callback: Callback<{ registerID: string }>): void | Retrieve the RegistrationID corresponding to the application | function | no | iOS,Android | yes |
+| addTags(params: {"sequence":number,"tags":string[]}): void | Add a tag |function | no | iOS,Android | yes |
+| updateTags(params: {"sequence":number,"tags":string[]}): void | Overwrite tags | function | no | iOS,Android |yes |
+| deleteTag(params: {"sequence":number,"tags":string[]}): void | Delete a specified tag | function | no | iOS,Android |yes |
+| deleteTags(params: {"sequence":number}): void | Clear all tags | function | no | iOS,Android |yes |
+| queryTag(params:{"sequence":number,"tag":string}): void | Query the binding status of a specified tag with the current user | function | no | iOS,Android |yes |
+| queryTags(params: {"sequence":number}): void | Query all tags. | function | no | iOS,Android |yes |
+| setAlias(params: {"sequence":number,"alias":string}): void | Set an alias. | function | no | iOS,Android |yes |
+| deleteAlias({"sequence":number}): void | Delete an alias. | function | no | iOS,Android |yes |
+| queryAlias(params: {"sequence":number}): void | Query an alias. | function | no | iOS,Android |yes |
+| setProperties(params:{pros:any}):void; | Set personalized push attributes/update user-specified personalized push attributes. |function | no | iOS,Android | no |
+| deleteProperties(params:{pros:any}):void; | Delete specified personalized push attributes. |function | no | iOS,Android | no |
+| cleanProperties():void; | Clear all personalized push attributes. |function | no | iOS,Android | no |
+| pageEnterTo(pageName: string): void | Enter a page. | function | no | iOS,Android |no |
+| pageLeave(pageName: string): void | Leave a page. | function | no | iOS,Android |no |
+| setMobileNumber(params: {"sequence":number,"mobileNumber":string}): void | Set a phone number. This interface controls the call frequency, with a maximum of 3 calls within 10 seconds. | function | no | iOS,Android |yes |
+| initCrashHandler(): void | Enable CrashLog reporting. | function | no | iOS,Android |no |
+| setPowerSaveMode(enable: boolean):void | Enable or disable power-saving mode for the Push SDK (default: disabled). | function | no | Android |no |
+| isNotificationEnabled(callback: Callback): void | Check if the notification switch for the current application is enabled. | function | no | iOS,Android |yes |
+| addLocalNotification(params:{messageID: stringtitle: string;content: string;extras: Extra}): void | Add a local notification. | function | no | iOS,Android |yes |
+| removeLocalNotification(params: { messageID: string }): void | Remove a specified local notification. | function | no | iOS,Android |yes |
+| clearLocalNotifications(): void | Remove all local notifications. | function | no | iOS,Android |yes |
+| clearAllNotifications():void | Clear all JPush-displayed notifications (excluding those not displayed by the JPush SDK). | function | no | Android |no |
+| clearNotificationById(params: {notificationId:number}):void | Delete a specified notification. | function | no | iAndroid |no |
+| setMaxGeofenceNumber(params: {geoFenceMaxNumber:number}): void | Set the maximum number of allowed geofences. When exceeding this limit, the earliest created geofence will be deleted first if new ones are created. The default number is 10, with a minimum of 1 and a maximum of 100 allowed. | function | no | iOS,Android |no |
+| deleteGeofence(params: { geoFenceID: string }): void | Delete a geofence with a specified ID. | function | no | iOS,Android |no |
+| addConnectEventListener(callback: Callback<{connectEnable: boolean }>): void | Monitor connection status. | function | no | iOS,Android |yes |
+| addCommandEventListener(callback: Callback<{ cmd:number, errorCode:number,msg:string,extra:Extra}>): void | CommandEvent callback. | function | no | iOS,Android |yes |
+| addNotificationListener(callback: Callback <{messageID:string;title:string;content:string;extras:Extra;notificationEventType: "notificationArrived" "notificationOpened"}>):void | Remote notification event. | function | no | iOS,Android |no |
+| addLocalNotificationListener(callback: Callback <{messageID:string;title:string;content:string;extras:Extra;notificationEventType: "notificationArrived" "notificationOpened"}> | Local notification event. | function | no | iOS,Android |yes |
+| addCustomMessageListener(callback: Callback<{messageID: string;content: string;extras: Extra;title:string}>):void | Custom message notification callback. | function | no | iOS,Android |yes |
+| addInappMessageListener(callback: Callback<{mesageId: string;title: string;content: string;target:string;clickAction: string;extras:Extra:inappEventType: "inappShow" "inappClick"}>):void| In-app message event. | function | no | iOS,Android |no |
+| addTagAliasListener(callback: Callback<{ code: number;tagEnable: boolean;Tags:string[];alias:string;sequence:number}>): void | Tag/alias event. | function | no | iOS,Android |yes |
+| addMobileNumberListener(callback: Callback<{ code: number;sequence:number }>): void | Phone number event. | function | no | iOS,Android |yes |
+| removeListener(callback: Function): void | Remove event listeners. | function | no | iOS,Android |yes |
+| requestPermission(): void | Certain permissions need to be requested on systems running Android 6.0 and above. | function | no | Android |no |
+| stopPush(): void | Stop the push service. | function | no | Android |yes |
+| resumePush(): void | Resume the push service. | function | no | iAndroid |yes |
+| isPushStopped(callback: Callback): void | Check if the Push Service has been stopped. | function | no | Android |yes |
+| setPushTime(params: {pushTimeDays: number[];pushTimeStartHour: number;pushTimeEndHour: number;}):void | Set allowed push times. | function | no | Android |no |
+| setSilenceTime(params: {silenceTimeStartHour: number;silenceTimeStartMinute: number;silenceTimeEndHour: number; silenceTimeEndMinute: number;}): void | Set the number of recently retained notifications (duplicate setting mentioned). | function | no | Android |no |
+| setLatestNotificationNumber(params: {notificationMaxNumber: number;}): void | Set the number of recently retained notifications (duplicate setting mentioned). |function | no | Android | no |
+| setChannel(params: { channel: string }): void | Dynamically configure channels with higher priority than those configured in the AndroidManifest. |function | no | Android | no |
+| setBadge(params: {badge: number;appBadge: number;}):void | Set the Badge. |function | no | iOS,Android | yes |
+| setChannelAndSound(params: {channel:string;sound:string;channelId:string}):void | Set notification channel sounds. |function | no | Android | no |
+| setLinkMergeEnable(enable:boolean):void | Enable or disable notification bundling. |function | no | Android | no |
+| setSmartPushEnable(enable:boolean):void | Enable or disable intelligent push. |function | no | iOS,Android | no |
+| setGeofenceEnable(enable:boolean):void | Enable or disable geofencing. |function | no |Android | no |
+| setCollectControl(enable:boolean):void | Enable or disable centralized control. |function | no | iOS、Android | no |
+
+## Known Issues
+- [ ] setProperties、deleteProperties、cleanProperties、pageEnterTo、pageLeave、initCrashHandler、setMaxGeofenceNumber、deleteGeofence、addNotificationListener、addInappMessageListener,setCollectControl、setSmartPushEnable These methods are currently not supported in the Aurora Push HarmonyOS SDK[issue#1](https://github.com/react-native-oh-library/jpush-react-native/issues/1)
+
+## Others
+
+
+## License
+
+This project is licensed under [The MIT License (MIT)](https://github.com/jpush/jpush-react-native/blob/master/LICENSE).
\ No newline at end of file
diff --git a/en/mixpanel-react-native.md b/en/mixpanel-react-native.md
index 733cb0e511d38122f327edd32778631e19629942..179d53c69fb8f76a77b7e442fb923811a16f961a 100644
--- a/en/mixpanel-react-native.md
+++ b/en/mixpanel-react-native.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
mixpanel-react-native
@@ -12,13 +12,13 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/mixpanel-react-native)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/mixpanel-react-native)
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/mixpanel-react-native Releases](https://github.com/react-native-oh-library/mixpanel-react-native/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -37,10 +37,10 @@ yarn add @react-native-oh-tpl/mixpanel-react-native
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
-> [!WARNING] 代码使用的 token值 需要在[ mixpanel 官网](https://mixpanel.com)上的项目设置中获取,事件发送后需要在[ mixpanel 官网](https://mixpanel.com)的项目分析中查看相应的数据
+> [!WARNING] The name of the imported repository remains unchanged.
+> [!WARNING] The token value used in the code needs to be obtained from the project settings on the[ Mixpanel website](https://mixpanel.com),After an event is sent, you can view the corresponding data in the project analytics on the[ Mixpanel website](https://mixpanel.com)
```js
import React from 'react';
@@ -64,17 +64,17 @@ export default function MixpanelDemo() {
}
```
-## 使用 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](/en/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
{
@@ -85,18 +85,15 @@ export default function MixpanelDemo() {
}
```
-### 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": {
@@ -105,22 +102,22 @@ export default function MixpanelDemo() {
}
```
-点击右上角的 `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](/en/link-source-code.md).
-### 3.在 ArkTs 侧引入 MixpanelPackage
+### 3. Introducing MixpanelPackage to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
@@ -134,105 +131,105 @@ 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
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/mixpanel-react-native Releases](https://github.com/react-native-oh-library/mixpanel-react-native/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/mixpanel-react-native Releases](https://github.com/react-native-oh-library/mixpanel-react-native/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.
#### Mixpanel
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- |----------| -------- |-------------------|
-| init(): void; | 初始化Mixpanel实例 | function | yes | iOS,Android | yes |
-| setServerURL(serverURL: string): void; | 设置Mixpanel API请求使用的基本URL | function | no | iOS,Android | yes |
-| setLoggingEnabled(loggingEnabled: boolean): void; | 是否开启日志记录 | function | no | iOS,Android | yes |
-| setFlushOnBackground(flushOnBackground: boolean): void; | 当应用程序在iOS上进入后台时,允许启用或禁用Mixpanel是否刷新事件 | function | no | iOS | no |
-| setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void; | 是否发送ip作为地理定位的依据 | function | no | iOS,Android | yes |
-| setFlushBatchSize(flushBatchSize: number): void; | 设置单个网络请求发送到mixpanel的事件数量 | function | no | iOS,Android | yes |
-| hasOptedOutTracking(): Promise; | 获取用户是否选择退出追踪 | function | no | iOS,Android | yes |
-| optInTracking(): void; | 用户已选择跟踪 | function | no | iOS,Android | yes |
-| optOutTracking(): void; | 用户已选择退出跟踪 | function | no | iOS,Android | yes |
-| identify(distinctId: string): Promise; | 将来的track调用都由以下的用户标识关联 | function | no | iOS,Android | yes |
-| alias(alias: string, distinctId: string): void; | 创建一个映射,将新的标识与用户的原始distinct_id关联起来 | function | no | iOS,Android | yes |
-| track(eventName: string, properties?: MixpanelProperties): void; | 发送事件 | function | yes | iOS,Android | yes |
-| getPeople(): People; | 获取People实例 | function | no | iOS,Android | yes |
-| trackWithGroups(eventName: string, properties?: MixpanelProperties, groups?: MixpanelProperties): void; | 追踪特定群体事件 | function | no | iOS,Android | no |
-| setGroup(groupKey: string, groupID: MixpanelType): void; | 设置用户所属的组 | function | no | iOS,Android | no |
-| getGroup(groupKey: string, groupID: MixpanelType): MixpanelGroup; | 获取Group实例 | function | no | iOS,Android | yes |
-| addGroup(groupKey: string, groupID: MixpanelType): void; | 添加组 | function | no | iOS,Android | no |
-| removeGroup(groupKey: string, groupID: MixpanelType): void; | 移除组 | function | no | iOS,Android | no |
-| deleteGroup(groupKey: string, groupID: MixpanelType): void; | 删除组 | function | no | iOS,Android | no |
-| registerSuperProperties(properties: MixpanelProperties): void; | 注册全局属性,这些属性通用于所有用户 | function | no | iOS,Android | yes |
-| registerSuperPropertiesOnce(properties: MixpanelProperties): void; | 注册全局属性,这些属性通用于所有用户,但不会覆盖已有的属性 | function | no | iOS,Android | yes |
-| unregisterSuperProperty(propertyName: string): void; | 删除指定的注册的全局属性 | function | no | iOS,Android | yes |
-| getSuperProperties(): Promise; | 获取注册的全局属性 | function | no | iOS,Android | yes |
-| clearSuperProperties(): void; | 删除所有注册的全局属性 | function | no | iOS,Android | yes |
-| timeEvent(eventName: string): void; | 发送计时事件 | function | no | iOS,Android | yes |
-| eventElapsedTime(eventName: string): Promise; | 获取指定事件的当前计时 | function | no | iOS,Android | yes |
-| reset(): void; | 重置用户的相关信息 | function | no | iOS,Android | yes |
-| getDistinctId(): Promise; | 获取唯一标识 | function | no | iOS,Android | yes |
-| getDeviceId(): Promise; | 获取设备标识 | function | no | iOS,Android | yes |
-| flush(): void; | 推送所有事件及用户信息到服务器 | function | no | iOS,Android | yes |
+| init(): void; | Initialize a Mixpanel instance. | function | yes | iOS,Android | yes |
+| setServerURL(serverURL: string): void; | Set the base URL for Mixpanel API requests. | function | no | iOS,Android | yes |
+| setLoggingEnabled(loggingEnabled: boolean): void; | Enable or disable logging. | function | no | iOS,Android | yes |
+| setFlushOnBackground(flushOnBackground: boolean): void; | On iOS, allow or disable Mixpanel from flushing events when the app enters the background. | function | no | iOS | no |
+| setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void; | Enable or disable sending the IP address as a basis for geolocation. | function | no | iOS,Android | yes |
+| setFlushBatchSize(flushBatchSize: number): void; | Set the number of events to send in a single network request to Mixpanel. | function | no | iOS,Android | yes |
+| hasOptedOutTracking(): Promise; | Check if a user has opted out of tracking. | function | no | iOS,Android | yes |
+| optInTracking(): void; | User has opted to be tracked. | function | no | iOS,Android | yes |
+| optOutTracking(): void; | User has opted out of tracking. | function | no | iOS,Android | yes |
+| identify(distinctId: string): Promise; | Associate future track calls with the following user identifier. | function | no | iOS,Android | yes |
+| alias(alias: string, distinctId: string): void; | Create a mapping to associate a new identifier with the user's original distinct_id. | function | no | iOS,Android | yes |
+| track(eventName: string, properties?: MixpanelProperties): void; | Send an event. | function | yes | iOS,Android | yes |
+| getPeople(): People; | Obtain a People instance. | function | no | iOS,Android | yes |
+| trackWithGroups(eventName: string, properties?: MixpanelProperties, groups?: MixpanelProperties): void; | Track events specific to a group of people. | function | no | iOS,Android | no |
+| setGroup(groupKey: string, groupID: MixpanelType): void; | Set the group that a user belongs to. | function | no | iOS,Android | no |
+| getGroup(groupKey: string, groupID: MixpanelType): MixpanelGroup; | Obtain a Group instance. | function | no | iOS,Android | yes |
+| addGroup(groupKey: string, groupID: MixpanelType): void; | Add a group. | function | no | iOS,Android | no |
+| removeGroup(groupKey: string, groupID: MixpanelType): void; | Remove a group. | function | no | iOS,Android | no |
+| deleteGroup(groupKey: string, groupID: MixpanelType): void; | Delete a group. | function | no | iOS,Android | no |
+| registerSuperProperties(properties: MixpanelProperties): void; | Register global properties that are common to all users.| function | no | iOS,Android | yes |
+| registerSuperPropertiesOnce(properties: MixpanelProperties): void; | Register global properties that are common to all users without overwriting existing properties.| function | no | iOS,Android | yes |
+| unregisterSuperProperty(propertyName: string): void; | Delete a specified registered global property. | function | no | iOS,Android | yes |
+| getSuperProperties(): Promise; | Retrieve registered global properties. | function | no | iOS,Android | yes |
+| clearSuperProperties(): void; | Delete all registered global properties. | function | no | iOS,Android | yes |
+| timeEvent(eventName: string): void; | Send a timing event. | function | no | iOS,Android | yes |
+| eventElapsedTime(eventName: string): Promise; | Get the current timing for a specified event. | function | no | iOS,Android | yes |
+| reset(): void; | Reset a user's related information. | function | no | iOS,Android | yes |
+| getDistinctId(): Promise; | Get the unique identifier. | function | no | iOS,Android | yes |
+| getDeviceId(): Promise; | Get the device identifier. | function | no | iOS,Android | yes |
+| flush(): void; | Push all events and user information to the server. | function | no | iOS,Android | yes |
#### People
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
-| set(prop: string, to: MixpanelType): void; | 设置用户的属性 | function | no | iOS,Android | yes |
-| set(properties: MixpanelProperties): void; | 设置用户的属性 | function | no | iOS,Android | yes |
-| setOnce(prop: string, to: MixpanelType): void; | 设置用户的属性,但不会覆盖已有的属性 | function | no | iOS,Android | yes |
-| setOnce(properties: MixpanelProperties): void; | 设置用户的属性,但不会覆盖已有的属性 | function | no | iOS,Android | yes |
-| increment(prop: string, by: number): void; | 增加用户的某个数值属性的值,通常用于计数或累计某个行为的发生次数。 | function | no | iOS,Android | yes |
-| increment(properties: MixpanelProperties): void; | 增加用户的某个数值属性的值,通常用于计数或累计某个行为的发生次数。 | function | no | iOS,Android | yes |
-| append(name: string, value: MixpanelType): void; | 添加用户的某个属性的值,将值追加到用户属性中 | function | no | iOS,Android | yes |
-| union(name: string, value: Array): void; | 添加用户的某个属性的值,如果属性已经存在值,则新添加的数据会与现有值合并 | function | no | iOS,Android | yes |
-| remove(name: string, value: MixpanelType): void; | 删除用户的某个属性的指定值 | function | no | iOS,Android | yes |
-| unset(name: string): void; | 删除用户的某个属性及属性的值 | function | no | iOS,Android | yes |
-| trackCharge(charge: number, properties: MixpanelProperties): void; | 追踪用户的交易 | function | no | iOS,Android | yes |
-| clearCharges(): void; | 永久清除用户的历史交易记录 | function | no | iOS,Android | yes |
-| deleteUser(): void; | 从人员分析中永久删除用户 | function | no | iOS,Android | yes |
+| set(prop: string, to: MixpanelType): void; | Set a user's property. | function | no | iOS,Android | yes |
+| set(properties: MixpanelProperties): void; | Set a user's property. | function | no | iOS,Android | yes |
+| setOnce(prop: string, to: MixpanelType): void; | Set a user's property without overwriting an existing value.| function | no | iOS,Android | yes |
+| setOnce(properties: MixpanelProperties): void; | Set a user's property without overwriting an existing value.| function | no | iOS,Android | yes |
+| increment(prop: string, by: number): void; | Increment the value of a numerical user property, typically used for counting or accumulating occurrences of a behavior. | function | no | iOS,Android | yes |
+| increment(properties: MixpanelProperties): void; | Increment the value of a numerical user property, typically used for counting or accumulating occurrences of a behavior. | function | no | iOS,Android | yes |
+| append(name: string, value: MixpanelType): void; | Add a value to a user's property, appending it to the existing value if the property already exists. | function | no | iOS,Android | yes |
+| union(name: string, value: Array): void; | Add a value to a user's property, merging the newly added data with the existing value if the property already has a value. | function | no | iOS,Android | yes |
+| remove(name: string, value: MixpanelType): void; | Remove a specified value from a user's property. | function | no | iOS,Android | yes |
+| unset(name: string): void; | Delete a user's property and its value. | function | no | iOS,Android | yes |
+| trackCharge(charge: number, properties: MixpanelProperties): void; | Track a user's transaction. | function | no | iOS,Android | yes |
+| clearCharges(): void; | Permanently clear a user's historical transaction records. | function | no | iOS,Android | yes |
+| deleteUser(): void; | Permanently delete a user from People analytics. | function | no | iOS,Android | yes |
#### MixpanelGroup
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
-| set(prop: string, to: MixpanelType): void; | 设置组的属性 | function | no | iOS,Android | no |
-| setOnce(prop: string, to: MixpanelType): void; | 设置组的属性,但不会覆盖已有的属性 | function | no | iOS,Android | no |
-| unset(prop: string): void; | 删除组的属性 | function | no | iOS,Android | no |
-| remove(name: string, value: MixpanelType): void; | 删除组的属性的值,删除指定值 | function | no | iOS,Android | no |
-| union(name: string, value: MixpanelType): void; | 添加组的属性的值,将值合并到组属性中 | function | no | iOS,Android | no |
+| set(prop: string, to: MixpanelType): void; | Set a group's property. | function | no | iOS,Android | no |
+| setOnce(prop: string, to: MixpanelType): void; | Set a group's property without overwriting an existing value. | function | no | iOS,Android | no |
+| unset(prop: string): void; | Delete a group's property. | function | no | iOS,Android | no |
+| remove(name: string, value: MixpanelType): void; | Remove a specified value from a group's property. | function | no | iOS,Android | no |
+| union(name: string, value: MixpanelType): void; | Add a value to a group's property, merging the newly added data with the existing value | function | no | iOS,Android | no |
-## 遗留问题
-- [ ] 部分接口暂未开发:[issue#5](https://github.com/react-native-oh-library/mixpanel-react-native/issues/5)
+## Known Issues
+- [ ] Some interfaces have not been developed yet: [issue#5](https://github.com/react-native-oh-library/mixpanel-react-native/issues/5)
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [Apache License2.0](https://github.com/mixpanel/mixpanel-react-native/blob/master/LICENSE.md) ,请自由地享受和参与开源。
+This project is licensed under [Apache License2.0](https://github.com/mixpanel/mixpanel-react-native/blob/master/LICENSE.md).
diff --git a/en/op-engineering-op-sqlite.md b/en/op-engineering-op-sqlite.md
index bb32a36be23623b57cb2f39f6ac87d901eb6f832..a72d1227cf337256515b2dda96e5c8fd8fb296dd 100644
--- a/en/op-engineering-op-sqlite.md
+++ b/en/op-engineering-op-sqlite.md
@@ -142,7 +142,7 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md).
-### 3. Configuring CMakeLists and Introducing xxx Package
+### 3. Configuring CMakeLists and Introducing RNOpSqlitePackage
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
@@ -293,9 +293,9 @@ Open the `YourProject/entry/src/main/module.json5` file and add the following co
## Static Methods
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
@@ -310,9 +310,9 @@ Open the `YourProject/entry/src/main/module.json5` file and add the following co
### DB
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
diff --git a/en/react-countdown-circle-timer.md b/en/react-countdown-circle-timer.md
index ee46d1157f8c21e06f63bde795968ac466c9216b..a4cffbc99ed9a7be0e830182b7c3b37ab0208eee 100644
--- a/en/react-countdown-circle-timer.md
+++ b/en/react-countdown-circle-timer.md
@@ -1,3 +1,5 @@
+> Template version: v0.2.2
+
react-countdown-circle-timer
@@ -124,8 +126,6 @@ This document is verified based on the following versions:
## Others
-- When the countdown of this library is complete, the overlap effect is displayed. When the strokeWidth and strokeLinecap='square' attributes are set, which is consistent with the iOS。
-
## License
This project is licensed under [The MIT License (MIT)](https://github.com/vydimitrov/react-countdown-circle-timer/blob/master/LICENSE).
diff --git a/en/react-native-blurhash.md b/en/react-native-blurhash.md
index df28cbdcc85b1381a00f7ca8e14ff899825393ca..a66fe77d65d678e013d2b95f9643e5bc1b6bd901 100644
--- a/en/react-native-blurhash.md
+++ b/en/react-native-blurhash.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-blurhash
@@ -15,15 +15,15 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-blurhash)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-blurhash)
-## 安装与使用
+## Installation and Usage
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-blurhash Releases](https://github.com/react-native-oh-library/react-native-blurhash/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-blurhash Releases](https://github.com/react-native-oh-library/react-native-blurhash/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-blurhash@file:#
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```jsx
import React, { useCallback, useMemo, useState } from 'react';
@@ -255,11 +255,11 @@ export default BlurhashDemo
## 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
{
@@ -270,18 +270,17 @@ export default BlurhashDemo
}
```
-### 2.引入原生端代码
+### 2.Introducing Native Code
-目前有两种方法:
+Currently, two methods are available:
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
+
-方法一:通过 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": {
@@ -290,22 +289,22 @@ export default BlurhashDemo
}
```
-点击右上角的 `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](/en/link-source-code.md).
-### 3.配置 CMakeLists 和引入 BlurhashPackage
+### 3. Configuring CMakeLists and Introducing BlurhashPackage
-打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
+Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
```diff
project(rnapp)
@@ -344,7 +343,7 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package)
```
-打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
+Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
```diff
#include "RNOH/PackageProvider.h"
@@ -363,9 +362,9 @@ std::vector> PackageProvider::getPackages(Package::Cont
}
```
-### 4.在 ArkTs 侧引入 BlurhashPackage
+### 4. Introducing BlurhashPackage to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
+ import {BlurhashPackage} from '@react-native-oh-tpl/react-native-blurhash/ts';
@@ -379,32 +378,32 @@ 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
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-blurhash Releases](https://github.com/react-native-oh-library/react-native-blurhash/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-blurhash Releases](https://github.com/react-native-oh-library/react-native-blurhash/releases)
-## 属性
+## 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 |
| ------------------------------------------ | ------------------------------------------------------------ | --------- | -------- | -------- | ----------------- |
@@ -422,9 +421,9 @@ ohpm install
## 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 |
| ------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- | -------- | ----------------- |
@@ -433,10 +432,10 @@ ohpm install
| getAverageColor) | Gets the average color in a given blurhash string. | (blurhash: string)=> RGB \|undefined; | no | All | yes |
| isBlurhashValid() | Verifies if the given blurhash is valid by checking it's type, length and size flag. | (blurhash: string)=> ReturnType\; | no | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/mrousavy/react-native-blurhash/blob/master/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
+This project is licensed under [The MIT License (MIT)](https://github.com/mrousavy/react-native-blurhash/blob/master/LICENSE).
\ No newline at end of file
diff --git a/en/react-native-community-hooks.md b/en/react-native-community-hooks.md
index e250b201fd0e501ca1e37124caf0407e0171bdd8..f6c3f88b45980f97c795585ee4eb08ddf6975ca6 100644
--- a/en/react-native-community-hooks.md
+++ b/en/react-native-community-hooks.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-community-hooks
@@ -12,11 +12,11 @@
-> [!TIP] [Github 地址](https://github.com/react-native-community/hooks)
+> [!TIP] [GitHub address](https://github.com/react-native-community/hooks)
-## 安装与使用
+## Installation and Usage
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -34,9 +34,9 @@ yarn add @react-native-community/hooks@3.0.0
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
->[!WARNING] 使用时 import 的库名不变。
+>[!WARNING] The name of the imported repository remains unchanged.
```jsx
@@ -52,9 +52,9 @@ import {
import { useAppState, useLayout, useKeyboard, useDeviceOrientation, useRefresh, useInteractionManager } from '@react-native-community/hooks'
export const HooksUnTester = () => {
const [backText, setBackText] = useState('')
- const [refreshText, setRefreshText] = useState('下拉刷新')
+ const [refreshText, setRefreshText] = useState('Pull down refresh')
const fetch = () => {
- return new Promise((resolve) => setTimeout(() => { resolve(setRefreshText('刷新成功')) }, 500))
+ return new Promise((resolve) => setTimeout(() => { resolve(setRefreshText('Refresh successful')) }, 500))
}
const { isRefreshing, onRefresh } = useRefresh(fetch);
return (
@@ -76,7 +76,7 @@ export const HooksUnTester = () => {
useDeviceOrientation
- 判断是横屏(landscape)还是纵屏(portrait):{useDeviceOrientation()}
+ Determine whether it is landscape or portrait:{useDeviceOrientation()}
@@ -122,20 +122,20 @@ const styles = StyleSheet.create({
```
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-本文档内容基于以下版本验证通过:
+This document is verified based on the following versions:
1.RNOH: 0.72.27; SDK:HarmonyOS-Next-DB1 5.0.0.25; IDE:DevEco Studio 5.0.3.400SP7; ROM:3.0.0.25;
2.RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71;
## 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 |
@@ -155,15 +155,15 @@ useAccessibilityInfo 方法返回值
|----------------|-------------------------------| -------- | ----------------- |
| isBoldTextEnabled | whether bold text is enabled | iOS | Yes |
| isScreenReaderEnabled | Whether the Screen Reading Function Is Enabled | Android / iOS | Yes |
-| isGrayscaleEnabled | Whether grayscale mode is enabled | iOS | No |
-| isInvertColorsEnabled | Whether color inversion is enabled | iOS | No |
-| isReduceMotionEnabled | Whether reduction animation is enabled | Android / iOS | No |
-| isReduceTransparencyEnabled | Whether reduce transparency is enabled | iOS | No |
+| isGrayscaleEnabled | Whether grayscale mode is enabled | iOS | Yes |
+| isInvertColorsEnabled | Whether color inversion is enabled | iOS | Yes |
+| isReduceMotionEnabled | Whether reduction animation is enabled | Android / iOS | Yes |
+| isReduceTransparencyEnabled | Whether reduce transparency is enabled | iOS | Yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The ISC License (ISC)](https://github.com/react-native-community/hooks/blob/main/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [The ISC License (ISC)](https://github.com/react-native-community/hooks/blob/main/LICENSE).
diff --git a/en/react-native-copilot.md b/en/react-native-copilot.md
index c472582a0893e20c0903c1235f91b2fe5926355a..d4644b62b278ccbfdd1e635dd5e3f524a70283bc 100644
--- a/en/react-native-copilot.md
+++ b/en/react-native-copilot.md
@@ -249,36 +249,38 @@ For details, see [react-native-copilot](https://github.com/mohebifar/react-nativ
### CopilotProps
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------------------- | ----------------------------- | ----------------------------------------------------------------------- | -------- | ----------- | ----------------- |
-| easing | The animation display will be smoother | ((value: number) => number) \| undefined | no | Android/iOS | yes |
-| overlay | Use SVG or View to execute animations | "svg" \| "view" | no | Android/iOS | yes |
-| animationDuration | Animation execution time | number | no | Android/iOS | yes |
-| tooltipComponent | 可自定义 tooltip 组件 | React.ComponentType\ | no | Android/iOS | yes |
-| tooltipStyle | Customizable tooltip components | ViewStyle | no | Android/iOS | yes |
-| stepNumberComponent | Customizable step component | React.ComponentType\ | no | Android/iOS | yes |
-| animated | Do you want to enable animation | boolean | no | Android/iOS | yes |
-| labels | Text of step button | Partial\\> | no | Android/iOS | yes |
-| androidStatusBarVisible | Show or hide the StatusBar | boolean | no | Android | no |
-| svgMaskPath | Custom Modal Box | Function | no | Android/iOS | yes |
-| verticalOffset | The offset of the modal box distance element | number | no | Android/iOS | yes |
-| arrowColor | The color of the arrow | string | no | Android/iOS | yes |
-| arrowSize | The position of the arrow | number | no | Android/iOS | yes |
-| margin | The distance between two modal boxes | number | no | Android/iOS | yes |
-| stopOnOutsideClick | Call stop when clicking on the mask | boolean | no | Android/iOS | yes |
-| backdropColor | The color of the external background | string | no | Android/iOS | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ----------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------- | -------- | ----------- | ----------------- |
+| easing | The animation display will be smoother | ((value: number) => number) \| undefined | no | Android/iOS | yes |
+| overlay | Use SVG or View to execute animations | "svg" \| "view" | no | Android/iOS | yes |
+| animationDuration | Animation execution time | number | no | Android/iOS | yes |
+| tooltipComponent | Customizable tooltip components |
+| React.ComponentType\ | no | Android/iOS | yes |
+| tooltipStyle | Customizable tooltip components | ViewStyle | no | Android/iOS | yes |
+| stepNumberComponent | Customizable step component | React.ComponentType\ | no | Android/iOS | yes |
+| animated | Do you want to enable animation | boolean | no | Android/iOS | yes |
+| labels | Text of step button | Partial\\> | no | Android/iOS | yes |
+| androidStatusBarVisible | Show or hide the StatusBar | boolean | no | Android | no |
+| svgMaskPath | Custom Modal Box | Function | no | Android/iOS | yes |
+| verticalOffset | The offset of the modal box distance element | number | no | Android/iOS | yes |
+| arrowColor | The color of the arrow | string | no | Android/iOS | yes |
+| arrowSize | The position of the arrow | number | no | Android/iOS | yes |
+| margin | The distance between two modal boxes | number | no | Android/iOS | yes |
+| stopOnOutsideClick | Call stop when clicking on the mask | boolean | no | Android/iOS | yes |
+| backdropColor | The color of the external background | string | no | Android/iOS | yes |
### TooltipProps
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ------------ | -------------- | ----------------------------------------------------------------------- | -------- | ----------- | ----------------- |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | ------------------- | ----------------------------------------------------------------------- | -------- | ----------- | ----------------- |
| TooltipProps | Text of step button | Partial\\> | no | Android/iOS | yes |
## Known Issues
-- [ ] "overlay" property effect is not obvious [issue#1](https://github.com/mohebifar/react-native-copilot/issues/333)
+- [ ] "overlay" property effect is not obvious [issue#1](https://github.com/mohebifar/react-native-copilot/issues/333)
## Others
+
- The androidStatusBarVisible property is invalid on HarmonyOS. This property is used to calculate the position of the modal box even after hiding the Status Bar on Android. However, when HarmonyOS hides the Status Bar, its height is 0, so this property is invalid on HarmonyOS.
## License
diff --git a/en/react-native-country-picker-modal.md b/en/react-native-country-picker-modal.md
index fcde8753155399a2f12bd47871ee1ae330c405aa..b4b8e4102c810eb1e3cb1eb4cfdc8d0ddb60029f 100644
--- a/en/react-native-country-picker-modal.md
+++ b/en/react-native-country-picker-modal.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-country-picker-modal
@@ -12,15 +12,13 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-country-picker-modal)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-country-picker-modal)
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-library/react-native-country-picker-modal Releases](https://github.com/react-native-oh-library/react-native-country-picker-modal/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
-
-
+Go to the project directory and execute the following instruction:
@@ -38,9 +36,9 @@ yarn add @react-native-oh-tpl/react-native-country-picker-modal
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```jsx
import React, {useState} from 'react';
@@ -253,21 +251,21 @@ export function CountryPickerTest() {
```
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-本文档内容基于以下版本验证通过:
+This document is verified based on the following versions:
1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25;
+## Properties
-## 属性
-详细请查看 [react-native-country-picker-modal的文档介绍](https://github.com/xcarpentier/react-native-country-picker-modal)
+For details, see [react-native-country-picker-modal](https://github.com/xcarpentier/react-native-country-picker-modal)
-> [!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 |
| ------------------ | ----------------------------------------------- | --------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
@@ -306,12 +304,12 @@ export function CountryPickerTest() {
| preferredCountries | preferredCountries | [CountryCode](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/src/types.ts#L254) preferred countries they appear first (`withAlphaFilter` must be false) | No | All | Yes |
-## 遗留问题
+## Known Issues
-- [ ] 搜索条件没有按照translation属性进行过滤 [issue#534](https://github.com/xcarpentier/react-native-country-picker-modal/issues/534)
+- [ ] The search criteria were not filtered according to the translation attribute [issue#534](https://github.com/xcarpentier/react-native-country-picker-modal/issues/534)
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/LICENSE.md) ,请自由地享受和参与开源。
+This project is licensed under [The MIT License (MIT)](https://github.com/xcarpentier/react-native-country-picker-modal/blob/master/LICENSE.md).
diff --git a/en/react-native-easy-toast.md b/en/react-native-easy-toast.md
index f781e326c60bb07078b5950b9950a1719a2e79c8..ee6424948746db0fae3018d8417d446c71c92c92 100644
--- a/en/react-native-easy-toast.md
+++ b/en/react-native-easy-toast.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.0
+> Template version: v0.2.0
react-native-easy-toast
@@ -7,18 +7,18 @@
-
+
-> [!TIP] [Github 地址](https://github.com/crazycodeboy/react-native-easy-toast)
+> [!TIP] [GitHub address](https://github.com/crazycodeboy/react-native-easy-toast)
-## 安装与使用
+## Installation and Usage
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -36,7 +36,7 @@ yarn add react-native-easy-toast@2.3.0
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
```js
import React, { Component } from "react";
@@ -64,25 +64,25 @@ export default class App extends Component {
```
-更多使用场景可查看 [react-native-easy-toast 源库地址](https://github.com/crazycodeboy/react-native-easy-toast)
+More usage scenarios can be viewed [react-native-easy-toast](https://github.com/crazycodeboy/react-native-easy-toast)
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-在下述版本验证通过:
+This document is verified based on the following versions:
1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2(B.0.73); IDE:DevEco Studio 5.0.3.200; ROM:2.0.0.58;
2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71;
-## 属性
+## 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.
>
-> 详情见 [react-native-easy-toast 源库地址](https://github.com/crazycodeboy/react-native-easy-toast)
+> For details, see [react-native-easy-toast](https://github.com/crazycodeboy/react-native-easy-toast)
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
@@ -94,21 +94,21 @@ export default class App extends Component {
| opacity | Custom toast opacity | React.PropTypes.number | no | All | yes |
| textStyle | Custom style text | View.propTypes.style | no | All | yes |
-## 静态方法
+## Static 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.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
| show | show a toast,unit is millisecond,and do callback | (text: string, duration: number, callback: function, onPress: function) | no | All | yes |
| close | start the close timer | - | no | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [MIT Licensed](https://github.com/crazycodeboy/react-native-easy-toast/blob/master/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [MIT Licensed](https://github.com/crazycodeboy/react-native-easy-toast/blob/master/LICENSE).
diff --git a/en/react-native-graph.md b/en/react-native-graph.md
index 840951adca665cbc2e433c0cfc5b323e2f94a91c..cd61f5cf12a87fe1589ecfd45524fc59f36bd102 100644
--- a/en/react-native-graph.md
+++ b/en/react-native-graph.md
@@ -154,11 +154,11 @@ This document is verified based on the following versions:
## Known Issues
-- [ ] 依赖手势库的三方库,单击图表后会出现手势指示点出现 BUG 的情况,会页面卡住无法点击组件中按钮再次点击回归正常,需要等待手势库更新后正常 [issues#38](https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/issues/38)
+- [ ] A third-party library that relies on gesture libraries may encounter bugs in gesture indicator points when clicking on charts, causing the page to freeze and making it impossible to click on the buttons in the component. Clicking again will return to normal, and we need to wait for the gesture library to update before it returns to normal [issues#38](https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/issues/38)
## Others
-- react-native-graph 的 animated 属性 原库代码现在有问题 无论是 false 还是 true,数据变化都是静态变化,没有动画效果,原库中有使用者提 issue 和 PR,添加合入相应 PR 代码后才能动画正常[issue#111](https://github.com/margelo/react-native-graph/pull/111)
+- The original library code for the animated attribute of react native graph is currently problematic. Whether it is false or true, data changes are static and do not have animation effects. There are user issues and PRs in the original library, and the animation can only function properly after adding and merging the corresponding PR code [issue#111](https://github.com/margelo/react-native-graph/pull/111)
## License
diff --git a/en/react-native-image-gallery.md b/en/react-native-image-gallery.md
index a242ec6730435e87fcd14ceddba6a15c001140e4..33bd978aaa007e1fa6e205cf589bafba4f6e9308 100644
--- a/en/react-native-image-gallery.md
+++ b/en/react-native-image-gallery.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.0
+> Template version: v0.2.0
react-native-image-gallery
@@ -12,21 +12,19 @@
-> [!TIP]
+> [!tip]
>
-> [Github 地址](https://github.com/react-native-oh-library/react-native-image-gallery/tree/sig)
+> [GitHub address](https://github.com/react-native-oh-library/react-native-image-gallery/tree/sig)
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-image-gallery Releases](https://github.com/react-native-oh-library/react-native-image-gallery/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
+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 (#).
#### **npm**
@@ -42,9 +40,9 @@ yarn add @react-native-oh-tpl/react-native-image-gallery
-快速使用:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import Gallery from 'react-native-image-gallery';
@@ -65,13 +63,13 @@ import Gallery from 'react-native-image-gallery';
}
```
-### 兼容性
+### Compatibility
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-gallery Releases](https://github.com/react-native-oh-library/react-native-image-gallery/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-image-gallery Releases](https://github.com/react-native-oh-library/react-native-image-gallery/releases)
-#### 属性
+#### Properties
| Prop | Description | Type | Default | Platform | HarmonyOS Support |
| --------------------- | --------------------- | -------- | -------- |----------|-------------------|
@@ -88,10 +86,10 @@ import Gallery from 'react-native-image-gallery';
`onSingleTapConfirmed` | Fired after a single tap | `function`| | all | yes |
`onLongPress` | Fired after a long press | `function`| | all | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The ISC License (ISC)](https://choosealicense.com/licenses/isc) ,请自由地享受和参与开源。
+This project is licensed under [The ISC License (ISC)](https://choosealicense.com/licenses/isc).
diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md
index 64159dcdd175e369a5adac38a1d7ed699a86106a..32e4687dad0cbf447689ddcd08655ba46f09ec0b 100644
--- a/en/react-native-image-marker.md
+++ b/en/react-native-image-marker.md
@@ -299,180 +299,179 @@ Open the `entry/src/main/module.json5` file and add the following code:
}
]
```
-### Font usage
-If you need to use fonts, you need to store the font files in the rawfile/assets/assets/fonts directory under the resources directory of entry,
-As shown in the following figure:
-
## API
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
| --------- | ------------------------------ | ------ | -------- | ----------- | ----------------- |
| markImage | mark icons on background image | string | no | Android/iOS | yes |
| markText | mark texts on background image | string | no | Android/iOS | yes |
-##### ImageOptions
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| src | image src, local image | string | yes | iOS/Android | yes |
-| scale | image scale `>0`.defaultValue 1 | number | no | iOS/Android | yes |
-| rotate | rotate image rotate `0-360`.defaultValue 0 | number | no | iOS/Android | yes |
-| alpha | transparent of image `0 - 1`.defaultValue 1 | number | no | iOS/Android | yes |
-
-##### ImageFormat
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| png | iamge type png | string | no | iOS/Android | yes |
-| jpg | iamge type jpg | string | no | iOS/Android | yes |
-| base64 | iamge type base64 | string | no | iOS/Android | yes |
-##### PositionOptions
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| X | horizontal coordinate on background image | number / string | no | iOS/Android | yes |
-| Y | vertical coordinate on background image | number / string | no | iOS/Android | yes |
-| position | position enum | [Position](#position) | no | iOS/Android | yes |
-
-##### Position
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| topLeft | top left on background image | string | no | iOS/Android | yes |
-| topCenter | top center on background image | string | no | iOS/Android | yes |
-| topRight |top right on background image | string | no | iOS/Android | yes |
-| bottomLeft | bottom left on background image | string | no | iOS/Android | yes |
-| bottomCenter | bottom center on background image | string | no | iOS/Android | yes |
-| bottomRight | bottom right on background image| string | no | iOS/Android | yes |
-| center | center on background image | string | no | iOS/Android | yes |
#### markImage
+
```js
markImage(options: ImageMarkOptions): Promise;
```
-##### ImageMarkOptions
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| backgroundImage | background image options | [ImageOptions](#imageoptions) | yes | iOS/Android | partially |
-| quality | image quality `0-100`, `100` is best quality. defaultValue 100 | number | no | iOS/Android | yes |
-| filename | save image name | string | no | iOS/Android | yes |
-| saveFormat | save image format 'png','jpg','base64',default 'png' | [ImageFormat](#imageformat) | no | iOS/Android | yes |
-| watermarkImages | watermark images | Array\<[WatermarkImageOptions](#watermarkimageoptions)> | yes | iOS/Android | yes |
+##### ImageMarkOptions
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------- | -------------------------------------------------------------- | ----------------------------- | -------- | ----------- | ----------------- |
+| backgroundImage | background image options | ImageOptions | yes | iOS/Android | yes |
+| quality | image quality `0-100`, `100` is best quality. defaultValue 100 | number | no | iOS/Android | yes |
+| filename | save image name | string | no | iOS/Android | yes |
+| saveFormat | save image format 'png','jpg','base64',default 'png' | ImageFormat | no | iOS/Android | yes |
+| watermarkImages | watermark images | Array\ | yes | iOS/Android | yes |
-##### WatermarkImageOptions
+##### ImageOptions
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| src | image src, local image | string | yes | iOS/Android | yes |
-| scale | image scale `>0`.defaultValue 1 | number | no | iOS/Android | yes |
-| rotate | rotate image rotate `0-360`.defaultValue 0 | number | no | iOS/Android | yes |
-| alpha | transparent of image `0 - 1`.defaultValue 1 | number | no | iOS/Android | yes |
-| position | the position of icon on background image | [PositionOptions](#positionoptions) | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------ | ------------------------------------------- | ------ | -------- | ----------- | ----------------- |
+| src | image src, local image | string | yes | iOS/Android | yes |
+| scale | image scale `>0`.defaultValue 1 | number | no | iOS/Android | yes |
+| rotate | rotate image rotate `0-360`.defaultValue 0 | number | no | iOS/Android | yes |
+| alpha | transparent of image `0 - 1`.defaultValue 1 | number | no | iOS/Android | yes |
+##### ImageFormat
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------ | ----------------- | ------ | -------- | ----------- | ----------------- |
+| png | iamge type png | string | no | iOS/Android | yes |
+| jpg | iamge type jpg | string | no | iOS/Android | yes |
+| base64 | iamge type base64 | string | no | iOS/Android | yes |
+
+##### WatermarkImageOptions
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| -------- | ------------------------------------------- | --------------- | -------- | ----------- | ----------------- |
+| src | image src, local image | string | yes | iOS/Android | yes |
+| scale | image scale `>0`.defaultValue 1 | number | no | iOS/Android | yes |
+| rotate | rotate image rotate `0-360`.defaultValue 0 | number | no | iOS/Android | yes |
+| alpha | transparent of image `0 - 1`.defaultValue 1 | number | no | iOS/Android | yes |
+| position | the position of icon on background image | PositionOptions | no | iOS/Android | yes |
+
+##### PositionOptions
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| -------- | ----------------------------------------- | --------------- | -------- | ----------- | ----------------- |
+| X | horizontal coordinate on background image | number / string | no | iOS/Android | yes |
+| Y | vertical coordinate on background image | number / string | no | iOS/Android | yes |
+| position | position enum | Position | no | iOS/Android | yes |
+
+##### Position
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | --------------------------------- | ------ | -------- | ----------- | ----------------- |
+| topLeft | top left on background image | string | no | iOS/Android | yes |
+| topCenter | top center on background image | string | no | iOS/Android | yes |
+| topRight | top right on background image | string | no | iOS/Android | yes |
+| bottomLeft | bottom left on background image | string | no | iOS/Android | yes |
+| bottomCenter | bottom center on background image | string | no | iOS/Android | yes |
+| bottomRight | bottom right on background image | string | no | iOS/Android | yes |
+| center | center on background image | string | no | iOS/Android | yes |
#### markText
```json
markText(options: TextMarkOptions): Promise;
```
+
##### TextMarkOptions
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| backgroundImage | background image options | [ImageOptions](#imageoptions) | yes | iOS/Android | partially |
-| watermarkTexts | text options | Array\<[TextOptions](#textoptions)> | yes | iOS/Android | yes |
-| quality | image quality 0-100, 100 is best quality. defaultValue 100 | number | no | iOS/Android | yes |
-| filename | save image name | string | no | iOS/Android | yes |
-| saveFormat | save image format 'png','jpg','base64',default 'png' | [ImageFormat](#imageformat) | no | iOS/Android | yes |
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------- | ---------------------------------------------------------- | ------------------- | -------- | ----------- | ----------------- |
+| backgroundImage | background image options | ImageOptions | yes | iOS/Android | yes |
+| watermarkTexts | text options | Array\ | yes | iOS/Android | yes |
+| quality | image quality 0-100, 100 is best quality. defaultValue 100 | number | no | iOS/Android | yes |
+| filename | save image name | string | no | iOS/Android | yes |
+| saveFormat | save image format 'png','jpg','base64',default 'png' | ImageFormat | no | iOS/Android | yes |
##### TextOptions
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| text | text content | string | yes | iOS/Android | yes |
-| position | text position options | [PositionOptions](#positionoptions) | no | iOS/Android | yes |
-| style | text style | [TextStyle](#textstyle) | no | iOS/Android | yes |
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| -------- | --------------------- | --------------- | -------- | ----------- | ----------------- |
+| text | text content | string | yes | iOS/Android | yes |
+| position | text position options | PositionOptions | no | iOS/Android | yes |
+| style | text style | TextStyle | no | iOS/Android | yes |
##### TextStyle
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| color | font color | string | yes | iOS/Android | yes |
-| fontName | font name | string | no | iOS/Android | yes |
-| fontSize | font size | number | no | iOS/Android | yes |
-| shadowStyle | text shadow style | [ShadowLayerStyle](#shadowlayerstyle) | no | iOS/Android | yes |
-| textBackgroundStyle | text background style | [TextBackgroundStyle](#textbackgroundstyle) | no | iOS/Android | yes |
-| underline | text underline style | boolean | no | iOS/Android | yes |
-| skewX | css italic with degree, you can use italic instead | number | no | iOS/Android | yes |
-| strikeThrough | text stroke | boolean | no | iOS/Android | yes |
-| textAlign | text align . 'left' / 'center' / 'right' | string | no | iOS/Android | yes |
-| italic | text italic | boolean | no | iOS/Android | yes |
-| bold | text bold | boolean | no | iOS/Android | yes |
-| rotate | rotate text | number | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------------- | -------------------------------------------------- | ------------------- | -------- | ----------- | ----------------- |
+| color | font color | string | yes | iOS/Android | yes |
+| fontName | font name | string | no | iOS/Android | yes |
+| fontSize | font size | number | no | iOS/Android | yes |
+| shadowStyle | text shadow style | ShadowLayerStyle | no | iOS/Android | yes |
+| textBackgroundStyle | text background style | TextBackgroundStyle | no | iOS/Android | yes |
+| underline | text underline style | boolean | no | iOS/Android | yes |
+| skewX | css italic with degree, you can use italic instead | number | no | iOS/Android | yes |
+| strikeThrough | text stroke | boolean | no | iOS/Android | yes |
+| textAlign | text align . 'left' / 'center' / 'right' | string | no | iOS/Android | yes |
+| italic | text italic | boolean | no | iOS/Android | yes |
+| bold | text bold | boolean | no | iOS/Android | yes |
+| rotate | rotate text | number | no | iOS/Android | yes |
##### ShadowLayerStyle
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| dx | shadow offset x | number | yes | iOS/Android | yes |
-| dy | shadow offset y | number | yes | iOS/Android | yes |
-| radius |shadow radius | number | yes | iOS/Android | yes |
-| color | shadow color | string | yes | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------ | --------------- | ------ | -------- | ----------- | ----------------- |
+| dx | shadow offset x | number | yes | iOS/Android | yes |
+| dy | shadow offset y | number | yes | iOS/Android | yes |
+| radius | shadow radius | number | yes | iOS/Android | yes |
+| color | shadow color | string | yes | iOS/Android | yes |
##### TextBackgroundStyle
+
extends Padding
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| type | background type .TextBackgroundType enum | [TextBackgroundType](#textbackgroundtype) | no | iOS/Android | yes |
-| color | background color | string | yes | iOS/Android | yes |
-| cornerRadius |background corner radius | [CornerRadius](#cornerradius) | no | iOS/Android | yes |
-| padding | padding for text background,Up to four values, separated by spaces | number / string | no | iOS/Android | yes |
-| paddingLeft | padding left for text background | number / string | no | iOS/Android | yes |
-| paddingRight | padding right for text background | number / string | no | iOS/Android | yes |
-| paddingTop | padding top for text background | number / string | no | iOS/Android | yes |
-| paddingBottom | padding bottom for text background | number / string | no | iOS/Android | yes |
-| paddingHorizontal | padding left and right (horizontal) for text background | number / string | no | iOS/Android | yes |
-| paddingVertical | padding top and bottom (vertical) for text background | number / string | no | iOS/Android | yes |
-| paddingX |padding x, alias of paddingHorizontal | number / string | no | iOS/Android | yes |
-| paddingY | padding y, alias of paddingVertical | number / string | no | iOS/Android | yes |
+| type | background type .TextBackgroundType enum | TextBackgroundType | no | iOS/Android | yes |
+| color | background color | string | yes | iOS/Android | yes |
+| cornerRadius |background corner radius | CornerRadius | no | iOS/Android | yes |
+| padding | padding for text background,Up to four values, separated by spaces | number / string | no | iOS/Android | yes |
+| paddingLeft | padding left for text background | number / string | no | iOS/Android | yes |
+| paddingRight | padding right for text background | number / string | no | iOS/Android | yes |
+| paddingTop | padding top for text background | number / string | no | iOS/Android | yes |
+| paddingBottom | padding bottom for text background | number / string | no | iOS/Android | yes |
+| paddingHorizontal | padding left and right (horizontal) for text background | number / string | no | iOS/Android | yes |
+| paddingVertical | padding top and bottom (vertical) for text background | number / string | no | iOS/Android | yes |
+| paddingX |padding x, alias of paddingHorizontal | number / string | no | iOS/Android | yes |
+| paddingY | padding y, alias of paddingVertical | number / string | no | iOS/Android | yes |
##### TextBackgroundType
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| stretchX | background type stretchX | string | no | iOS/Android | yes |
-| stretchY | background type stretchY | string | no | iOS/Android | yes |
-| none | background type fit | string | no | iOS/Android | yes |
-
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| -------- | ------------------------ | ------ | -------- | ----------- | ----------------- |
+| stretchX | background type stretchX | string | no | iOS/Android | yes |
+| stretchY | background type stretchY | string | no | iOS/Android | yes |
+| none | background type fit | string | no | iOS/Android | yes |
##### CornerRadius
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| topLeft | topLeft Radius | [RadiusValue](#radiusvalue) | no | iOS/Android | yes |
-| topRight | topRight Radius | [RadiusValue](#radiusvalue) | no | iOS/Android | yes |
-| bottomLeft |bottomLeft Radius | [RadiusValue](#radiusvalue) | no | iOS/Android | yes |
-| bottomRight |bottomRight Radius | [RadiusValue](#radiusvalue) | no | iOS/Android | yes |
-| all | all Radius | [RadiusValue](#radiusvalue) | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ----------- | ------------------ | ----------- | -------- | ----------- | ----------------- |
+| topLeft | topLeft Radius | RadiusValue | no | iOS/Android | yes |
+| topRight | topRight Radius | RadiusValue | no | iOS/Android | yes |
+| bottomLeft | bottomLeft Radius | RadiusValue | no | iOS/Android | yes |
+| bottomRight | bottomRight Radius | RadiusValue | no | iOS/Android | yes |
+| all | all Radius | RadiusValue | no | iOS/Android | yes |
##### RadiusValue
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| x | radius value for x | number / string | no | iOS/Android | yes |
-| y | radius value for y | number / string | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ---- | ------------------ | --------------- | -------- | ----------- | ----------------- |
+| x | radius value for x | number / string | no | iOS/Android | yes |
+| y | radius value for y | number / string | no | iOS/Android | yes |
## Known Issues
-- [ ] Harmony OS is not support backgroundImage-ImageOptions-alpha feature now: [issue#30](https://github.com/react-native-oh-library/react-native-image-marker/issues/30)
+
- [x] Harmony OS is not support font name feature now: [issue#7](https://github.com/react-native-oh-library/react-native-image-marker/issues/7)
- [x] Harmony OS is not support font skewX feature now: [issue#8](https://github.com/react-native-oh-library/react-native-image-marker/issues/8)
-- [x] Harmony OS is not support font italic feature now: [issue#9](https://github.com/react-native-oh-library/react-native-image-marker/issues/9)
+- [x] Harmony OS is not support font italic feature now:[issue#9](https://github.com/react-native-oh-library/react-native-image-marker/issues/9)
## Others
diff --git a/en/react-native-localization-settings.md b/en/react-native-localization-settings.md
index 52d2b7f893cb5f60b5094f1ad051d833df921386..0b1815dd8a7c70b9f380e71968e7b427d797df7f 100644
--- a/en/react-native-localization-settings.md
+++ b/en/react-native-localization-settings.md
@@ -21,8 +21,6 @@ Find the matching version information in the release address of a third-party li
Go to the project directory and execute the following instruction:
-
-
#### **npm**
@@ -43,7 +41,7 @@ The following code shows the basic use scenario of the repository:
> [!WARNING] The name of the imported repository remains unchanged.
-> [!TIP] 本示例依赖 i18next react-i18next 库,参照[react-i18next](https://react.i18next.com/guides/quick-start)进行引入
+> [!TIP] This means to support the i18next and react-i18next libraries by following the introduction guide on react-i18next.
```js
import * as React from "react";
@@ -210,7 +208,7 @@ Check the release version information in the release address of the third-party
> [!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.
-> [!TIP] 在设置改变语言之前,确保手机系统添加相应语言
+> [!TIP] Before changing the language settings, ensure that the phone system adds the corresponding language
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| -------------------------- | ------------------------------------- | -------- | -------- | ----------- | ----------------- |
diff --git a/en/react-native-localization.md b/en/react-native-localization.md
index 78be8e239ef2eba07c253f83623577e5838c1011..82efbbee41d8fb6411e8a0a4948bef6b0ca724ba 100644
--- a/en/react-native-localization.md
+++ b/en/react-native-localization.md
@@ -1,4 +1,4 @@
-模板版本:v0.2.2
+Template version: v0.2.2
react-native-localization
@@ -14,16 +14,14 @@
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/ReactNativeLocalization)
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/ReactNativeLocalization)
-
-
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-localization Releases](https://github.com/react-native-oh-library/ReactNativeLocalization/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -42,18 +40,17 @@ yarn add @react-native-oh-tpl/react-native-localization
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import React, { useState } from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
import Localize from 'react-native-localization';
-// 定义本地化内容
const strings = new Localize({
- en: {//英语
+ en: {
welcome: 'Welcome',
question: 'I\'d like some {0} and {1}, or just {0}',
bread: 'bread',
@@ -63,7 +60,7 @@ const strings = new Localize({
availableLanguages: 'Available Languages',
interfaceLanguage: 'The System Language'
},
- fr: {//法语
+ fr: {
welcome: 'Bienvenue',
question: 'Je voudrais un peu de {0} et {1}, ou juste {0}',
bread: 'pain',
@@ -73,7 +70,7 @@ const strings = new Localize({
availableLanguages: 'Langues disponibles',
interfaceLanguage: 'Langue du système'
},
- bo: {//藏语
+ bo: {
welcome: 'བསྐུལ་མཁན།',
question: 'ང་ལུས་འདི་ལས། {0} དང། {1} ཡང་ཡིན། གང་ཡིན་ནི། {0}',
bread: 'བཀྲུངས',
@@ -83,7 +80,7 @@ const strings = new Localize({
availableLanguages: 'ད་དུས་ལག་འཁྱེར་སྒྲིགས།',
interfaceLanguage: 'རྩམ་གཞི་སྒྲིག་ལེན་དེ་རྒྱལ་སྤོད་'
},
- zh: {//中文
+ zh: {
welcome: '欢迎',
question: '我想要一些{0}和{1},或者只要{0}',
bread: '面包',
@@ -109,22 +106,22 @@ export function LocalizationDemo() {
changeLanguage('zh')}
/>
changeLanguage('fr')}
/>
changeLanguage('en')}
/>
changeLanguage('bo')}
/>
@@ -169,17 +166,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](/en/codegen.md).
## Link
-目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking.
-首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `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
{
@@ -190,18 +187,17 @@ const styles = StyleSheet.create({
}
```
-### 2.引入原生端代码
+### 2.Introducing Native Code
-目前有两种方法:
+Currently, two methods are available:
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
+
-方法一:通过 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": {
@@ -210,22 +206,22 @@ 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](/en/link-source-code.md).
-### 3.在 ArkTs 侧引入 RNReactLocalizationPackage
+### 3. Introducing RNReactLocalizationPackage to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
@@ -239,34 +235,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
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-localization Releases](https://github.com/react-native-oh-library/ReactNativeLocalization/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-localization Releases](https://github.com/react-native-oh-library/ReactNativeLocalization/releases)
-## 静态方法
+## Static 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.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | :---------- | ---- | :------: | :------: | :----------------: |
@@ -278,10 +274,10 @@ ohpm install
| getString(key: string, language?: string) | character information based on the key value | string | yes | iOS/Android | yes |
| setContent(props: any) | replace the NamedLocalization object without reinstantiating the object | void | yes | iOS/Android | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/stefalda/ReactNativeLocalization/blob/master/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
+This project is licensed under [The MIT License (MIT)](https://github.com/stefalda/ReactNativeLocalization/blob/master/LICENSE).
\ No newline at end of file
diff --git a/en/react-native-map-clustering.md b/en/react-native-map-clustering.md
index 9d2cc633cd1fecac5a83a825f62ed9338beea9ff..cf9816d3a7c56a19bca836cda8cf46b5270dfcd9 100644
--- a/en/react-native-map-clustering.md
+++ b/en/react-native-map-clustering.md
@@ -148,19 +148,19 @@ Check the release version information in the release address of the third-party
## Known Issues
-- [ ] 不支持属性clusterColor [issue#1](https://github.com/react-native-oh-library/react-native-map-clustering/issues/1)
-- [ ] 不支持属性clusterTextColor [issue#2](https://github.com/react-native-oh-library/react-native-map-clustering/issues/2)
-- [ ] 不支持属性clusterFontFamily [issue#3](https://github.com/react-native-oh-library/react-native-map-clustering/issues/3)
-- [ ] 不支持属性tracksViewChanges [issue#4](https://github.com/react-native-oh-library/react-native-map-clustering/issues/4)
-- [ ] 不支持属性renderCluster [issue#5](https://github.com/react-native-oh-library/react-native-map-clustering/issues/5)
+- [ ] Unsupported property clusterColor [issue#1](https://github.com/react-native-oh-library/react-native-map-clustering/issues/1)
+- [ ] Unsupported property clusterTextColor [issue#2](https://github.com/react-native-oh-library/react-native-map-clustering/issues/2)
+- [ ] Unsupported property clusterFontFamily [issue#3](https://github.com/react-native-oh-library/react-native-map-clustering/issues/3)
+- [ ] Unsupported property tracksViewChanges [issue#4](https://github.com/react-native-oh-library/react-native-map-clustering/issues/4)
+- [ ] Unsupported property renderCluster [issue#5](https://github.com/react-native-oh-library/react-native-map-clustering/issues/5)
## Others
-- height属性暂不支持,与iOS表现一致。[issue#273](https://github.com/venits/react-native-map-clustering/issues/273)
-- maxZoom属性暂不支持,与iOS表现一致。[issue#274](https://github.com/venits/react-native-map-clustering/issues/274)
-- edgePadding属性暂不支持,与iOS表现一致。[issue#221](https://github.com/venits/react-native-map-clustering/issues/221)
-- spiralEnabled属性暂不支持,与iOS表现一致。[issue#275](https://github.com/venits/react-native-map-clustering/issues/275)
-- spiderLineColor属性暂不支持,与iOS表现一致。[issue#276](https://github.com/venits/react-native-map-clustering/issues/276)
+- The height property is currently unsupported, consistent with iOS behavior. [issue#273](https://github.com/venits/react-native-map-clustering/issues/273)
+- The maxZoom property is currently unsupported, consistent with iOS behavior.[issue#274](https://github.com/venits/react-native-map-clustering/issues/274)
+- The edgePadding property is currently unsupported, consistent with iOS behavior.[issue#221](https://github.com/venits/react-native-map-clustering/issues/221)
+- The spiralEnabled property is currently unsupported, consistent with iOS behavior.[issue#275](https://github.com/venits/react-native-map-clustering/issues/275)
+- The spiderLineColor property is currently unsupported, consistent with iOS behavior.[issue#276](https://github.com/venits/react-native-map-clustering/issues/276)
## License
diff --git a/en/react-native-material-dropdown.md b/en/react-native-material-dropdown.md
index 31cfff858830dbef235544a20c0b82f511fda70a..bcec4d503a1ca548234d2b2a665a1d6c2223ed1d 100644
--- a/en/react-native-material-dropdown.md
+++ b/en/react-native-material-dropdown.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-material-dropdown
@@ -13,23 +13,17 @@
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-material-dropdown)
-
-
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-material-dropdown)
-
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-material-dropdown Releases](https://github.com/react-native-oh-library/react-native-material-dropdown/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-> [!TIP] 本库依赖[@react-native-oh-tpl/react-native-material-textfield 文档](/zh-cn/react-native-material-textfield.md)
-
-和 [@react-native-oh-tpl/react-native-material-buttons 文档](/zh-cn/react-native-material-buttons.md)
-
+> [!TIP] This library depends on [@react-native-oh-tpl/react-native-material-textfield](/zh-cn/react-native-material-textfield.md) and [@react-native-oh-tpl/react-native-material-buttons](/zh-cn/react-native-material-buttons.md)
-进入到工程目录并输入以下命令:
+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 (#).
@@ -47,9 +41,9 @@ yarn add @react-native-oh-tpl/react-native-material-dropdown
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import React, { Component } from 'react';
@@ -79,30 +73,26 @@ class Example extends Component {
## Link
-本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-material-textfield和@react-native-oh-tpl/react-native-material-buttons 的代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。
+The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-material-textfield and @react-native-oh-tpl/react-native-material-buttons. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly.
-如未引入请参照[@react-native-oh-tpl/react-native-material-textfield 文档](/zh-cn/react-native-material-textfield.md)
+If it is not included, follow the guide provided in @react-native-oh-tpl/react-native-material-textfield and @react-native-oh-tpl/react-native-material-buttons to add it to your project.
-和 [@react-native-oh-tpl/react-native-material-buttons 文档](/zh-cn/react-native-material-buttons.md)进行引入
+## 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.
-## 约束与限制
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-material-dropdown Releases](https://github.com/react-native-oh-library/react-native-material-dropdown/releases)
-### 兼容性
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+## Properties
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-material-dropdown Releases](https://github.com/react-native-oh-library/react-native-material-dropdown/releases)
+### This component has the following properties:
+>[!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-## 属性
-
-### 此组件有以下属性:
-
->[!TIP] "Platform"列表示该属性在原三方库上支持的平台。
-
->[!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 |
| :-------------------: | :-----------------------------------------: | :------: | :------: | :---------: | :---------------: |
@@ -140,9 +130,9 @@ class Example extends Component {
## **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 |
| :-----------------: | :---------------------: | :-----: | :------: | :---------: | :---------------: |
@@ -153,11 +143,13 @@ class Example extends Component {
| **selectedItem()** | Get selected item | Object | No | iOS/Android | Yes |
| **isFocused()** | Get current focus state | Boolean | No | iOS/Android | Yes |
-## 遗留问题
+## Known Issues
+
+## Others
-## 其他
+- RenderAccessory property: You need to specify renderRightAccessory or renderLeftAccessory
-## 开源协议
+## License
-本项目基于 [The BSD License (BSD )](https://github.com/n4kz/react-native-material-dropdown/blob/master/license.txt) ,请自由地享受和参与开源。
+This project is licensed under [The BSD License (BSD )](https://github.com/n4kz/react-native-material-dropdown/blob/master/license.txt).
diff --git a/en/react-native-material-ui.md b/en/react-native-material-ui.md
index 8ed201fd44c1967ce6c617f557852eb36e35cccf..fe2fcba644609a970026b237a8c120dc11700fe3 100644
--- a/en/react-native-material-ui.md
+++ b/en/react-native-material-ui.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-material-ui
@@ -13,13 +13,13 @@
-> [!TIP] [Github 地址](https://github.com/xotahal/react-native-material-ui)
+> [!tip] [GitHub address](https://github.com/xotahal/react-native-material-ui)
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-material-ui Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Freact-native-material-ui%2Freleases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -37,9 +37,9 @@ yarn add react-native-material-ui
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
@@ -135,11 +135,11 @@ const styles = StyleSheet.create({
export default ActionButtonDemo
```
-### 在 ArkTs 侧引入和注册字体文件
+### Introducing and Registering Font Files on the ArkTS Side
-步骤一: 复制字体文件到 `entry/src/main/resources/rawfile/assets/assets/fonts` 目录下(如使用了外部字体文件,需要将*.ttf 文件复制过来)
+Step 1: Copy the font files to the entry/src/main/resources/rawfile/assets/assets/fonts directory (if using external font files, you need to copy the *.ttf files over).
-步骤二: 打开 `entry/src/main/ets/pages/Index.ets`,添加以下代码
+Step 2: Open `entry/src/main/ets/pages/Index.ets` and add the following code:
```
const fonts: Record = {
@@ -171,8 +171,6 @@ struct Index {
build() {
Column(){
//...
-
- //注册字体文件
RNApp({
rnInstanceConfig: {
//...
@@ -187,19 +185,19 @@ struct Index {
}
```
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机ROM。
+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.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-material-ui Releases](https://github.com/react-native-oh-library/react-native-material-ui/releases)
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-material-ui Releases](https://github.com/react-native-oh-library/react-native-material-ui/releases)
-## 组件
+## Components
-> [!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.
### ActionButton
@@ -499,11 +497,11 @@ struct Index {
| rightElementContainer | View.propTypes.style | no | iOS/Android | yes |
| rightElement | Text.propTypes.style | no | iOS/Android | yes |
-## 主题
+## Theme
-**如果您想使用默认主题,可以跳过此步骤**
+**If you want to use the default theme, you can skip this step**
-如果您想更改应用程序的主色,只需将自己的设置传递给 ThemeContext.Provider 对象即可。这些设置将与默认主题合并。
+If you want to change the main color of the application, simply pass your settings to ThemeContext The Provider object is sufficient. These settings will be merged with the default theme.
```jsx
import React, { Component } from 'react';
@@ -535,19 +533,19 @@ class Main extends Component {
```
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-- RadioButton组件功能在Android和iOS不生效, HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/25)
-- BottomNavigation和Toolbar组件hidden属性功能在Android和iOS不生效, HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/357)
-- Toolbar组件autoCapitalize属性和autoCorrect功能在Android和iOS不生效, HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/520)
-- Drawer:Section组件中的style属性设置样式在Android和iOS不生效,HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/160)
-- Drawer:Section组件中itmes属性对象中的onLongPress属性和disabled属性在Android和iOS不生效,HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/521)
-- ListItem组件中onLeftElementPress属性在Android和iOS不生效,HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/522)
-- Drawer:Header组件中backgroundColor属性与子元素中的Style属性冲突在Android和iOS不生效,HarmonyOS与Android,iOS表现一致。[原库 issue](https://github.com/xotahal/react-native-material-ui/issues/523)
+- The RadioButton component's functionality does not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#1](https://github.com/xotahal/react-native-material-ui/issues/25)
+- The hidden attribute functionality of the BottomNavigation and Toolbar components does not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#2](https://github.com/xotahal/react-native-material-ui/issues/357)
+- The autoCapitalize and autoCorrect functionalities of the Toolbar component do not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#3](https://github.com/xotahal/react-native-material-ui/issues/520)
+- The style attribute for setting styles in the Drawer:Section component does not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#4](https://github.com/xotahal/react-native-material-ui/issues/160)
+- The onLongPress and disabled attributes within the items attribute object of the Drawer:Section component do not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#5](https://github.com/xotahal/react-native-material-ui/issues/521)
+- The onLeftElementPress attribute in the ListItem component does not work on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#6](https://github.com/xotahal/react-native-material-ui/issues/522)
+- The conflict between the backgroundColor attribute in the Drawer:Header component and the Style attribute in its child elements does not manifest on Android and iOS, and HarmonyOS exhibits the same behavior as Android and iOS.[issue#7](https://github.com/xotahal/react-native-material-ui/issues/523)
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/xotahal/react-native-material-ui/blob/master/LICENSE),请自由地享受和参与开源。
+This project is licensed under [The MIT License (MIT)](https://github.com/xotahal/react-native-material-ui/blob/master/LICENSE).
diff --git a/en/react-native-mmkv-storage.md b/en/react-native-mmkv-storage.md
index 64f196d4dc7ed986546539e4a9376b51a7c7fab7..192b65ed57d9191417c38d431e9e741051c0ca20 100644
--- a/en/react-native-mmkv-storage.md
+++ b/en/react-native-mmkv-storage.md
@@ -23,8 +23,6 @@ Find the matching version information in the release address of a third-party li
Go to the project directory and execute the following instruction:
-
-
#### **npm**
@@ -242,7 +240,7 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md).
-### 3. Configuring CMakeLists and Introducing xxx Package
+### 3. Configuring CMakeLists and Introducing MMKVNativePackage
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
diff --git a/en/react-native-paper.md b/en/react-native-paper.md
index c787e4acb252d4e033157e08ca5c6feca08be435..c9e6e22d56b2d8d6fb69d433087e81c97c79379a 100644
--- a/en/react-native-paper.md
+++ b/en/react-native-paper.md
@@ -108,9 +108,9 @@ This document is verified based on the following versions:
View details[Paper](https://callstack.github.io/react-native-paper)
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
@@ -153,9 +153,9 @@ View details[Paper](https://callstack.github.io/react-native-paper)
View details[Paper](https://callstack.github.io/react-native-paper/docs/components/ActivityIndicator#animating)
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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.
**ActivityIndicator**:Activity indicator is used to present progress of some activity in the app. It can be used as a drop-in for the ActivityIndicator shipped with React Native
| Name | Description | Type | Required | Platform | HarmonyOS Support |
@@ -1214,14 +1214,14 @@ View details[Paper](https://callstack.github.io/react-native-paper/docs/componen
## Known Issues
## Others
-- Icon 组件allowFontScaling不生效, 参看源码传入的此属性并未传入内部icon组件 [源码位置](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/Icon.tsx#L153)
-- Menu组件中的mode属性为[5.12.4版本新增](https://github.com/callstack/react-native-paper/releases/tag/v5.12.4),当前版本为5.12.3
-- Menu statusBarHeight 无效果,此属性为Android平台独有 [源码位置](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/Menu/Menu.tsx#L447)
-- DataTableRow 组件使用 TouchableRipple 产生的涟漪效果,在Android上生效,iOS无效果
-- BottomNavigation safeAreaInset top属性无效果,因为在源码中未使用 [源码位置](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/BottomNavigation/BottomNavigationBar.tsx#L580)
-- BottomNavigation.Bar组件 keyboardHidesNavigationBar属性为父组件BottomNavigation传入,请勿单独使用
-- accessibilityState属性鸿蒙RN(5.0.0.700)不支持该属性
-- DataTable组件底层使用的是鸿蒙RN的Text组件,目前Text组件不支持accessibilityLabel属性。所以DataTable涉及无障碍朗读功能在鸿蒙RN的效果和其他平台有差异
+- The allowFontScaling property on the Icon component does not take effect. Upon reviewing the source code, this property is not passed to the internal icon component. [Source code location](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/Icon.tsx#L153)
+- The mode property in the Menu component is a new addition in version[5.12.4 Version added](https://github.com/callstack/react-native-paper/releases/tag/v5.12.4),and the current version is 5.12.3.
+- The statusBarHeight property in the Menu component has no effect, as this property is exclusive to the Android platform. [Source code location](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/Menu/Menu.tsx#L447)
+- The ripple effect produced by the DataTableRow component using TouchableRipple works on Android but not on iOS.
+- The safeAreaInset top property in BottomNavigation has no effect because it is not used in the source code. [Source code location](https://github.com/callstack/react-native-paper/blob/v5.12.3/src/components/BottomNavigation/BottomNavigationBar.tsx#L580)
+- The keyboardHidesNavigationBar property in the BottomNavigation.Bar component is passed from the parent component BottomNavigation and should not be used standalone.
+- The accessibilityState property is not supported in HarmonyOS RN (5.0.0.700).
+- The DataTable component uses the HarmonyOS RN Text component underneath, and currently, the Text component does not support the accessibilityLabel property. Therefore, the accessibility read-out functionality of DataTable on HarmonyOS RN differs from other platforms.
## License
diff --git a/en/react-native-quick-base64.md b/en/react-native-quick-base64.md
index 458d7aa00ebf57052e20966547aab867d18aefef..ab33c78b225df3a4e37ed30fb0fbffd026f820d2 100644
--- a/en/react-native-quick-base64.md
+++ b/en/react-native-quick-base64.md
@@ -20,8 +20,6 @@ Find the matching version information in the release address of a third-party li
Go to the project directory and execute the following instruction:
-
-
#### **npm**
@@ -68,7 +66,6 @@ const PALETTE = {
};
export function QuickBase64Test() {
- // 测试字符串转base64
const [textTobase64, onChangeTextToBase64] = useState('');
const [base64ToTextLength, onChangeBase64TextLength] = useState(0);
@@ -83,9 +80,9 @@ export function QuickBase64Test() {
const [fbArrayBase64StrUrlSafe, onChangeFbArrayBase64StrUrlSafe] = useState('');
- const [testShimBtoA, onChangeTestShimBtoA] = useState(''); // 字符串转base64
+ const [testShimBtoA, onChangeTestShimBtoA] = useState('');
- const [testShimAtoB, onChangeTestShimAtoB] = useState(''); // base64转字符串
+ const [testShimAtoB, onChangeTestShimAtoB] = useState('');
const [nativeModule, onChangeNativeModule] = useState({
base64FromArrayBuffer: undefined,
@@ -103,43 +100,37 @@ export function QuickBase64Test() {
const [trimBase64PaddingText, onChangeTrimBase64PaddingText] = useState('');
const byArray = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]);
- // 点击事件 字符串转base64
const onPressBtoA = (text: string) => {
let b64 = btoa(text);
- console.log(`字符串转base64 ${b64}`);
+ console.log(`Convert string to base64 ${b64}`);
onChangeTextToBase64(b64)
}
const [testText, onChangeTestText] = React.useState('');
- // 点击事件 base64转字符串
const onPressAtoB = (text: string) => {
let textA = atob(text);
- console.log(`base64转字符串 ${textA}`);
+ console.log(`Base64 to string conversion ${textA}`);
onChangeBase64Text(textA)
}
- // 打印base64转为Unit8Array字节数组的长度
const onPressBase64Length = (text: string) => {
- console.log(`打印base64长度1 ${text}`);
+ console.log(`Print base64 length 1 ${text}`);
onChangeBase64TextLength(byteLength(text))
}
- /* toByteArray 把base64字符串解码为Uint8Array */
const onPressToByteArray = (text: string) => {
let btArray = toByteArray(text);
console.log(`toByteArray ${btArray}`);
onChangeByteArray(btArray)
}
- /* toByteArray 把base64字符串解码为Uint8Array removeLinebreaks */
const onPressToByteArrayRemove = (text: string, removeLinebreaks: boolean = false) => {
let btArray = toByteArray(text, removeLinebreaks);
console.log(`toByteArray ${btArray}`);
onChangeByteArrayRemove(btArray)
}
- /* fromByteArray 把Uint8Array编码为Base64字符串 */
const onPressFromByteArray = (
uint8: Uint8Array,
urlSafe: boolean = false) => {
@@ -148,7 +139,6 @@ export function QuickBase64Test() {
onChangeFbArrayBase64Str(b64)
}
- /* fromByteArray 把Uint8Array编码为Base64字符串 */
const onPressFromByteArrayUrlSafe = (
uint8: Uint8Array,
urlSafe: boolean = false) => {
@@ -157,11 +147,10 @@ export function QuickBase64Test() {
onChangeFbArrayBase64StrUrlSafe(b64)
}
- /* shim 给全局对象添加btoa和atob函数的shim实现 */
const handleAddShimToGlobal = () => {
shim();
- console.log(typeof global.btoa); // 应该输出 "function"
- console.log(typeof global.atob); // 同样应该输出 "function"
+ console.log(typeof global.btoa);
+ console.log(typeof global.atob);
}
const onPressTestShimBtoA = (text: string) => {
@@ -176,25 +165,17 @@ export function QuickBase64Test() {
onChangeTestShimAtoB(decodeBase64)
}
- /* trimBase64Padding 清除Base64字符串的填充字符 */
const onPressTrimBase64Padding = (text: string) => {
let trimBase64 = trimBase64Padding(text);
console.log(`shim global atob ${trimBase64}`);
onChangeTrimBase64PaddingText(trimBase64)
}
- /* getNative 返回包含base64FromArrayBuffer和base64ToArrayBuffer函数的对象 */
const onPressGetNative = () => {
const native = getNative() as NativeModule;
onChangeNativeModule(native)
}
- /**
- * @param text
- * base64FromArrayBuffer方法接受一个Base64编码的字符串或ArrayBuffer,
- * 以及一个可选的布尔值参数,该参数决定是否生成的Base64字符串是URL安全的。
- * 这个方法将ArrayBuffer对象转换为Base64编码的字符串。
- */
const onPressNBFAB = (text: string | ArrayBuffer) => {
if (nativeModule?.base64FromArrayBuffer) {
let base64FromArrayBuffer = nativeModule.base64FromArrayBuffer(text);
@@ -202,12 +183,6 @@ export function QuickBase64Test() {
}
}
- /**
- * @description base64转换Unit8Array 去除换行符
- * @param text
- * @param removeLinebreaks true
- *
- */
const onPressNBFABUrlSafe = (text: string | ArrayBuffer, urlSafe: boolean = false) => {
if (nativeModule?.base64FromArrayBuffer) {
let base64FromArrayBuffer = nativeModule.base64FromArrayBuffer(text, urlSafe);
@@ -215,14 +190,6 @@ export function QuickBase64Test() {
}
}
- /**
- * @description base64转换Unit8Array
- * base64ToArrayBuffer方法接受一个Base64编码的字符串和一个可选的布尔值参数,
- * 该参数决定是否在转换过程中删除换行符。这个方法将Base64编码的字符串转换为ArrayBuffer对象。
- * @param text
- * @param removeLinebreaks 默认值 false
- *
- */
const onPressNBTAB = (text: string) => {
if (nativeModule?.base64ToArrayBuffer) {
let base64ToArrayBuffer = new Uint8Array(nativeModule.base64ToArrayBuffer(text));
@@ -230,12 +197,6 @@ export function QuickBase64Test() {
}
}
- /**
- * @description base64转换Unit8Array 去除换行符
- * @param text
- * @param removeLinebreaks true
- *
- */
const onPressNBTABRemoveLinebreaks = (text: string, removeLinebreaks: boolean = false) => {
if (nativeModule?.base64ToArrayBuffer) {
let base64ToArrayBuffer = new Uint8Array(nativeModule.base64ToArrayBuffer(text, removeLinebreaks));
@@ -338,8 +299,6 @@ export function QuickBase64Test() {
handleAddShimToGlobal()} />
-
- {/* 测试shim 设置 btoa和atob函数 成功与否 */}
Test whether the shim sets the btoa function successfully.
@@ -348,8 +307,6 @@ export function QuickBase64Test() {
{testShimBtoA}
-
- {/* 测试shim 设置 btoa和atob函数 成功与否 */}
Test whether the shim sets the atob function successfully.
@@ -358,8 +315,6 @@ export function QuickBase64Test() {
{testShimAtoB}
-
- {/* trimBase64Padding 清除Base64字符串的填充字符 */}
trimBase64Padding.
@@ -566,9 +521,9 @@ Check the release version information in the release address of the third-party
## Static Methods
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
diff --git a/en/react-native-reconnecting-websocket.md b/en/react-native-reconnecting-websocket.md
index 20f3123e8ebcfabc093fd74f676077c7bb157f55..dba7c49beb2f439fc093ebf82c807055f1d58b19 100644
--- a/en/react-native-reconnecting-websocket.md
+++ b/en/react-native-reconnecting-websocket.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-reconnecting-websocket
@@ -12,15 +12,11 @@
+> [!TIP] [GitHub address](https://github.com/React-Sextant/react-native-reconnecting-websocket)
+## Installation and Usage
-
-
-> [!TIP] [Github 地址](https://github.com/React-Sextant/react-native-reconnecting-websocket)
-
-## 安装与使用
-
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -38,7 +34,7 @@ yarn add react-native-reconnecting-websocket@^2.0.0
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
```tsx
import React, { useEffect, useState } from 'react';
@@ -81,23 +77,23 @@ const ReconnectingWebsocketDemo = () => {
return (
<>
- 进入页面自动连通服务器
+ Automatically connect to the server upon entering the page
{
ws.close()
}}
/>
{
ws.send('可口可乐')
}}
/>
{
ws.reconnect()
}}
@@ -113,11 +109,11 @@ const ReconnectingWebsocketDemo = () => {
export default ReconnectingWebsocketDemo;
```
-## 约束与限制
+## 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;
2. RNOH:0.72.29; SDK:HarmonyOS NEXT Developer Beta6; IDE:DevEco Studio 5.0.3.706; ROM:3.0.0.60;
@@ -125,9 +121,9 @@ export default ReconnectingWebsocketDemo;
## 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 |
| ----------------------------- | ------------------------------------------------------------ | ------ | -------- | -------- | ----------------- |
@@ -137,8 +133,8 @@ export default ReconnectingWebsocketDemo;
| `ping(): void` | Sends a ping frame to the server. | Method | No | All | Yes |
| `reconnect(): void` | Closes the current WebSocket connection and attempts to reconnect using the initial parameters. | Method | No | All | Yes |
-## 遗留问题
-## 其他
-## 开源协议
+## Known Issues
+## Others
+## License
-本项目基于 [The MIT License (MIT)](https://mitlicense.org/),请自由地享受和参与开源。
\ No newline at end of file
+This project is licensed under [The MIT License (MIT)](https://mitlicense.org/).
\ No newline at end of file
diff --git a/en/react-native-shared-element.md b/en/react-native-shared-element.md
index f3b301c8d7104c7dbf542b847b25eba9250d2684..5c44c232ae58845b08ef90fdf1f1ff058c0dbaa6 100644
--- a/en/react-native-shared-element.md
+++ b/en/react-native-shared-element.md
@@ -20,8 +20,6 @@ Find the matching version information in the release address of a third-party li
Go to the project directory and execute the following instruction:
-
-
#### **npm**
@@ -256,7 +254,7 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
-### 3. Configuring CMakeLists and Introducing xxx Package
+### 3. Configuring CMakeLists and Introducing SharedElementPackage
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
@@ -338,9 +336,9 @@ Check the release version information in the release address of the third-party
## Components
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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.
### SharedElement
@@ -366,9 +364,9 @@ Check the release version information in the release address of the third-party
## Properties
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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.
#### SharedElementAnimation
diff --git a/en/react-native-step-indicator.md b/en/react-native-step-indicator.md
index 7d4de35b85aabe91925694fa85e2c3554802f839..e67e8716e54be5eaa4e061ceb3369d26d0beb9cf 100644
--- a/en/react-native-step-indicator.md
+++ b/en/react-native-step-indicator.md
@@ -216,15 +216,15 @@ const styles = StyleSheet.create({
});
```
-### 在 ArkTs 侧引入和注册字体文件(非必选配置项)
+### On the ArkTs side, importing and registering font files is an optional configuration step.
-> [!TIP] 本项非必配项,当使用 customStyles 自定义Properties中的 labelFontFamily Properties指定字体时才需配置
+> [!TIP] This item is not mandatory. It only needs to be configured when using the labelFontFamily property in the customStyles to specify a custom font.
-步骤一:
-复制字体文件到 `entry/src/main/resources/rawfile/assets/assets/fonts` 目录下(如使用了外部字体文件,需要将\*.ttf 文件复制过来)
+Step 1:
+Copy the font files to the entry/src/main/resources/rawfile/assets/assets/fonts directory (if external font files are used, you need to copy the *.ttf files over).
-步骤二:
-打开 `entry/src/main/ets/pages/Index.ets`,添加以下代码
+Step 2:
+Open `entry/src/main/ets/pages/Index.ets` and add the following code:
const fonts: Record = {
"Pacifico-Regular": $rawfile("assets/assets/fonts/Pacifico-Regular.ttf")
@@ -237,8 +237,6 @@ const styles = StyleSheet.create({
build() {
Column(){
//...
-
- //注册字体文件
RNApp({
rnInstanceConfig: {
//...
diff --git a/en/react-native-switch.md b/en/react-native-switch.md
index ca2f92886e7975bebd6335c1f1c793c43f42c46f..b7313f9c1a277a7ea2d3f500891cc98099355fc4 100644
--- a/en/react-native-switch.md
+++ b/en/react-native-switch.md
@@ -114,9 +114,9 @@ This document is verified based on the following versions:
## Properties
-> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
+> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-> [!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.
+> [!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 |
| :-----------------------: | :----------------------------------------------------------: | :---------------------: | :------: | :---------: | :---------------: |
diff --git a/en/react-native-testing-library.md b/en/react-native-testing-library.md
index 6bbaa1ba8924c0d1cda96396eefff05f91b78927..ce27a16b9cf297c11b9affde6013178be4e6082d 100644
--- a/en/react-native-testing-library.md
+++ b/en/react-native-testing-library.md
@@ -1,5 +1,5 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-testing-library
@@ -13,14 +13,14 @@
-> [!TIP] [Github 地址](https://github.com/callstack/react-native-testing-library)
+> [!TIP] [GitHub address](https://github.com/callstack/react-native-testing-library)
-## 安装与使用
+## Installation and Usage
-本库需要和测试运行器一起使用,本文档以Jest测试框架作为示例演示。
+This library needs to be used in conjunction with a test runner, and this documentation demonstrates the use of the Jest testing framework as an example.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -40,15 +40,15 @@ yarn add -D @testing-library/react-native@12.5.1
-配置Jest匹配器,目前有两种配置方法:
+There are currently two methods for configuring Jest matchers:
-方法一:在jest-setup.ts中引入:
+Method One: Introduce them in jest-setup.ts:
```js
import '@testing-library/react-native/extend-expect';
```
-方法二:在jest.config.js中配置:
+Method Two: Configure in jest.config.js:
```json
{
@@ -57,9 +57,9 @@ import '@testing-library/react-native/extend-expect';
}
```
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import * as React from 'react';
@@ -120,22 +120,22 @@ test('form submits two answers', async () => {
});
});
```
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-本文档内容基于以下版本验证通过:
+This document is verified based on the following versions:
1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25;
2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71;
## API
-详细请查看 [react-native-testing-library 的文档介绍](https://callstack.github.io/react-native-testing-library/docs/api)
+For details, see [react-native-testing-library](https://callstack.github.io/react-native-testing-library/docs/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 |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
@@ -154,8 +154,7 @@ test('form submits two answers', async () => {
### screen
-> [!TIP] "\*"号表示省略了变体或者谓词部;查询接口由两部分组成:变体和谓词,它们之间由单词by分隔,例如: getBy\*是查询变体,\*ByRole是谓词;变体和谓词之间可以任意组合。
-
+> [!TIP] The "" symbol indicates the omission of either the variant or the predicate part; the query interface consists of two components: the variant and the predicate, separated by the word "by". For example, "getBy" represents a query variant, while "*ByRole" represents a predicate. The variant and predicate can be combined in any manner.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
@@ -209,10 +208,10 @@ test('form submits two answers', async () => {
| toHaveAccessibleName | This allows you to assert whether the given element has a specified accessible name. It accepts either `string` or `RegExp` matchers, as well as [text match options](https://callstack.github.io/react-native-testing-library/docs/api/queries#text-match-options) of `exact` and normalizer | function | no | All | yes |
| toHaveProp | This allows you to assert whether the given element has a given prop. When the `value` parameter is `undefined` it will only check for existence of the prop, and when `value` is defined it will check if the actual value matches passed value. | function | no | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/callstack/react-native-testing-library/blob/main/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
+This project is licensed under [The MIT License (MIT)](https://github.com/callstack/react-native-testing-library/blob/main/LICENSE).
\ No newline at end of file
diff --git a/en/react-native-text-input-mask.md b/en/react-native-text-input-mask.md
index bfbdc00ef3a824a35a688d28396583381ee85400..d1fef572b6a90b744e256c2e2edbaeafac7b3d2f 100644
--- a/en/react-native-text-input-mask.md
+++ b/en/react-native-text-input-mask.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-text-input-mask
@@ -12,16 +12,13 @@
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-text-input-mask)
-
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-text-input-mask)
-
-## 安装与使用
+## Installation and Usage
Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-text-input-mask Releases](https://github.com/react-native-oh-library/react-native-text-input-mask/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-进入到工程目录并输入以下命令:
-
+Go to the project directory and execute the following instruction:
@@ -39,113 +36,120 @@ yarn add @react-native-oh-tpl/react-native-text-input-mask
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```tsx
import React, { useState, useRef } from "react";
-import { StyleSheet, Text, View, ScrollView, Button, TextInput } from "react-native";
-import TextInputMask, { mask, unmask, setMask } from 'react-native-text-input-mask'
+import {
+ StyleSheet,
+ Text,
+ View,
+ ScrollView,
+ Button,
+ TextInput,
+} from "react-native";
+import TextInputMask, {
+ mask,
+ unmask,
+ setMask,
+} from "react-native-text-input-mask";
import { Colors } from "react-native/Libraries/NewAppScreen";
export const TextInputTest = () => {
- const [maskTest, maskValue] = useState('');
- const maskDemo = () => {
- mask("+1 ([000]) [000] [00] [00]", "13343469915", true).then(res => {
- maskValue(res)
- }).catch(err => {
- console.log('error', err)
- })
- }
-
- const [unmaskTest, unmaskValue] = useState('');
- const unmaskDemo = () => {
- unmask("+1 ([000]) [000] [00] [00]", "13343469915", true).then(res => {
- unmaskValue(res)
- }).catch(err => {
- console.log('error', err)
- })
- }
- const customNotations = [{ "character": 's', "characterSet": "$€", "isOptional": true }]
- const [onChangeTextTest_formatted, setonChangeTextValue_formatted] = useState('');
- const [onChangeTextTest_extracted, setonChangeTextValue_extracted] = useState('');
- const componentDemo = (formatted: string, extracted: string | undefined) => {
- console.log("formatted", formatted)
- setonChangeTextValue_formatted(formatted)
- console.log("extracted", extracted)
- if (extracted) {
- setonChangeTextValue_extracted(extracted)
- }
+ const [maskTest, maskValue] = useState("");
+ const maskDemo = () => {
+ mask("+1 ([000]) [000] [00] [00]", "13343469915", true)
+ .then((res) => {
+ maskValue(res);
+ })
+ .catch((err) => {
+ console.log("error", err);
+ });
+ };
+
+ const [unmaskTest, unmaskValue] = useState("");
+ const unmaskDemo = () => {
+ unmask("+1 ([000]) [000] [00] [00]", "13343469915", true)
+ .then((res) => {
+ unmaskValue(res);
+ })
+ .catch((err) => {
+ console.log("error", err);
+ });
+ };
+ const customNotations = [
+ { character: "s", characterSet: "$€", isOptional: true },
+ ];
+ const [onChangeTextTest_formatted, setonChangeTextValue_formatted] =
+ useState("");
+ const [onChangeTextTest_extracted, setonChangeTextValue_extracted] =
+ useState("");
+ const componentDemo = (formatted: string, extracted: string | undefined) => {
+ console.log("formatted", formatted);
+ setonChangeTextValue_formatted(formatted);
+ console.log("extracted", extracted);
+ if (extracted) {
+ setonChangeTextValue_extracted(extracted);
}
- return (
-
-
-
- {onChangeTextTest_formatted}
- {onChangeTextTest_extracted}
-
-
- Phone Number:
-
-
- {maskTest}
-
-
-
- Phone Number:
-
-
- {unmaskTest}
-
-
-
- );
-}
+ };
+ return (
+
+
+
+ {onChangeTextTest_formatted}
+ {onChangeTextTest_extracted}
+
+
+ Phone Number:
+
+ {maskTest}
+
+
+ Phone Number:
+
+ {unmaskTest}
+
+
+ );
+};
const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- padding: 16,
- },
- label: {
- color: Colors.white,
- fontSize: 16,
- marginBottom: 8,
- },
- input: {
- height: 40,
- color: Colors.white,
- borderColor: '#ccc',
- borderWidth: 1,
- paddingHorizontal: 8,
- },
+ container: {
+ flex: 1,
+ justifyContent: "center",
+ padding: 16,
+ },
+ label: {
+ color: Colors.white,
+ fontSize: 16,
+ marginBottom: 8,
+ },
+ input: {
+ height: 40,
+ color: Colors.white,
+ borderColor: "#ccc",
+ borderWidth: 1,
+ paddingHorizontal: 8,
+ },
});
-
```
-
## 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.json` 添加 overrides 字段
+### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project
```json
{
@@ -156,18 +160,15 @@ 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] 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": {
@@ -176,24 +177,24 @@ 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](/en/link-source-code.md).
-### 3.配置 CMakeLists 和引入 RNTextInputMaskPackage
+### 3. Configuring CMakeLists and Introducing RNTextInputMaskPackage
-打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
+Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
- ``` diff
+```diff
project(rnapp)
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_SKIP_BUILD_RPATH TRUE)
@@ -213,19 +214,19 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-text-input-mask/src/main/cpp" ./RNTextInputMask)
add_library(rnoh_app SHARED
- ${GENERATED_CPP_FILES}
- "./PackageProvider.cpp"
- "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
+ ${GENERATED_CPP_FILES}
+ "./PackageProvider.cpp"
+ "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
)
target_link_libraries(rnoh_app PUBLIC rnoh)
+ target_link_libraries(rnoh_app PUBLIC text_input_mask)
- ```
+```
-打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
+Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
-``` diff
+```diff
#include "RNOH/PackageProvider.h"
#include "generated/RNOHGeneratedPackage.h"
+ #include "RNTextInputMaskPackage.h"
@@ -238,9 +239,9 @@ target_link_libraries(rnoh_app PUBLIC rnoh)
}
```
-### 4.在 ArkTs 侧引入 RNTextInputMaskPackage
+### 4. Introducing RNTextInputMaskPackage to ArkTS
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
+Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
@@ -254,112 +255,106 @@ 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
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+### Compatibility
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-text-input-mask Releases](https://github.com/react-native-oh-library/react-native-text-input-mask/releases)
+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.
+Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-text-input-mask Releases](https://github.com/react-native-oh-library/react-native-text-input-mask/releases)
+## API
+> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
-## API
+> [!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.
-> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
+| Name | Description | Type | Platform | HarmonyOS Support |
+| ------------- | ------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- | ----------------- |
+| mask | Format a string,Return the formatted string | function | Android/iOS | yes |
+| unmask | Restore the formatted string,Return the restored string | function | Android/iOS | yes |
+| setMask | Set a listener for a component,Format the input content of a text box,Use in conjunction with the TextInputMask component | function | Android/iOS | yes |
+| TextInputMask | Text input component | component | Android/iOS | yes |
-> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
-
-| Name | Description | Type | Platform | HarmonyOS Support |
-| ------- | ---------------------- | -------- | ----------- | ----------------- |
-| mask | 字符串格式化,返回格式化后的字符串 | function | Android/iOS | yes |
-| unmask | 将格式化后的字符串还原,返回还原后的字符串 | function | Android/iOS | yes |
-| setMask | 给组件设置监听,对输入框内容进行格式化,配合TextInputMask组件使用 | function | Android/iOS | yes |
-| TextInputMask | 输入框组件 | component | Android/iOS | yes |
-
-#### mask参数说明
+#### mask
```js
mask(mask: string, value: string, autocomplete: boolean) : Promise
```
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- |
-| mask | 字符串格式化的格式 | string | yes | iOS/Android | yes |
-| value | 需要格式化的字符 | string | yes | iOS/Android | yes |
-| autocomplete | 字符自动补全 | boolean | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | ------------------------------ | ------- | -------- | ----------- | ----------------- |
+| mask | Format for string formatting | string | yes | iOS/Android | yes |
+| value | Characters to be formatted | string | yes | iOS/Android | yes |
+| autocomplete | Automatic character completion | boolean | no | iOS/Android | yes |
-#### unmask参数说明
+#### unmask
```json
unmask(mask: string, value: string, autocomplete: boolean) : Promise
```
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| mask | 字符串格式化的格式 | string | yes | iOS/Android | yes |
-| value | 需要还原的字符 | string | yes | iOS/Android | yes |
-| autocomplete | 字符自动补全 | boolean | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | ------------------------------ | ------- | -------- | ----------- | ----------------- |
+| mask | Format for string formatting | string | yes | iOS/Android | yes |
+| value | Characters to be restored | string | yes | iOS/Android | yes |
+| autocomplete | Automatic character completion | boolean | no | iOS/Android | yes |
-#### setMask参数说明
+#### setMask
```
setMask (reactNode: number, primaryFormat: string, options?: MaskOptions) : void
```
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| reactNode | 组件id | string | yes | iOS/Android | yes |
-| primaryFormat | 格式化的格式 | string | yes | iOS/Android | yes |
-| options | 格式化相关属性 | MaskOptions | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :------------ | ----------------------------- | ----------- | -------- | ----------- | ----------------- |
+| reactNode | Component ID | string | yes | iOS/Android | yes |
+| primaryFormat | Formatting format | string | yes | iOS/Android | yes |
+| options | Formatting-related properties | MaskOptions | no | iOS/Android | yes |
##### MaskOptions
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| affineFormats | 备用格式 | string[] | no | iOS/Android | yes |
-| customNotations | 自定义转义字符 | Natation[] | no | iOS/Android | yes |
-| affinityCalculationStrategy | 亲和度计算策略 | AffinityCalculationStrategy 枚举 | no | iOS/Android | yes |
-| autocomplete | 是否自动补全 | boolean | no | iOS/Android | yes |
-| autoskip | 是否自动跳过 | boolean | no | iOS/Android | yes |
-| rightToLeft | 是否从右到左格式化 | boolean | no | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------------------- | ------------------------------------ | -------------------------------- | -------- | ----------- | ----------------- |
+| affineFormats | Alternate format | string[] | no | iOS/Android | yes |
+| customNotations | Custom escape characters | Natation[] | no | iOS/Android | yes |
+| affinityCalculationStrategy | Affinity calculation strategy | AffinityCalculationStrategy 枚举 | no | iOS/Android | yes |
+| autocomplete | Whether to automatically complete | boolean | no | iOS/Android | yes |
+| autoskip | Whether to automatically skip | boolean | no | iOS/Android | yes |
+| rightToLeft | Whether to format from right to left | boolean | no | iOS/Android | yes |
##### Natation
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| character | 格式字符串中的符号。 | string | yes | iOS/Android | yes |
-| characterSet | 可接受输入字符的关联字符集。 | string | yes | iOS/Android | yes |
-| isOptional |是可选符号还是必选符号 | boolean | yes | iOS/Android | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | -------------------------------------------------------- | ------- | -------- | ----------- | ----------------- |
+| character | Symbols in the format string | string | yes | iOS/Android | yes |
+| characterSet | Associated character set for acceptable input characters | string | yes | iOS/Android | yes |
+| isOptional | Whether the symbol is optional or mandatory | boolean | yes | iOS/Android | yes |
##### AffinityCalculationStrategy
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------- | ---------------------------------------------- | ------ | -------- | ----------- | ----------------- |
-| WHOLE_STRING | 默认的计算策略 | string | no | iOS/Android | yes |
-| PREFIX | 查找原始文本和相同文本之间的最长公共前缀 | string | no | iOS/Android | yes |
-| CAPACITY | 亲和性是输入的长度和当前掩码可以容纳的文本总量之间的容差。 | string | no | iOS/Android | yes |
-| EXTRACTED_VALUE_CAPACITY | 亲和性是提取值的长度与当前掩码可以容纳的总提取值长度之间的容差。 | string | no | iOS/Android | yes |
-
-## 其他
-
-## 开源协议
-本项目基于[The MIT License(MIT)](https://github.com/react-native-text-input-mask/react-native-text-input-mask/blob/master/LICENSE) ,请自由地享受和参与开源。
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ----------- | ----------------- |
+| WHOLE_STRING | Default calculation strategy | string | no | iOS/Android | yes |
+| PREFIX | Find the longest common prefix between the original text and the identical text | string | no | iOS/Android | yes |
+| CAPACITY | Affinity is the tolerance between the length of the input and the total amount of text that the current mask can accommodate. | string | no | iOS/Android | yes |
+| EXTRACTED_VALUE_CAPACITY | Affinity is the tolerance between the length of the extracted value and the total length of extracted values that the current mask can accommodate. | string | no | iOS/Android | yes |
+## Others
+## License
+This project is licensed under[The MIT License(MIT)](https://github.com/react-native-text-input-mask/react-native-text-input-mask/blob/master/LICENSE).
diff --git a/en/react-navigation-header-buttons.md b/en/react-navigation-header-buttons.md
index 992a4246e8bcbe3d28ec1f8ca7fad6854818cfde..0ade800c1d4781d1cf440c61fe2b7788ebcfa482 100644
--- a/en/react-navigation-header-buttons.md
+++ b/en/react-navigation-header-buttons.md
@@ -33,7 +33,7 @@ npm i react-navigation-header-buttons@12.0.0
yarn add react-navigation-header-buttons@12.0.0
```
-在 tsconfig.json 文件中添加如下代码:
+Add the following code to the tsconfig. json file:
```json
"compilerOptions": {
@@ -48,7 +48,7 @@ yarn add react-navigation-header-buttons@12.0.0
```
-在 metro.config.js 文件中添加如下代码:
+Add the following code to the metro.config.js file:
```js
const config = {