-> [!TIP] [Github 地址](https://github.com/nirsky/react-native-size-matters)
+> [!TIP] [GitHub address](https://github.com/nirsky/react-native-size-matters)
-## 安装与使用
+## Installation and Usage
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -25,24 +25,25 @@
```bash
npm install react-native-size-matters@0.4.2
```
+
#### **yarn**
```bash
yarn add react-native-size-matters@0.4.2
```
+
-下面的代码展示了这个库的基本使用场景:
-> [!WARNING] 使用时 import 的库名不变。
+The following code shows the basic use scenario of the repository:
+
+> [!WARNING] The name of the imported repository remains unchanged.
**这里是该插件提供的基础用法**
```js
-
import { Text, View } from 'react-native';
import { scale, verticalScale, moderateScale, moderateVerticalScale } from 'react-native-size-matters';
-
import { s, vs, ms, mvs } from 'react-native-size-matters';
let scale = () =>{
@@ -55,7 +56,7 @@ let scale = () =>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {scale(100}
+ {scale(100)}
)
}
@@ -70,7 +71,7 @@ let verticalScale = () =>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {verticalScale(100}
+ {verticalScale(100)}
)
}
@@ -101,7 +102,7 @@ let moderateVerticalScale = ()=>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {moderateVerticalScale(100}
+ {moderateVerticalScale(100)}
)
}
@@ -116,7 +117,7 @@ let s = () =>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {s(100}
+ {s(100)}
)
}
@@ -131,7 +132,7 @@ let vs = () =>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {vs(100}
+ {vs(100)}
)
}
@@ -162,7 +163,7 @@ let mvs = ()=>{
borderColor: 'red',
backgroundColor: 'blue'
}} >
- {mvs(100}
+ {mvs(100)}
)
}
@@ -185,60 +186,65 @@ export default class sizeMattersDemo {
}
```
+
**这里提供注解用法**
+
```javascript
-import { Text, View } from 'react-native';
-import { ScaledSheet } from 'react-native-size-matters';
+import { Text, View } from "react-native";
+import { ScaledSheet } from "react-native-size-matters";
const styles = ScaledSheet.create({
- container: {
- width: '100@s', // = scale(100)
- height: '200@vs', // = verticalScale(200)
- padding: '2@msr', // = Math.round(moderateScale(2))
- margin: 5
- }
+ container: {
+ width: "100@s", // = scale(100)
+ height: "200@vs", // = verticalScale(200)
+ padding: "2@msr", // = Math.round(moderateScale(2))
+ margin: 5,
+ },
});
export default class sizeMattersDemo {
render() {
return (
-
- 调用create方法
-
+
+ create
+
);
}
}
```
- [!TIP] 这里展示[自定义默认尺寸](https://github.com/nirsky/react-native-size-matters/blob/master/examples/change-guideline-sizes.md)
-## 约束与限制
-### 兼容性
-本文档内容基于以下版本验证通过:
+[!TIP] Here is displayed[Custom Default Size](https://github.com/nirsky/react-native-size-matters/blob/master/examples/change-guideline-sizes.md)
+
+## 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.400; 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 |
-| ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------- | ----------- | -------- |
-| scale | 将根据您设备的屏幕宽度返回所提供尺寸的线性缩放结果。 | Function | No | Android、iOS | Yes |
-| verticalScale | 将根据您设备的屏幕高度返回所提供尺寸的线性缩放结果。 | Function | No | Android、iOS | Yes |
-| moderateScale | 有时您不想以线性方式缩放所有内容,这时可以使用 moderateScale。它的妙处在于您可以控制调整大小的因子(默认值为 0.5)。如果正常缩放会将您的尺寸增加 +2X,则 moderateScale 只会将其增加 +X | Function | No | Android、iOS | Yes |
-| moderateVerticalScale | 与 moderateScale 相同,但使用 verticalScale 而不是 scale。 | Function | No | Android、iOS | Yes |
-| s | scale方法的别名 | Function | No | Android、iOS | Yes |
-| vs | verticalScale方法的别名 | Function | No | Android、iOS | Yes |
-| ms | moderateScale别名方法 | Function | No | Android、iOS | Yes |
-| mvs | moderateVerticalScale的别名方法 | Function | No | Android、iOS | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ------------ | ----------------- |
+| scale | 将根据您设备的屏幕宽度返回所提供尺寸的线性缩放结果。 | Function | No | Android、iOS | Yes |
+| verticalScale | 将根据您设备的屏幕高度返回所提供尺寸的线性缩放结果。 | Function | No | Android、iOS | Yes |
+| moderateScale | 有时您不想以线性方式缩放所有内容,这时可以使用 moderateScale。它的妙处在于您可以控制调整大小的因子(默认值为 0.5)。如果正常缩放会将您的尺寸增加 +2X,则 moderateScale 只会将其增加 +X | Function | No | Android、iOS | Yes |
+| moderateVerticalScale | 与 moderateScale 相同,但使用 verticalScale 而不是 scale。 | Function | No | Android、iOS | Yes |
+| s | scale 方法的别名 | Function | No | Android、iOS | Yes |
+| vs | verticalScale 方法的别名 | Function | No | Android、iOS | Yes |
+| ms | moderateScale 别名方法 | Function | No | Android、iOS | Yes |
+| mvs | moderateVerticalScale 的别名方法 | Function | No | Android、iOS | Yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License(MIT)](https://github.com/nirsky/react-native-size-matters/blob/master/LICENSE) ,请自由地享受和参与开源。
+This project is licensed under [The MIT License(MIT)](https://github.com/nirsky/react-native-size-matters/blob/master/LICENSE).
--
Gitee
From 26ee81bbab7b3f69a571d9aca40b22f859010131 Mon Sep 17 00:00:00 2001
From: lizhien52O
Date: Wed, 6 Nov 2024 16:13:34 +0800
Subject: [PATCH 2/5] docs: [Issues: #IB117J] react-native-root-toast.md
---
en/react-native-root-toast.md | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/en/react-native-root-toast.md b/en/react-native-root-toast.md
index f9f57bc5..2885b23f 100644
--- a/en/react-native-root-toast.md
+++ b/en/react-native-root-toast.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-root-toast
@@ -13,11 +13,11 @@
-> [!TIP] [Github 地址](https://github.com/magicismight/react-native-root-toast)
+> [!TIP] [GitHub address](https://github.com/magicismight/react-native-root-toast)
-## 安装与使用
+## Installation and Usage
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
@@ -35,7 +35,7 @@ yarn add react-native-root-toast@3.5.1
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
```js
import React, { useState } from "react";
@@ -55,7 +55,7 @@ import Toast from "react-native-root-toast";
export function ReactNativeRootToastExample() {
let PToast: any = null;
function startPToast() {
- PToast = Toast.show("超长待机弹窗实例", {
+ PToast = Toast.show("Ultra Long standby pop-up instance", {
duration: 99999999,
position: 20,
shadow: true,
@@ -74,27 +74,27 @@ export function ReactNativeRootToastExample() {
}
return (
-
-
+
+
);
}
```
-## 约束与限制
+## Constraints
-### 兼容性
+### Compatibility
-本文档内容基于以下版本验证通过:
+This document is verified based on the following versions:
1. RNOH: 0.72.20-CAPI; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18;
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.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| --------------- | ------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
@@ -114,10 +114,10 @@ export function ReactNativeRootToastExample() {
| onHide | Callback for toast`s hide animation start | function | no | All | yes |
| onHidden | Callback for toast`s hide animation end | function | no | All | yes |
-## 遗留问题
+## Known Issues
-## 其他
+## Others
-## 开源协议
+## License
-本项目基于 [The MIT License (MIT)](https://github.com/magicismight/react-native-root-toast/blob/master/LICENSE.txt) ,请自由地享受和参与开源。
\ No newline at end of file
+This project is licensed under [The MIT License (MIT)](https://github.com/magicismight/react-native-root-toast/blob/master/LICENSE.txt).
\ No newline at end of file
--
Gitee
From 896ca8a798cb35ce07bf1524a8f56fe77332e6a8 Mon Sep 17 00:00:00 2001
From: lizhien52O
Date: Wed, 6 Nov 2024 16:13:46 +0800
Subject: [PATCH 3/5] docs: [Issues: #IB117J] react-native-mlkit-ocr.md
---
en/react-native-mlkit-ocr.md | 102 ++++++++++++++++-------------------
1 file changed, 47 insertions(+), 55 deletions(-)
diff --git a/en/react-native-mlkit-ocr.md b/en/react-native-mlkit-ocr.md
index 55d6e930..4df5bdba 100644
--- a/en/react-native-mlkit-ocr.md
+++ b/en/react-native-mlkit-ocr.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.2.2
+> Template version: v0.2.2
react-native-mlkit-ocr
@@ -12,15 +12,15 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-mlkit-ocr)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-mlkit-ocr)
-## 安装与使用
+## Installation and Usage
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/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-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/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 (#).
@@ -38,9 +38,9 @@ yarn add @react-native-oh-tpl/react-native-mlkit-ocr@file:#
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import * as React from 'react';
@@ -108,7 +108,7 @@ export const OcrTest = () => {
)}