{"id":19233759,"url":"https://github.com/ossrs/issues-translation","last_synced_at":"2025-04-21T04:33:26.472Z","repository":{"id":182323780,"uuid":"668279331","full_name":"ossrs/issues-translation","owner":"ossrs","description":"Use AI/GPT to translate GitHub issues into English.","archived":false,"fork":false,"pushed_at":"2024-10-31T09:41:08.000Z","size":131,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T09:51:18.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ossrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-19T12:41:04.000Z","updated_at":"2024-10-31T09:41:11.000Z","dependencies_parsed_at":"2024-11-09T16:11:53.600Z","dependency_job_id":"e5bfa9e9-fa8a-4bff-a8b2-010f610a5940","html_url":"https://github.com/ossrs/issues-translation","commit_stats":null,"previous_names":["ossrs/issues-translation"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossrs%2Fissues-translation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossrs%2Fissues-translation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossrs%2Fissues-translation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossrs%2Fissues-translation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ossrs","download_url":"https://codeload.github.com/ossrs/issues-translation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249996261,"owners_count":21358098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T16:11:44.621Z","updated_at":"2025-04-21T04:33:26.229Z","avatar_url":"https://github.com/ossrs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# issues-translation\n\n[![](https://badgen.net/discord/members/yZ4BnPmHAd)](https://discord.gg/yZ4BnPmHAd)\n\nUse AI/GPT to translate GitHub issues into English.\n\n## Usage\n\nUse docker to translate issue:\n\n```bash\ndocker run -e GITHUB_TOKEN=xxx -e OPENAI_API_KEY=xxx -e OPENAI_PROXY=xxx \\\n  --rm -it ossrs/issues-translation:v1 \\\n  python issue-trans.py --input https://github.com/your-org/your-repository/issues/3692\n```\n\nUse docker to translate discussion:\n\n```bash\ndocker run -e GITHUB_TOKEN=xxx -e OPENAI_API_KEY=xxx -e OPENAI_PROXY=xxx \\\n  --rm -it ossrs/issues-translation:v1 \\\n  python discussion-trans.py --input https://github.com/your-org/your-repository/discussions/3700\n```\n\nUse docker to translate PR:\n\n```bash\ndocker run -e GITHUB_TOKEN=xxx -e OPENAI_API_KEY=xxx -e OPENAI_PROXY=xxx \\\n  --rm -it ossrs/issues-translation:v1 \\\n  python pr-trans.py --input https://github.com/your-org/your-repository/pull/3699\n```\n\nRun GitHub webhooks server:\n\n```bash\ndocker run -e GITHUB_TOKEN=xxx -e OPENAI_API_KEY=xxx -e OPENAI_PROXY=xxx \\\n --rm -it -p 2023:2023 ossrs/issues-translation:v1 \\\n  python server.py --listen 2023 --forward https://discord.com/xxx\n```\n\nAlso you can use `--env-file=$(pwd)/.env` to load the environment variables from file `.env`.\n\n## Developer\n\nWrite a `.env` file to setup OpenAI API key and GitHub token:\n\n```bash\n#.env\nGITHUB_TOKEN=xxx\nOPENAI_API_KEY=xxx\nOPENAI_PROXY=xxx\n```\n\n\u003e Note: The `GITHUB_TOKEN` is required to update the issue ,please read [Authenticating to the REST API](https://docs.github.com/en/rest/overview/authenticating-to-the-rest-api) to create one.\n\n\u003e Note: The `OPENAI_API_KEY` is required, which is the API key for OpenAI API.\n\n\u003e Note: The OPENAI_PROXY is optional, which is the proxy for OpenAI API.\n\n\u003e Note: Or save the above environment variables to `.env`.\n\nFor fist run, create venv then install dependencies:\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nTranslate issues to English:\n\n```bash\npython issue-trans.py --input https://github.com/your-org/your-repository/issues/3692\n```\n\nTranslate issues to English:\n\n```bash\npython pr-trans.py --input https://github.com/your-org/your-repository/pull/3699\npython pr-rephrase.py --input https://github.com/your-org/your-repository/pull/3699\n```\n\nTranslate discussions to English:\n\n```bash\npython discussion-trans.py --input https://github.com/your-org/your-repository/discussions/3700\n```\n\nOnce translated, this tool appends a MAGIC string to the conclusion of the text body to prevent repeated translations.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossrs%2Fissues-translation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossrs%2Fissues-translation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossrs%2Fissues-translation/lists"}