{"id":19298213,"url":"https://github.com/casbin/crowdin-helper","last_synced_at":"2025-10-18T20:52:57.373Z","repository":{"id":226456029,"uuid":"767592986","full_name":"casbin/crowdin-helper","owner":"casbin","description":"Crowdin translation help for Casbin websites","archived":false,"fork":false,"pushed_at":"2024-03-26T15:35:41.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T22:37:45.311Z","etag":null,"topics":["casbin","crowdin","docs","docusaurus","i18n","translation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.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},"funding":{"github":"casbin"}},"created_at":"2024-03-05T15:16:38.000Z","updated_at":"2024-03-07T14:42:38.000Z","dependencies_parsed_at":"2024-03-07T17:53:14.679Z","dependency_job_id":"47ac5778-e265-4458-9e00-01e7cb7d390e","html_url":"https://github.com/casbin/crowdin-helper","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"b9bcb10f9244b414fcf8443090c0ce9edc01042d"},"previous_names":["casbin/crowdin-helper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcrowdin-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcrowdin-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcrowdin-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fcrowdin-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/crowdin-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240064749,"owners_count":19742368,"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":["casbin","crowdin","docs","docusaurus","i18n","translation"],"created_at":"2024-11-09T23:07:16.375Z","updated_at":"2025-10-18T20:52:57.280Z","avatar_url":"https://github.com/casbin.png","language":"Python","funding_links":["https://github.com/sponsors/casbin"],"categories":[],"sub_categories":[],"readme":"# crowdin-helper\n\nCrowdin Helper is a tool to help you batch translate your Crowdin project using OpenAI's API.\n\n## Dev\n\ninstall PDM: https://pdm-project.org/latest/#recommended-installation-method\n\n```bash\n# install dependencies\npdm install\n# run\npdm dev\n# help\npdm dev --help\n# build\npdm build\n# install\npdm install # install to virtual environment\npip install dist/crowdin_helper-0.1.0-py3-none-any.whl # install from wheel\n# run after install\npython -m crowdin_helper\n```\n\n## Options\n\nCrowdin Helper needs the following options to run:\n\n| Option             | Required | Description                                | Default Value             |\n| ------------------ | -------- | ------------------------------------------ | ------------------------- |\n| OPENAI_API_KEY     | true     | OpenAI API Key                             |                           |\n| OPENAI_BASE_URL    | false    | OpenAI Base URL                            | https://api.openai.com/v1 |\n| OPENAI_MODEL       | false    | OpenAI Model                               | gpt-4                     |\n| CROWDIN_API_KEY    | true     | Crowdin API Key                            |                           |\n| CROWDIN_PROJECT_ID | true     | Crowdin Project ID                         |                           |\n| CROWDIN_LANGS      | true     | The languages to translate to              |                           |\n| BATCH_SIZE         | false    | The number of strings to translate at once | 30                        |\n\nUseful links:\n\n- OpenAI model list : https://platform.openai.com/docs/models/overview\n- Crowdin languages list : https://developer.crowdin.com/language-codes/\n\n## Usage\n\nWarning: Sometimes, GPT's translation is unreliable. For some texts that should not be translated, the best way is to hide these texts in Crowdin.\n\n### Config File\n\n`config.toml`:\n\n```toml\nOPENAI_API_KEY = 'sk-xxx'\nOPENAI_BASE_URL = \"https://api.openai.com/v1\"\nOPENAI_MODEL = \"gpt-4\"\nCROWDIN_API_KEY = \"xxx\"\nCROWDIN_PROJECT_ID = \"123456\"\nCROWDIN_LANGS = 'zh-CN, fr, de, ko, ru, ja'\nBATCH_SIZE = 30\n```\n\n```bash\npdm dev --config-file your_config_file_path\n```\n\n### Environment Variables\n\n```bash\nexport CH_OPENAI_API_KEY='sk-xxx'\nexport CH_OPENAI_BASE_URL=\"https://api.openai.com/v1\"\nexport CH_OPENAI_MODEL=\"gpt-4\"\nexport CH_CROWDIN_API_KEY=\"xxx\"\nexport CH_CROWDIN_PROJECT_ID=\"123456\"\nexport CH_CROWDIN_LANGS='zh-CN, fr, de, ko, ru, ja'\nexport CH_BATCH_SIZE=30\n```\n\nalso support `.env` file:\n\n```bash\nCH_OPENAI_API_KEY='sk-xxx'\nCH_OPENAI_BASE_URL=\"https://api.openai.com/v1\"\nCH_OPENAI_MODEL=\"gpt-4\"\nCH_CROWDIN_API_KEY=\"xxx\"\nCH_CROWDIN_PROJECT_ID=\"123456\"\nCH_CROWDIN_LANGS='zh-CN, fr, de, ko, ru, ja'\nCH_BATCH_SIZE=30\n```\n\nthen run:\n\n```bash\npdm dev\n# or\npython -m crowdin_helper\n```\n\n### Cli\n\n```bash\npdm dev --openai-api-key \"sk-xxx\" \\\n        --openai-base-url \"https://api.openai.com/v1\" \\\n        --openai-model \"gpt-4\" \\\n        --crowdin-api-key \"xxx\" \\\n        --crowdin-project-id \"123456\" \\\n        --crowdin-langs \"zh-CN, fr, de, ko, ru, ja\" \\\n        --batch-size 30\n```\n\n## TODO\n\n- Use LangChain to optimize the translation process.\n\n## LINCENE\n\n[Apache 2.0](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fcrowdin-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fcrowdin-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fcrowdin-helper/lists"}