Skip to content

docs(cndocs): sync outdated translations batch 2026-04-17#1013

Open
sunnylqm wants to merge 3 commits intoproductionfrom
auto-translate-20260417
Open

docs(cndocs): sync outdated translations batch 2026-04-17#1013
sunnylqm wants to merge 3 commits intoproductionfrom
auto-translate-20260417

Conversation

@sunnylqm
Copy link
Copy Markdown

@sunnylqm sunnylqm commented Apr 17, 2026

Summary

  • sync 11 outdated Chinese docs flagged by scripts/sync-translations.sh
  • update removed-component stubs, doc links, markdown structure, and code samples
  • skip verified false positives / intentional divergence such as getting-started

Updated docs

  • alertios
  • asyncstorage
  • fabric-native-components-android
  • gesture-responder-system
  • legacy/native-components-android
  • legacy/native-modules-intro
  • out-of-tree-platforms
  • strict-typescript-api
  • turbo-native-modules-android
  • using-a-listview
  • using-a-scrollview

Notes

  • candidate discovery is timestamp-based against production, so some files remained false positives after manual verification
  • getting-started was intentionally left unchanged because CN docs should not be rewritten into Expo-first guidance

Validation

  • verified each candidate manually against docs/* vs cndocs/*
  • checked git diff --stat and file-level diffs
  • staged only intended cndocs/* files

Summary by CodeRabbit

  • Documentation
    • Updated and clarified many guides (gesture responder, native modules intro, legacy native components) with reorganized headings and improved wording.
    • Adjusted multiple page titles and status labels to make deprecation/removed status clearer.
    • Reorganized out-of-tree platform listings into Partner and Community sections and updated entries.
    • Standardized and cleaned up code examples and snippets; fixed example exports.
    • Embedded videos now load from local paths for more reliable playback.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5701bc2b-fb55-4ea9-9816-cd904de2dbb0

📥 Commits

Reviewing files that changed from the base of the PR and between 0163d47 and 1a32316.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • cndocs/legacy/native-components-android.md
✅ Files skipped from review due to trivial changes (1)
  • cndocs/legacy/native-components-android.md

📝 Walkthrough

Walkthrough

This PR makes documentation-only edits across multiple Chinese docs: updates frontmatter titles and admonitions, rewords and restructures sections, reformats code examples (including Kotlin/Java snippets), replaces external video sources with local assets, and reorganizes platform listings. No runtime code changes.

Changes

Cohort / File(s) Summary
Deprecation titles & admonitions
cndocs/alertios.md, cndocs/asyncstorage.md
Prefixed page titles with ❌ for deprecated APIs; adjusted AsyncStorage admonition label syntax.
Fabric native components (Android)
cndocs/fabric-native-components-android.md, Demo/android/src/main/java/com/webview/...
Tweaked page title and prose; updated Kotlin enum syntax (success(), error()success, error;); changed sample package base class (TurboReactPackageBaseReactPackage) and ReactModuleInfoProvider#get()getReactModuleInfos(); adjusted Kotlin named-args and code path.
Gesture responder & native-modules intro
cndocs/gesture-responder-system.md, cndocs/legacy/native-modules-intro.md
Reworded explanations and headings, changed callback signature formatting to terse arrow form, and clarified NativeModule framing and examples.
Out-of-tree platforms
cndocs/out-of-tree-platforms.md
Reorganized listings into “合作伙伴项目” and “社区项目”, removed some entries, added/updated partner/community entries and repo links, and clarified JSON field descriptions.
Legacy native components & list/scroll examples
cndocs/legacy/native-components-android.md, cndocs/using-a-listview.md, cndocs/using-a-scrollview.md
Adjusted heading levels and anchors; reformatted imports/JSX and example code (export style, semicolons, keyExtractor, multi-line props); minor whitespace/formatting tweaks.
Minor technical & media updates
cndocs/strict-typescript-api.md, cndocs/turbo-native-modules-android.md
Replaced raw markdown link with imported RNRepoLink component; switched embedded video sources from external CDN to local /docs/assets/... files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through docs with nimble feet,
Titles trimmed, examples neat and sweet.
Videos brought home, enums lined in rows,
Headings settled where clarity grows.
nibbles a carrot, then binkies on tiptoe

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: syncing outdated Chinese translations with a specific date, which aligns with the 11 updated documentation files in cndocs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auto-translate-20260417

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
cndocs/gesture-responder-system.md (1)

27-28: Polish inline callback signatures by removing trailing commas

These inline examples read cleaner without the trailing , and are less likely to be interpreted as mandatory syntax in all contexts.

Suggested doc tweak
-- `View.props.onStartShouldSetResponder: evt => true,` - 这个 View 是否希望在触摸开始时成为响应者?
-- `View.props.onMoveShouldSetResponder: evt => true,` - 当这个 View 还不是响应者时,每次触摸在其上移动都会调用此函数:这个 View 是否想要“接管”触摸响应?
+- `View.props.onStartShouldSetResponder: evt => true` - 这个 View 是否希望在触摸开始时成为响应者?
+- `View.props.onMoveShouldSetResponder: evt => true` - 当这个 View 还不是响应者时,每次触摸在其上移动都会调用此函数:这个 View 是否想要“接管”触摸响应?

-- `View.props.onStartShouldSetResponderCapture: evt => true,`
-- `View.props.onMoveShouldSetResponderCapture: evt => true,`
+- `View.props.onStartShouldSetResponderCapture: evt => true`
+- `View.props.onMoveShouldSetResponderCapture: evt => true`

Also applies to: 61-62

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cndocs/gesture-responder-system.md` around lines 27 - 28, Remove the trailing
commas from the inline callback examples so the signatures read without a
trailing ","; update the occurrences for View.props.onStartShouldSetResponder
and View.props.onMoveShouldSetResponder (and the similar examples at the other
mentioned spots) to use `evt => true` instead of `evt => true,`, ensuring the
docs show the cleaner callback signature format.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cndocs/fabric-native-components-android.md`:
- Line 3: The page title string "Fabric 原生模块:Android" is misleading; change it
to "Fabric 原生组件:Android" so the title matches the body about Fabric Native
Components (ViewManager, codegenNativeComponent, ReactWebViewManager). Update
the YAML/front-matter title value and any top-level heading that repeats "原生模块"
to "原生组件" to keep consistency across the document.

In `@cndocs/legacy/native-components-android.md`:
- Around line 294-310: The snippet uses requireNativeComponent but doesn't
import it; update the import to bring requireNativeComponent from 'react-native'
so RCTMyCustomView can be resolved—modify the top import (where React and
useCallback are imported) to also import requireNativeComponent, then ensure
RCTMyCustomView = requireNativeComponent('RCTMyCustomView') remains unchanged
and MyCustomView continues to use the onChange callback as shown.

In `@cndocs/out-of-tree-platforms.md`:
- Line 26: 将句子中的时间副词改为更准确的完成时表达:把“从 React Native 0.57 开始,你现在可以通过 React Native 的
JavaScript 打包器 Metro 注册你的 React Native 平台”改为“自 React Native 0.57 起已支持通过 Metro
注册自定义平台”,并保留后半句对 `npx react-native bundle` 和 `.example.js` 后缀的说明(确保提到 Metro、`npx
react-native bundle` 和 `.example.js` 以便定位上下文)。
- Line 22:
把“即将到来的重新架构(Fabric)”这一表述改为中性且与事实一致的描述,例如将句子替换为“新的架构(Fabric)旨在让平台维护更容易”或类似措辞;在文件中查找原句“即将到来的重新架构([Fabric](/blog/2018/06/14/state-of-react-native-2018))的目标之一,就是让平台维护变得更容易”并用中性表述替换,确保语义不暗示尚未落地。

---

Nitpick comments:
In `@cndocs/gesture-responder-system.md`:
- Around line 27-28: Remove the trailing commas from the inline callback
examples so the signatures read without a trailing ","; update the occurrences
for View.props.onStartShouldSetResponder and View.props.onMoveShouldSetResponder
(and the similar examples at the other mentioned spots) to use `evt => true`
instead of `evt => true,`, ensuring the docs show the cleaner callback signature
format.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 802c5730-a4ea-4b77-96f4-0b633270dc87

📥 Commits

Reviewing files that changed from the base of the PR and between 1b9b452 and d025d4f.

📒 Files selected for processing (11)
  • cndocs/alertios.md
  • cndocs/asyncstorage.md
  • cndocs/fabric-native-components-android.md
  • cndocs/gesture-responder-system.md
  • cndocs/legacy/native-components-android.md
  • cndocs/legacy/native-modules-intro.md
  • cndocs/out-of-tree-platforms.md
  • cndocs/strict-typescript-api.md
  • cndocs/turbo-native-modules-android.md
  • cndocs/using-a-listview.md
  • cndocs/using-a-scrollview.md

---
id: fabric-native-components-android
title: 'Fabric 原生 UI 组件:Android'
title: 'Fabric 原生模块:Android'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

页面标题与正文主题不一致。

当前标题写成“原生模块”,但正文全篇是在讲 Fabric Native Components(ViewManagercodegenNativeComponentReactWebViewManager)。建议改回“原生组件”,避免读者误解页面范围。

✏️ 建议修改
-title: 'Fabric 原生模块:Android'
+title: 'Fabric 原生组件:Android'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title: 'Fabric 原生模块:Android'
title: 'Fabric 原生组件:Android'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cndocs/fabric-native-components-android.md` at line 3, The page title string
"Fabric 原生模块:Android" is misleading; change it to "Fabric 原生组件:Android" so the
title matches the body about Fabric Native Components (ViewManager,
codegenNativeComponent, ReactWebViewManager). Update the YAML/front-matter title
value and any top-level heading that repeats "原生模块" to "原生组件" to keep
consistency across the document.

Comment thread cndocs/legacy/native-components-android.md
Comment thread cndocs/out-of-tree-platforms.md Outdated
Comment thread cndocs/out-of-tree-platforms.md Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 3 file(s) based on 4 unresolved review comments.

Files modified:

  • cndocs/fabric-native-components-android.md
  • cndocs/legacy/native-components-android.md
  • cndocs/out-of-tree-platforms.md

Commit: 0163d476808400ac22c33b00c79609fee7067652

The changes have been pushed to the auto-translate-20260417 branch.

Time taken: 6m 54s

Fixed 3 file(s) based on 4 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cndocs/legacy/native-components-android.md`:
- Line 866: 链接片段 `#imageview-example` 与页面上对应的标题 ID 不匹配,导致页内跳转失效;在文档中找到引用该片段的文本(含
`#imageview-example` 的链接)并修复:要么在对应的 “ImageView 示例” 标题上添加显式锚点 ID(例如 将标题改为 `###
ImageView 示例 {`#imageview-example`}` 或等效语法),要么将链接改为匹配现有标题生成的实际片段(例如
`#imageview`),并确保在文档中更新所有对此片段的引用(检查出现 `@ReactProp` 的示例段落附近的标题名称和链接)。
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba1c1f4b-00b4-4fa9-aefe-1c1fff77e885

📥 Commits

Reviewing files that changed from the base of the PR and between d025d4f and 0163d47.

📒 Files selected for processing (3)
  • cndocs/fabric-native-components-android.md
  • cndocs/legacy/native-components-android.md
  • cndocs/out-of-tree-platforms.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • cndocs/fabric-native-components-android.md
  • cndocs/out-of-tree-platforms.md

Comment thread cndocs/legacy/native-components-android.md
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 18, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 2 file(s) based on 1 unresolved review comment.

Files modified:

  • cndocs/legacy/native-components-android.md
  • yarn.lock

Commit: 1a3231684ea5f37e77dac42f1db5a4b9e80696e5

The changes have been pushed to the auto-translate-20260417 branch.

Time taken: 6m 38s

Fixed 2 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant