-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aherman3 api docs add zh #1533
base: main
Are you sure you want to change the base?
Aherman3 api docs add zh #1533
Conversation
…room.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…friendship.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…wechaty-class.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…friendship.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…contact.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…contact.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…contact.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…contact-self.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…contact.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/friendship.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Outdated
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/room-invitation.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
package.json
is excluded by:!**/*.json
Files selected for processing (1)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md (1 hunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/friendship.md (1 hunks)
Additional comments: 5
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/friendship.md (5)
- 5-7: The introduction and example link are clear and provide a good starting point for understanding the
Friendship
class.- 17-25: Consider adding a brief description column to the instance methods table to provide more clarity on what each method does. This would enhance the documentation's usability.
- 26-31: Similarly, adding a brief description for the
add()
method in the static methods table could provide more clarity to the readers about its purpose and usage.- 5-5: Consider applying the suggested translations throughout the document to enhance readability for Chinese readers. For example, translate "Global Class" to "全局类", "accept friend request" to "接受好友请求", "hello" to "打招呼语", and "enum" to "枚举".
- 32-62: The examples provided are clear and offer practical guidance on using the
Friendship
class to handle friend requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md (1 hunks)
Additional comments: 9
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md (9)
- 6-6: Considering the PR's objective to change absolute links to relative ones for better maintainability, this link should be converted to a relative path if possible. This aligns with the previous comment and remains valid.
,- 19-19: The term
MessageType
is mentioned without a clear definition or link to its explanation. It would be beneficial for readers if there was a brief description or a link to a section that elaborates on the differentMessageType
values. This comment remains relevant.
,- 26-28: The methods
toFileBox()
,toContact()
, andtoUrlLink()
all returnPromise
, but it's not specified what the resolved value of these promises will be. Adding this information would greatly improve the documentation's clarity and usefulness. This comment is still applicable.
,- 44-61: In the example code, there's a potential issue with assuming
contact
is notnull
when callingcontact.name()
. Sincemessage.from()
can returnnull
, it would be safer to add a null check before using thecontact
object. This comment is still valid and important for preventing runtime errors.
,- 160-160: The example link provided here is an absolute URL. As mentioned earlier, converting this to a relative path would align with the PR's objective and improve maintainability. This comment remains relevant.
,- 329-329: The explanation of the
age()
method includes a specific example with hardcoded times. While this is helpful, it might be more beneficial to explain the general concept (i.e., it calculates the difference in seconds between when the message was sent and when it was received) without relying on a specific example. This comment is still applicable.
,- 19-19: The term
MessageType
is flagged as a possible spelling mistake. This seems to be a false positive, asMessageType
is a technical term relevant to the context. No action is needed here, but it's good to be aware of how spell checkers interpret technical content.- 26-28: The terms
toFileBox()
,toContact()
, andtoUrlLink()
are flagged as possible spelling mistakes. These are method names and not spelling errors. This highlights the importance of context when interpreting spell checker flags in technical documentation.- 158-158: The unpaired symbol warning for the
puppet-compatible-table
link suggests a formatting issue. However, upon inspection, the markdown link appears to be correctly formatted. This seems to be a false positive, and no action is required.
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Outdated
Show resolved
Hide resolved
…message.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 11
Configuration used: CodeRabbit UI
Files selected for processing (4)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact-self.md (1 hunks)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md (1 hunks)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md (1 hunks)
- docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/room-invitation.md (1 hunks)
Additional comments (4)
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact-self.md (1)
- 15-18: The method signature for
contactSelf.name([name])
suggests it can return eitherPromise<void>
orstring
, which might be confusing. Typically, a method should have a single return type for clarity and consistency.Verify the method's implementation to ensure the documentation accurately reflects its behavior. If the method can indeed return different types based on the input, consider providing additional context or examples to clarify its usage.
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md (3)
- 19-19: The term
MessageType
is mentioned without a clear definition or link to its explanation. It would be beneficial for readers if there was a brief description or a link to a section that elaborates on the differentMessageType
values.- 26-28: The methods
toFileBox()
,toContact()
, andtoUrlLink()
all returnPromise
, but it's not specified what the resolved value of these promises will be. Adding this information would greatly improve the documentation's clarity and usefulness.- 329-329: The explanation of the
age()
method includes a specific example with hardcoded times. While this is helpful, it might be more beneficial to explain the general concept (i.e., it calculates the difference in seconds between when the message was sent and when it was received) without relying on a specific example.
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/message.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/room-invitation.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact-self.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Show resolved
Hide resolved
docusaurus/i18n/zh/docusaurus-plugin-content-docs/current/api/contact.md
Show resolved
Hide resolved
@huan could you approve this PR again? An outstanding request kept your previous approval from meeting merge reqs |
@aherman3 I only work with English documentation (with approval). For Chinese documentation, please ask for help from @wechaty/writers other than me to approve your PR. I'd love to work with you on any documentation/PRs in English. |
added API docs in Chinese and changed absolute links references to relative to prevent broken link error
Summary by CodeRabbit
ContactSelf
class, detailing methods for robot self-management.Contact
class, covering interaction with contacts.Friendship
class functionality, including handling friend requests.Message
class, focusing on message handling.Room
class documentation, explaining group chat interactions and management.RoomInvitation
class, elaborating on handling room invitations.Wechaty
class, outlining its construction and Puppet types usage.