Skip to content

Commit bf96faf

Browse files
authored
docs(cndocs): sync translated API docs (#1026)
1 parent 393aec7 commit bf96faf

9 files changed

Lines changed: 17 additions & 15 deletions

File tree

cndocs/appstate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ AppState 通常在处理推送通知的时候用来决定内容和对应的行
1313
- `background` - 应用正在后台运行。用户可能面对以下几种情况:
1414
- 在别的应用中
1515
- 停留在桌面
16-
- [Android] 处在另一个 `Activity`(即便是由你的应用拉起的
16+
- [Android] 处在另一个 `Activity`,包括临时的系统 Activity,例如自动填充凭据选择器(即便是由你的应用或系统启动的
1717
- [iOS] `inactive` - 此状态表示应用正在前后台的切换过程中,或是处在系统的多任务视图、通知中心,又或是处在来电状态中。
1818

1919
要了解更多信息,可以阅读 [Apple 的文档](https://developer.apple.com/documentation/uikit/app_and_scenes/managing_your_app_s_life_cycle)

cndocs/element-nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default ViewWithRefs;
115115
- [`nodeType`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeType)
116116
- [`nodeValue`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeValue)
117117
- [`ownerDocument`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/ownerDocument)
118-
- ℹ️ 将返回渲染此组件的[文档实例](/docs/next/document-instances)
118+
- ℹ️ 将返回渲染此组件的[文档节点](/docs/next/document-nodes)
119119
- [`parentElement`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentElement)
120120
- [`parentNode`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentNode)
121121
- [`previousSibling`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/previousSibling)

cndocs/legacy/native-modules-ios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ RCT_EXPORT_METHOD(doSomethingExpensive:(NSString *)param callback:(RCTResponseSe
551551

552552
```
553553
554-
:::info 在模块之间共享调度队列
554+
:::info[在模块之间共享调度队列]
555555
`methodQueue` 方法会在模块初始化时调用一次,然后由 React Native 保留,因此你自己不需要保留对该队列的引用,除非你希望在模块中使用它。但是,如果你希望在多个模块之间共享同一个队列,那么你需要确保为每个模块保留并返回相同的队列实例。
556556
:::
557557

cndocs/signed-apk-android.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ MYAPP_UPLOAD_KEY_PASSWORD=*****
6565

6666
上面的这些会作为全局 Gradle 变量,在后面的步骤中可以用来给应用签名。
6767

68-
:::note 关于使用 git 的说明
68+
:::note[关于使用 git 的说明]
6969
将上述 Gradle 变量保存在 `~/.gradle/gradle.properties` 而非 `android/gradle.properties` 中,可以防止它们被提交到 git。你可能需要先在用户主目录下创建 `~/.gradle/gradle.properties` 文件。
7070
:::
7171

72-
:::note 关于安全性的说明
72+
:::note[关于安全性的说明]
7373
如果你不想以明文方式保存密码,且你使用的是 macOS 系统,你也可以把密码[保存到钥匙串(Keychain)中](https://pilloxa.gitlab.io/posts/safer-passwords-in-gradle/)。这样一来你就可以省略掉 `~/.gradle/gradle.properties` 中的后两行。
7474
:::
7575

@@ -174,7 +174,7 @@ android {
174174

175175
Proguard 是一个 Java 字节码混淆压缩工具,它可以移除掉 React Native Java(和它的依赖库中)未被使用到的部分,从而有效地减少 APK 的大小。
176176

177-
:::caution 重要
177+
:::caution[重要]
178178
启用 Proguard 之后,你必须再次全面地测试你的应用。Proguard 有时候需要为你引入的每个原生库做一些额外的配置。参见`app/proguard-rules.pro`文件。
179179
:::
180180

cndocs/text-nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default TextWithRefs;
7373
- [`nodeType`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeType)
7474
- [`nodeValue`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeValue)
7575
- [`ownerDocument`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/ownerDocument)
76-
- ℹ️ 将返回渲染此组件的[文档实例](/docs/next/document-instances)
76+
- ℹ️ 将返回渲染此组件的[文档节点](/docs/next/document-nodes)
7777
- [`parentElement`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentElement)
7878
- [`parentNode`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentNode)
7979
- [`previousSibling`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/previousSibling)

cndocs/text-style-props.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@ iOS 上支持通用字体族 `system-ui`、`ui-sans-serif`、`ui-serif`、`ui-mo
859859

860860
### `textAlignVertical` <div className="label android">Android</div>
861861

862+
`verticalAlign` 样式属性的别名;如果同时使用这两个属性,`verticalAlign` 将优先于 `textAlignVertical`
863+
862864
| 类型 | 默认值 |
863865
| ----------------------------------------------- | -------- |
864866
| enum(`'auto'`, `'top'`, `'bottom'`, `'center'`) | `'auto'` |

cndocs/the-new-architecture/pure-cxx-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default TurboModuleRegistry.getEnforcing<Spec>(
7272

7373
## 2. Configure Codegen
7474

75-
The next step is to configure [Codegen](what-is-codegen.md) in your `package.json`. Update the file to include:
75+
The next step is to configure [Codegen](what-is-codegen.mdx) in your `package.json`. Update the file to include:
7676

7777
```json title="package.json"
7878
"start": "react-native start",

cndocs/timers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ title: 定时器
1212
- setImmediate, clearImmediate
1313
- requestAnimationFrame, cancelAnimationFrame
1414

15-
`requestAnimationFrame(fn)``setTimeout(fn, 0)`不同,前者会在每帧刷新之后执行一次,而后者则会尽可能快的执行(在 iPhone5S 上有可能每秒 1000 次以上)。
15+
`requestAnimationFrame(fn)``setTimeout(fn, 0)`不同,前者会在每帧刷新之后执行一次,而后者则会尽可能快地执行(在 iPhone 5S 上有可能每秒 1000 次以上)。
1616

1717
`setImmediate`则会在当前 JavaScript 执行块结束的时候执行,就在将要发送批量响应数据到原生之前。注意如果你在`setImmediate`的回调函数中又执行了`setImmediate`,它会紧接着立刻执行,而不会在调用之前等待原生代码。
1818

1919
`Promise`的实现就使用了`setImmediate`来执行异步调用。
2020

2121
:::note
2222
在 Android 上调试时,如果调试器和设备之间的时间出现偏差,动画、事件行为等可能无法正常工作,或者结果可能不准确。
23-
请在调试器机器上运行 ``adb shell \"date `date +%m%d%H%M%Y.%S%3N`\"`` 来纠正此问题。在真实设备上使用需要 root 权限。
23+
请在调试器机器上运行 ``adb shell "date `date +%m%d%H%M%Y.%S%3N`"`` 来纠正此问题。在真实设备上使用需要 root 权限。
2424
:::
2525

2626
## InteractionManager

cndocs/usecolorscheme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ title: useColorScheme
77
import {useColorScheme} from 'react-native';
88
```
99

10-
`useColorScheme` 这个React hook 提供并订阅来自Appearance模块的颜色方案更新。返回值表示当前用户首选的颜色方案。该值可以稍后通过直接用户动作(例如,设备设置中的主题选择)或根据时间表(例如,遵循白天/夜晚周期的亮主题和暗主题)来更新。
10+
`useColorScheme` 这个 React Hook 提供并订阅来自 [`Appearance`](appearance) 模块的颜色方案更新。返回值表示当前生效的颜色方案。该值可以稍后通过直接用户动作(例如,设备设置中的主题选择,或通过 [`setColorScheme`](appearance#setcolorscheme) 在应用级别选择的用户界面样式)或根据时间表(例如,遵循白天/夜晚周期的亮色和暗色主题)来更新。
1111

12-
### 支持的颜色方案
12+
### 返回值
1313

14-
- `"light"`: 用户倾向于使用浅色主题
15-
- `"dark"`: 用户倾向于使用深色主题
16-
- `null`: 用户未指定首选颜色方案
14+
- `'light'`: 已应用亮色方案
15+
- `'dark'`: 已应用暗色方案
16+
- `null`: 如果原生 Appearance 模块不可用,则可能返回该值
1717

1818
---
1919

0 commit comments

Comments
 (0)