Skip to content

docs(cndocs): sync gap/translate percentage, Platform isDisableAnimations, LayoutAnimation - #1047

Merged
sunnylqm merged 2 commits into
productionfrom
auto-translate-20261012
Oct 12, 2026
Merged

sunnylqm merged 2 commits into
productionfrom
auto-translate-20261012

Conversation

@sunnylqm

@sunnylqm sunnylqm commented Oct 11, 2026 •

Copy link
Copy Markdown

翻译同步(2026-10-12)

上游合并:facebook/react-native-website main → production(含 gap/transform 百分比支持、Platform isDisableAnimations、LayoutAnimation 说明重写、Animated SnackPlayer 平台标注;另有 dependabot 依赖 bump)。

翻译文件(6 个,均有真实漂移)

  • layout-props.md:columnGap / gap / rowGap 改为"接受数值(点)或百分比字符串,新架构支持百分比",类型表 number → number, string
  • flexbox.md:gap 段落追加百分比支持说明
  • transforms.md:新增 translate 百分比段落(相对元素宽/高);类型表 translateX/Y: number → number | string
  • platform.md:constants 表新增 isDisableAnimations 行;新增 isDisableAnimations 小节(含 isTesting 回退、Android 系统属性说明)
  • layoutanimation.md:Android 说明改写为 :::note——旧架构需 UIManager 手动启用(全局一次即可),新架构自动启用(no-op)
  • animated.md:SnackPlayer 增加 supportedPlatforms=ios,android

百分比相关链接统一用 [新架构](/architecture/landing-page)(与 textinput.md 等现有 CN 译法一致),未照搬 EN 的 [New Architecture] 英文写法。

colors.md 为误报:上游仅拼写修正(same like → same as),CN 译文"与……一致"已涵盖,无需改动。

website/ → cnwebsite/ 配置同步

  • cnwebsite/package.json:docusaurus-plugin-sass ^0.2.6→^0.2.7、@prettier/plugin-oxc ^0.2.2→^0.2.3、@types/react 19.2.17→19.2.18、sass 1.102.0→1.105.1
  • 其余差异(homepage、scripts、stylelint 相关)均为 CN 特有配置,保持不动
  • root package.json 的 eslint/typescript-eslint 调整不影响 cnwebsite(无对应字段)

验证

  • yarn build(cnwebsite)通过,175s;仅存 linking/appregistry 历史 HTML minifier 警告,与本次改动无关
  • layout-props / platform 章节顺序与 EN 对齐;transforms 类型表与 EN 逐字一致

本次无 Expo 相关内容,无需处理不 promote Expo 差异点。


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Documentation
    • Clarified that the SnackPlayer example supports iOS and Android.
    • Updated layout documentation in Chinese and documented numeric and percentage values for gaps and translations, including New Architecture support.
    • Clarified that Android layout animations are automatically enabled in the New Architecture, where the setup method has no effect; the method applies only to the Legacy Architecture.
    • Documented the animation-disable setting, its default behavior, and how to configure it on Android.

…leAnimations, LayoutAnimation admonition

- layout-props: columnGap/gap/rowGap accept numbers or percentage strings (New Architecture)
- flexbox: gap percentage note; transforms: translateX/translateY number|string + percentage paragraph
- platform: add isDisableAnimations constant + section
- layoutanimation: Android Legacy vs New Architecture admonition
- animated: SnackPlayer supportedPlatforms=ios,android
- cnwebsite: bump docusaurus-plugin-sass 0.2.7, plugin-oxc 0.2.3, @types/react 19.2.18, sass 1.105.1
@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for reactnativecn failed. Why did it fail? →

Name Link
🔨 Latest commit f60b430
🔍 Latest deploy log https://app.netlify.com/projects/reactnativecn/deploys/6acc5e7754904400080c58bc

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4f29a7f-6659-4ce9-aa48-09568cc7fef7

📥 Commits

Reviewing files that changed from the base of the PR and between 9839eb5 and f60b430.


📒 Files selected for processing (1)
  • cndocs/layout-props.md

🚧 Files skipped from review as they are similar to previous changes (1)
  • cndocs/layout-props.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.



📝 Walkthrough

Walkthrough

Documentation changes add platform and animation details, describe percentage values for layout and transforms, and translate layout property descriptions into Chinese. The website package manifest updates four dependency ranges.

Changes

Documentation updates

Layer / File(s) Summary
Translate and update layout property reference
cndocs/layout-props.md
The layout property reference is translated into Chinese. The gap properties also document point values and percentage strings, with percentage support noted for the New Architecture.
Document percentage values for layout and transforms
cndocs/flexbox.md, cndocs/transforms.md
The documentation describes point values and percentage strings for gap and translation properties. It notes New Architecture support for percentage values.
Document animation settings and platform properties
cndocs/layoutanimation.md, cndocs/platform.md
The documentation scopes the Android layout animation flag to the Legacy Architecture and describes New Architecture behavior. It also documents isDisableAnimations and its fallback behavior.
Declare SnackPlayer platforms
cndocs/animated.md
The SnackPlayer declaration lists iOS and Android as supported platforms.

Website dependencies

Layer / File(s) Summary
Update website dependency ranges
cnwebsite/package.json
The package manifest updates the ranges for docusaurus-plugin-sass, @prettier/plugin-oxc, @types/react, and sass.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other


Merge Risk: ⚪ Minimal · up to f60b4

No actionable issue is established for the documentation and website updates; they are mergeable subject to normal checks.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the main documentation updates for gap and translate percentage support, Platform.isDisableAnimations, and LayoutAnimation. It is concise and related to the changeset.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

- 78 个属性段描述译为中文,术语与 flexbox.md 等已译文档保持一致
- 代码块、属性名/值、枚举、类型表、URL、锚点保留英文原文
@sunnylqm
sunnylqm merged commit 66ce9f0 into production Oct 12, 2026
1 of 5 checks passed
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