Skip to content
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

wechaty doc update #1512

Open
1 of 3 tasks
hcfw007 opened this issue Jan 30, 2023 · 11 comments
Open
1 of 3 tasks

wechaty doc update #1512

hcfw007 opened this issue Jan 30, 2023 · 11 comments

Comments

@hcfw007
Copy link
Member

hcfw007 commented Jan 30, 2023

I am planning on a major update for wechaty API document, considering there are many elementary wechaty related enquries since we launched workpro.
Most of our customers are from China, however the official website of wechaty is in English. So i'll try to make it bilingual. After discussion, we decided to use built-in i18n module to provided bilingual support, even though most of our pages do not have bilingual version.
The major work will be done in my spare time, or when I finished most of my work and want to do something less-challenging. So it might take a while. I'll post the new version of Wechaty page in English this two days so you guys can advise on styles and other matters.
Please feel free to suggest or comment.

WIP Tracker

@hcfw007
Copy link
Member Author

hcfw007 commented Jan 30, 2023

WIP Tracker

moved to main thread

@windmemory
Copy link
Member

Actually I think we should add i18n to the whole wechaty doc website, instead of adding specific chinese doc page, change the whole website to be english/chinese should be a better solution.

@hcfw007
Copy link
Member Author

hcfw007 commented Jan 30, 2023

That is also a potential solution. I did not use this method initially because I thought only a few pages capable of changing language is kinda wierd with a website level switch.

@hcfw007
Copy link
Member Author

hcfw007 commented Jan 31, 2023

please compare these two approaches and tell me which one you like

@windmemory
Copy link
Member

please compare these two approaches and tell me which one you like with built-in i18n: #1514 with serperate submenu: #1513

Vote for build-in i18n

@hcfw007
Copy link
Member Author

hcfw007 commented Jan 31, 2023

I'll start working on it if no one else votes in 1 day.

@hcfw007
Copy link
Member Author

hcfw007 commented Feb 1, 2023

@huan any suggestions?

@huan
Copy link
Member

huan commented Feb 1, 2023

I have no time to go through it in detail, but I like your idea for improving the docs.

Please go ahead with the most basic part of the docs (like fixing incorrect docs & examples) first, and I will give you feedback when I have time.

Thank you very much for pushing this moving forward!

@hcfw007
Copy link
Member Author

hcfw007 commented May 15, 2023

Updates:

I'm working on PRs about wechaty doc. The English version should be done bofre this Thursday.
The doc will be divided into two major parts, For Bot Developers and For Puppet Developers.
Detailed Doc Chapters

Bot:

  • Intro: Base info, 6-line bot demo, version changelog
  • Install: How to install dependencies
  • Hello World: Base concepts, create bot, listen to events, lifecycle, ding-dong bot
  • User modules:
    • Message
    • Contact
    • Room
    • ...
  • Events

Puppet:

  • Intro: Wechaty architecture, Why we need a puppet class, Example of servering open-source puppets, version chagnelog.
  • Install: same with bot.
  • Hello World. How to setup an easist bot with MessageSendText only. (based on a hypothetical IM)
  • Abstract methods of user modules:
    • ...UserModules
  • Pack puppet into service with Wechaty-Puppet-Service

@hcfw007
Copy link
Member Author

hcfw007 commented May 15, 2023

Chinese version should also be expected.

@hcfw007
Copy link
Member Author

hcfw007 commented May 15, 2023

I have recorede a video for i18n PR (#1514). As you can see, the pages with a Chinese version can be displayed in Chinese, and the pages without one will remain in English (and will not be 404).

20230515-170450.mp4

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

No branches or pull requests

3 participants