Skip to content

Conversation

@Yx0201
Copy link
Contributor

@Yx0201 Yx0201 commented Jan 4, 2026

🤔 This is a ...

  • 🐞 Bug fix
  • [x ] 🌐 Internationalization

🔗 Related Issues

  • N/A (This is a direct fix for an incorrect code example in the documentation.)

💡 Background and Solution

  • Background: The documentation examples for XProvider in both Chinese (index.zh-CN.md) and English (index.en-US.md) contained an incorrect syntax in the JSX code block for the locale prop: {...zhCN_X,..zhCN}. This syntax is invalid JavaScript/TypeScript due to the double dot .. before zhCN.
  • Solution: Corrected the syntax to {...zhCN_X, ...zhCN} in both affected documentation files. This ensures the object spread syntax is valid and accurately demonstrates how to merge locale configurations from @ant-design/x and antd.

📝 Change Log

Language Changelog
🇺🇸 English Fixed an incorrect code example in the XProvider documentation regarding locale configuration.
🇨🇳 Chinese 修复了 XProvider 文档中关于国际化设置配置的错误代码示例。

Summary by CodeRabbit

Bug Fixes

  • 修复了国际化配置文件中的语法错误,确保locale对象正确合并和应用。

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

Prepare preview

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

修复XProvider文档中的展开语法错误,将..zhCN更正为...zhCN,确保locale对象正确合并。涉及中英文两份文档文件。

Changes

内聚组件 / 文件 变更摘要
XProvider文档更正
packages/x/components/x-provider/index.en-US.md, packages/x/components/x-provider/index.zh-CN.md
修复展开操作符语法:将..zhCN(双点)更正为...zhCN(三点),使zhCN_XzhCN的locale对象能正确合并

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 文档里的小差错,
两个点儿三个点,
展开合并这回对,
XProvider美滋滋!
语法修复小魔法 ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9d8999 and 64fe846.

📒 Files selected for processing (2)
  • packages/x/components/x-provider/index.en-US.md
  • packages/x/components/x-provider/index.zh-CN.md
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: afc163
Repo: ant-design/x PR: 0
File: :0-0
Timestamp: 2025-04-11T14:47:09.527Z
Learning: 当评审 ant-design/x 仓库中的 PR 时,需要用中文回复中文评论。该项目的文档支持中英双语。
Learnt from: afc163
Repo: ant-design/x PR: 0
File: :0-0
Timestamp: 2025-04-11T14:47:09.527Z
Learning: 当评审 ant-design/x 仓库中的 PR 时,需要用中文回复中文评论。该项目的文档支持中英双语。
📚 Learning: 2025-04-11T14:47:09.527Z
Learnt from: afc163
Repo: ant-design/x PR: 0
File: :0-0
Timestamp: 2025-04-11T14:47:09.527Z
Learning: 当评审 ant-design/x 仓库中的 PR 时,需要用中文回复中文评论。该项目的文档支持中英双语。

Applied to files:

  • packages/x/components/x-provider/index.en-US.md
  • packages/x/components/x-provider/index.zh-CN.md
🔇 Additional comments (2)
packages/x/components/x-provider/index.zh-CN.md (1)

56-56: ✅ 展开语法修复正确

文档示例中的对象展开语法已正确修正为 {...zhCN_X,...zhCN},使用有效的三点展开运算符。这个改动确保示例代码的语法有效且正确演示了如何合并来自 @ant-design/xantd 的国际化配置。

packages/x/components/x-provider/index.en-US.md (1)

51-51: ✅ 展开语法修复正确

文档示例中的对象展开语法已正确修正为 {...zhCN_X,...zhCN},与中文文档保持一致。示例代码现在演示了正确的 JavaScript/TypeScript 语法,用于合并国际化配置对象。


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.

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Jan 4, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Yx0201, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a minor but important bug in the documentation examples for the XProvider component. It rectifies an invalid JavaScript/TypeScript object spread syntax used in the locale prop, ensuring that the provided code snippets accurately demonstrate how to merge locale configurations from @ant-design/x and antd. The correction has been applied consistently across both English and Chinese documentation files, improving the reliability and correctness of the usage examples.

Highlights

  • Documentation Fix: Corrected an invalid object spread syntax in the XProvider component's locale prop example within the documentation.
  • Syntax Correction: The incorrect ..zhCN syntax was updated to the valid ...zhCN for merging locale configurations.
  • Multi-language Update: The fix was applied to both the English (index.en-US.md) and Chinese (index.zh-CN.md) versions of the documentation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a syntax error in the code examples for XProvider in both the English and Chinese documentation files. The invalid .. operator is replaced with the correct spread syntax .... My review includes a couple of minor suggestions to further improve the code style in these examples by adding a space after the comma for better readability, which is a common convention and consistent with other code in the repository.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 4, 2026
@kimteayon kimteayon changed the title fix: Modified the error in writing the extension budget symbol in mar… docs: Modified the error in writing the extension budget symbol in mar… Jan 4, 2026
@kimteayon kimteayon merged commit bae52ab into ant-design:main Jan 4, 2026
5 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

Thank you for your contribution!

kimteayon added a commit that referenced this pull request Jan 7, 2026
* chore: changelog of 2.1.2 (#1603)

* chore: changelog of 2.1.2

* chore: changelog of 2.1.2

* chore: actions docs (#1605)

* feat: test

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* test: x-sdk

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* test: x-sdk

* test: x-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* test: x-sdk

* test: x-sdk

* test: x-sdk

* test: x-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat: push

* fix: geshi

* fix: geshi

* fix: classnames => clsx and add noUndeclaredDependencies config (#1608)

* chore: changelog of 2.1.3 (#1614)

* chore: changelog of 2.1.3

* chore: changelog of 2.1.3

* chore: changelog of 2.1.3

* chore(deps-dev): bump inquirer from 12.11.1 to 13.1.0 (#1536)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump openai from 5.23.2 to 6.14.0 (#1538)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: Modified the error in writing the extension budget symbol in markdown (#1615)

* fix(attachments):  add cardType for FileCard (#1610)

* fix: attachments

* fix: attachments

* feat: browseeruse

* test: snap

* test: snap

* test: file card

* test: file card

* test: file card

* feat: test

* feat: test

* fix: attachments

* fix: attachments

* fix: attachments

* fix(Sender): inster container & position & update slot test (#1612)

* fix: inster container

* feat: cursor

* feat: cursor

* feat: cursor

* feat: slot test

* test: custom slot

* feat: test of sender

* feat: test of sender

* test: sender

* test: sender

* feat: hook cursor

* feat: hook cursor

* feat: hook cursor

---------

Co-authored-by: Mickey <951203214@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bbimasheep <75004889+Yx0201@users.noreply.github.com>
kimteayon added a commit that referenced this pull request Jan 8, 2026
* feat(XSdk): XRequest support retry

* chore: changelog of 2.1.2 (#1603)

* chore: changelog of 2.1.2

* chore: changelog of 2.1.2

* chore: actions docs (#1605)

* feat: test

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* test: x-sdk

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* feat: x-sdk default messages

* test: x-sdk

* test: x-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* test: x-sdk

* test: x-sdk

* test: x-sdk

* test: x-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat:s-sdk

* feat: push

* fix: geshi

* fix: geshi

* fix: classnames => clsx and add noUndeclaredDependencies config (#1608)

* chore: changelog of 2.1.3 (#1614)

* chore: changelog of 2.1.3

* chore: changelog of 2.1.3

* chore: changelog of 2.1.3

* chore(deps-dev): bump inquirer from 12.11.1 to 13.1.0 (#1536)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump openai from 5.23.2 to 6.14.0 (#1538)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: Modified the error in writing the extension budget symbol in markdown (#1615)

* fix(attachments):  add cardType for FileCard (#1610)

* fix: attachments

* fix: attachments

* feat: browseeruse

* test: snap

* test: snap

* test: file card

* test: file card

* test: file card

* feat: test

* feat: test

* fix: attachments

* fix: attachments

* fix: attachments

* fix(Sender): inster container & position & update slot test (#1612)

* fix: inster container

* feat: cursor

* feat: cursor

* feat: cursor

* feat: slot test

* test: custom slot

* feat: test of sender

* feat: test of sender

* test: sender

* test: sender

* feat: hook cursor

* feat: hook cursor

* feat: hook cursor

* feat: optimize retry

* refactor: optimize retry

---------

Co-authored-by: Mickey <951203214@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bbimasheep <75004889+Yx0201@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants