Skip to content

josephMG/chatGPT-translate-docs

Repository files navigation

  1. Change reactjs.org submodule to your git cloned react.dev.
  2. Change .env.example to .env, and set your OPENAI_API_KEY in .env.
  3. Use docker-compose run --rm chatgpt sh run docker. It mount reactjs.org/src/content to /docs.
  4. You may neet to run npm install in docker shell
  5. Run ts-node index.ts to translate a file in reactjs.org/src/content to the language you selected.

https://github.com/josephMG/chatGPT-translate-docs/blob/main/chatGPT/index.ts#L75-L79

If you want to translate all files in content, remove comment on line 77.

chatGPT/.env

  • OPENAI_API_KEY: your openai api key
  • CHUNK_TOKENS: chunk your prompt less than this token number

chatGPT/success-files.json

This JSON records these files you translated. if you want to translate all files, just delete it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published