{"id":23933870,"url":"https://github.com/pmacro/AITranslate","last_synced_at":"2025-09-11T16:33:04.490Z","repository":{"id":226834563,"uuid":"769761095","full_name":"pmacro/AITranslate","owner":"pmacro","description":"A tool to translate Xcode xcstrings files using ChatGPT AI/LLM","archived":false,"fork":false,"pushed_at":"2024-11-10T17:06:38.000Z","size":37,"stargazers_count":74,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-14T01:07:43.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmacro.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":"2024-03-10T01:20:18.000Z","updated_at":"2025-08-09T20:19:50.000Z","dependencies_parsed_at":"2024-03-10T02:38:43.703Z","dependency_job_id":"0233f37c-8a78-4cd3-b910-383ffddaa16b","html_url":"https://github.com/pmacro/AITranslate","commit_stats":null,"previous_names":["pmacro/aitranslate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmacro/AITranslate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmacro%2FAITranslate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmacro%2FAITranslate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmacro%2FAITranslate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmacro%2FAITranslate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmacro","download_url":"https://codeload.github.com/pmacro/AITranslate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmacro%2FAITranslate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274670356,"owners_count":25328219,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-01-06T00:29:57.198Z","updated_at":"2025-09-11T16:33:04.149Z","avatar_url":"https://github.com/pmacro.png","language":"Swift","funding_links":[],"categories":["Building"],"sub_categories":["Tools"],"readme":"# AI Translate\n\nThis is a small, simple, utility that parses an Xcode `.xcstrings` file, asks ChatGPT to translate each entry, and then saves the results back in the `xcstrings` JSON format.\n\nThis tool is hardcoded to use ChatGPT-4. While ChatGPT3.5 is significantly less expensive, it does not provide satisfactory results. Selecting a model via a command-line flag has been deliberately omitted for this reason, thus ensuring this tool does not contribute to a proliferation of poor translations in apps on Apple platforms.  \n\nPlease note that is **very strongly** recommend to have translations tested by a qualified human as even ChatGPT-4 will almost certainly not produce perfect results.\n\n## Missing Features\n\nThis tool supports all the features that I currently use personally, which are not all of the features supported by `xcstrings` (for example, I have not tested plural strings, or strings that vary by device). Pull requests are welcome to add those missing features.\n\n## Usage\n\nSimply pull this repo, then run the following command from the repo root folder:\n\n```\nswift run ai-translate /path/to/your/Localizable.xcstrings -o \u003cyour-openai-API-key\u003e -v -l de,es,fr,he,it,ru,hi,en-GB\n```\n\nHelp output:\n\n```\n  USAGE: ai-translate \u003cinput-file\u003e --languages \u003clanguages\u003e --open-ai-key \u003copen-ai-key\u003e [--verbose] [--skip-backup] [--force]\n\n  ARGUMENTS:\n    \u003cinput-file\u003e\n\n  OPTIONS:\n    -l, --languages \u003clanguages\u003e a comma separated list of language codes (must match the language codes used by xcstrings)\n    -o, --open-ai-key \u003copen-ai-key\u003e\n                            Your OpenAI API key, see: https://platform.openai.com/api-keys\n    -v, --verbose\n    -s, --skip-backup       By default a backup of the input will be created. When this flag is provided, the backup is skipped.\n    -f, --force             Forces all strings to be translated, even if an existing translation is present.\n    -h, --help              Show help information.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmacro%2FAITranslate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmacro%2FAITranslate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmacro%2FAITranslate/lists"}