apache / fury-site

Apache Fury Website
https://fury.apache.org/
Apache License 2.0
8 stars 17 forks source link

[Improve] Updated article structure in preparation for website internationalization #148

Closed yuluo-yx closed 1 month ago

yuluo-yx commented 1 month ago
  1. clone branch
  2. run yarn start-zh
  3. see browser
  4. run yarn start.

more information:

yuluo-yx commented 1 month ago

any ideas for this pr? 🤔 @chaokunyang

chaokunyang commented 1 month ago

Hi @yuluo-yx, thank you for your contribution. I appreciate your effort. I have a couple of suggestions that may help improve our workflow. Firstly, it would be best to avoid duplicating documents in the source tree. We can handle that when building the website pages. Also, could we use git mv instead? There are numerous file deletions and creations, but they all contain the same content. Additionally, I noticed that #142 is working on the same thing. Perhaps we could collaborate and work together on this. Thank you!

yuluo-yx commented 1 month ago

Hi @yuluo-yx, thank you for your contribution. I appreciate your effort. I have a couple of suggestions that may help improve our workflow. Firstly, it would be best to avoid duplicating documents in the source tree. We can handle that when building the website pages. Also, could we use git mv instead? There are numerous file deletions and creations, but they all contain the same content. Additionally, I noticed that #142 is working on the same thing. Perhaps we could collaborate and work together on this. Thank you!

Thanks for the reply, I have a couple questions that 1, if we avoid duplication of documents, where do we put the Chinese and English documents? 2, what should be the process when git mv moves the documentation, as far as I know, the internationalization method is the same in the documentation sites built with docusaurus. 3, live blood we can use hugo this documentation website framework, it can avoid extra placeholder file 4, for the documentation building program you mentioned, is there a feasibility reference? What should be done?

yuluo-yx commented 1 month ago

btw, The community pr is a bit too slow to respond, it doesn't look like an incubating project, I think it's more like a project going into maintenance.

chaokunyang commented 1 month ago

Some of the core developers are busy for some other stuffs, the responses are a little slow. We will response more frequently in next days. We truly value and appreciate your efforts and contributions, and apologize for any inconvenience caused by the delay. Thank you for your understanding.

chaokunyang commented 1 month ago

Hi @yuluo-yx, thank you for your contribution. I appreciate your effort. I have a couple of suggestions that may help improve our workflow. Firstly, it would be best to avoid duplicating documents in the source tree. We can handle that when building the website pages. Also, could we use git mv instead? There are numerous file deletions and creations, but they all contain the same content. Additionally, I noticed that #142 is working on the same thing. Perhaps we could collaborate and work together on this. Thank you!

Thanks for the reply, I have a couple questions that 1, if we avoid duplication of documents, where do we put the Chinese and English documents? 2, what should be the process when git mv moves the documentation, as far as I know, the internationalization method is the same in the documentation sites built with docusaurus. 3, live blood we can use hugo this documentation website framework, it can avoid extra placeholder file 4, for the documentation building program you mentioned, is there a feasibility reference? What should be done?

  1. When we translate a page, we can create a Chinese document for it. But if we don't translate it, we should copy english document to Chinese location before building docusaurus
  2. I don't dive into docusaurus, I'm not sure whether it needs the placeholder. @theweipeng @LofiSu do you have any suggestions?
  3. You mean use hugo? I prefer keeping using docusaurus unless it's too hard to add internationalization support
  4. Like mentioned in step one, we can add some extra steps to execute some shell script to copy english documents to chinese documents if they doesn't exist, then execute npm run build
yuluo-yx commented 1 month ago

I see what you mean.

  1. means that the specified file is created in the corresponding location only when the document is translated. To avoid duplication of files.

  2. you don't have to use hugo, just that hugo may be better than docusaurus in terms of document maintenance. docusaurus is fine. I'm sure we'll build good documentation sites.

  3. in terms of placeholders, docusaurus is needed, you can try to delete the docs and blog directories in the root directory, and then start the project to observe the log output, it will report an error.

  4. i tried to write a shell script to copy and move files in the ci build, to complete the npm build

  5. I personally don't think this script is needed. After this pr merge, I will translate all the English documentation as fast as I can. This script is really needed for documentation consistency.

chaokunyang commented 1 month ago

That would be a huge maintain burden to you. And in future we will have more document pages. I prefer adding an automatic script to build sustainability

yuluo-yx commented 1 month ago

That would be a huge maintain burden to you. And in future we will have more document pages. I prefer adding an automatic script to build sustainability

I'm working on this function

yuluo-yx commented 1 month ago

hi @chaokunyang ptal & approve ci task.

yuluo-yx commented 1 month ago

ci has been passed. If you have time, you can check the code implementation and github action logs. After this PR is merged, I will start the translation task of the document. tks @chaokunyang

chaokunyang commented 1 month ago

Hi, could you share some details why we needs scripts/unified-docs/main.go? I don't see any comments in this file too

yuluo-yx commented 1 month ago

Sorry, I neglected it. The configuration information of this document script can be seen in the deploy.yml configuration of github. Its function is to copy the English document to the Chinese document directory to realize the requirements mentioned above.

Shawn Yang @.***>于2024年8月16日 周五19:53写道:

Hi, could you share some details why we needs scripts/unified-docs/main.go? I don't see any comments in this file too

— Reply to this email directly, view it on GitHub https://github.com/apache/fury-site/pull/148#issuecomment-2293368430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASS2GCIT7YQMXNYNN7RYTHLZRXR2ZAVCNFSM6AAAAABMKMAGGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGM3DQNBTGA . You are receiving this because you were mentioned.Message ID: @.***>

yuluo-yx commented 1 month ago

You can know what he has done by looking at the log of deploy action.

Shawn Yang @.***>于2024年8月16日 周五19:53写道:

Hi, could you share some details why we needs scripts/unified-docs/main.go? I don't see any comments in this file too

— Reply to this email directly, view it on GitHub https://github.com/apache/fury-site/pull/148#issuecomment-2293368430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASS2GCIT7YQMXNYNN7RYTHLZRXR2ZAVCNFSM6AAAAABMKMAGGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGM3DQNBTGA . You are receiving this because you were mentioned.Message ID: @.***>

chaokunyang commented 1 month ago

LGTM overall, but I suggest copying all documents under docs into i18n/en-us/docusaurus-plugin-content-docs before building websites instead of commit those copied files into git repository. The document under docs will be overwrited by docs under https://github.com/apache/fury/tree/main/docs. Other parts looks good to me, although I think we should write script using python/shell instead of golang for better maintainability, but that can be left in futher PR

yuluo-yx commented 1 month ago

LGTM overall, but I suggest copying all documents under docs into i18n/en-us/docusaurus-plugin-content-docs before building websites instead of commit those copied files into git repository. The document under docs will be overwrited by docs under https://github.com/apache/fury/tree/main/docs. Other parts looks good to me, although I think we should write script using python/shell instead of golang for better maintainability, but that can be left in futher PR

afaik, in docusaurus, the internationalization part is actually implemented. Documents and blogs in the root directory must be a placeholder file. It is best not to have any documentation content, which may cause some unavoidable interference in internationalization.

However, this is a problem I encountered when building the Spring Cloud Alibaba official website before, and I am not sure whether the new version will have an impact. I'll do some research and if it works, I'll improve this feature.

I think go script is also a very good choice. It copies files concurrently very quickly. You can see its execution time from the action log. 😆

yuluo-yx commented 1 month ago

btw. For the current PR, do you think you should merge it into the main branch first, or should I improve the relevant functions before merging it? @chaokunyang

chaokunyang commented 1 month ago

It's easy to introduce inconsistentency, since we sync document automatically into this repo frequently. We'd better address such inconsistentency before merging this or.

yuluo-yx commented 1 month ago

got it. let me study it 🤔

Shawn Yang @.***> 于2024年8月16日周五 20:58写道:

It's easy to introduce inconsistentency, since we sync document automatically into this repo frequently. We'd better address such inconsistentency before merging this or.

— Reply to this email directly, view it on GitHub https://github.com/apache/fury-site/pull/148#issuecomment-2293464731, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASS2GCL5J5KPYAJHMLZ2TFDZRXZPDAVCNFSM6AAAAABMKMAGGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGQ3DINZTGE . You are receiving this because you were mentioned.Message ID: @.***>

yuluo-yx commented 1 month ago

@chaokunyang ptal