{"id":29082382,"url":"https://github.com/FidelusAleksander/ai-translate-action","last_synced_at":"2025-06-27T20:30:37.020Z","repository":{"id":287946722,"uuid":"965186118","full_name":"FidelusAleksander/ai-translate-action","owner":"FidelusAleksander","description":"GitHub Action for AI-powered file translation between different languages","archived":false,"fork":false,"pushed_at":"2025-06-17T08:26:00.000Z","size":1063,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T09:37:24.411Z","etag":null,"topics":["ai","github-actions","models","translation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/FidelusAleksander.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-12T15:50:42.000Z","updated_at":"2025-06-17T08:24:57.000Z","dependencies_parsed_at":"2025-04-14T19:45:34.543Z","dependency_job_id":"93cc9451-da13-4b71-b327-b0b19b35e7e2","html_url":"https://github.com/FidelusAleksander/ai-translate-action","commit_stats":null,"previous_names":["fidelusaleksander/ai-translate"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/FidelusAleksander/ai-translate-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidelusAleksander%2Fai-translate-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidelusAleksander%2Fai-translate-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidelusAleksander%2Fai-translate-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidelusAleksander%2Fai-translate-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FidelusAleksander","download_url":"https://codeload.github.com/FidelusAleksander/ai-translate-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FidelusAleksander%2Fai-translate-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262326914,"owners_count":23294156,"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":["ai","github-actions","models","translation"],"created_at":"2025-06-27T20:30:33.853Z","updated_at":"2025-06-27T20:30:36.928Z","avatar_url":"https://github.com/FidelusAleksander.png","language":"TypeScript","funding_links":[],"categories":["Categories","TypeScript"],"sub_categories":["Continuous Documentation"],"readme":"# AI Translate Action :globe_with_meridians:\n\n[![Run Tests](https://github.com/FidelusAleksander/ai-translate-action/actions/workflows/test.yml/badge.svg)](https://github.com/FidelusAleksander/ai-translate-action/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/FidelusAleksander/ai-translate-action)](https://github.com/FidelusAleksander/ai-translate-action/releases)\n\n[![English](https://img.shields.io/badge/English-README.md-blue)](https://github.com/FidelusAleksander/ai-translate-action/blob/main/README.md) [![Polish](https://img.shields.io/badge/Polish-docs/README.pl.md-red)](https://github.com/FidelusAleksander/ai-translate-action/blob/main/docs/README.pl.md) [![Spanish](https://img.shields.io/badge/Spanish-docs/README.es.md-yellow)](https://github.com/FidelusAleksander/ai-translate-action/blob/main/docs/README.es.md) [![Chinese](https://img.shields.io/badge/Chinese-docs/README.zh.md-green)](https://github.com/FidelusAleksander/ai-translate-action/blob/main/docs/README.zh.md)\n\nA GitHub Action that provides AI-powered text translation directly in your workflows.\n\n- [AI Translate Action :globe\\_with\\_meridians:](#ai-translate-action-globe_with_meridians)\n  - [Basic Usage 🚀](#basic-usage-)\n    - [Translate text directly](#translate-text-directly)\n    - [Translate a text file](#translate-a-text-file)\n  - [Permissions 🔒](#permissions-)\n  - [Inputs ⚙️](#inputs-️)\n  - [Outputs 📤](#outputs-)\n  - [Cool examples 🎮](#cool-examples-)\n    - [Auto-translate README to multiple languages](#auto-translate-readme-to-multiple-languages)\n\n## Basic Usage 🚀\n\n### Translate text directly\n\n```yaml\n- uses: FidelusAleksander/ai-translate-action@v1\n  with:\n    text: \"Hello, world!\"\n    target-language: \"Spanish\"\n```\n\n### Translate a text file\n\n```yaml\n- uses: FidelusAleksander/ai-translate-action@v1\n  with:\n    text-file: README.md\n    target-language: \"French\"\n```\n\n## Permissions 🔒\n\nThis action requires at minimum the following permissions set.\n\n```yaml\npermissions:\n  models: read\n```\n\n## Inputs ⚙️\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `text` | The text to translate | No* | - |\n| `text-file` | Path to a file containing the text to translate | No* | - |\n| `target-language` | The language to translate the text into | Yes | - |\n| `token` | Personal access token | No | `${{ github.token }}` |\n| `model` | The AI model to use. See [available models](https://github.com/marketplace?type=models) | No | `gpt-4o` |\n| `custom-instructions` | Optional additional instructions to customize translation behavior (e.g., \"Don't translate code blocks\" or \"Keep technical terms in English\") | No | - |\n\n\\* Either `text` or `text-file` must be provided\n\n## Outputs 📤\n\n| Output | Description |\n|--------|-------------|\n| `translated-text` | The translated text |\n\n## Cool examples 🎮\n\nHave you come up with a clever use of this action? Open a PR to showcase it here for the world to see!\n\n### Auto-translate README to multiple languages\n\nThis action can be used to automatically translate your README into multiple languages whenever changes are made. Here's how this repository keeps its documentation in sync:\n\n```yaml\nname: Translate README\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - \"README.md\"\n\npermissions:\n  contents: write\n  pull-requests: write\n  models: read\n\njobs:\n  translate:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        language: [\"spanish\", \"chinese\"]\n        include:\n          - language: \"spanish\"\n            file: \"README.es.md\"\n          - language: \"chinese\"\n            file: \"README.zh.md\"\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Translate README\n        uses: FidelusAleksander/ai-translate-action@v1\n        id: translate\n        with:\n          text-file: \"README.md\"\n          target-language: ${{ matrix.language }}\n          custom-instructions: \"Keep technical terms in English. Don't translate code blocks\"\n\n      - name: Save translation\n        run: |\n          mkdir -p docs\n          echo \"$TRANSLATED_TEXT\" | tee docs/${{ matrix.file }}\n        env:\n          TRANSLATED_TEXT: ${{ steps.translate.outputs.translated-text }}\n\n      - name: Upload translation artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: ${{ matrix.file }}\n          path: docs/${{ matrix.file }}\n\n  create-pr:\n    needs: translate\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/download-artifact@v4\n        with:\n          path: docs\n          merge-multiple: true\n      - name: Create Pull Request\n        uses: peter-evans/create-pull-request@v6\n        with:\n          commit-message: \"docs: update translations of README\"\n          title: \"docs: update translations of README\"\n          body: |\n            This PR updates all translations of the README:\n\n            Changes were automatically generated using the [ai-translate-action](https://github.com/FidelusAleksander/ai-translate-action) action.\n          branch: docs/update-readme-translations\n          add-paths: \"docs/README*\"\n          delete-branch: true\n          labels: |\n            documentation\n```\n\nThis workflow automatically translates the README into Spanish and Chinese whenever changes are made to the English version. It creates a pull request with the updated translations, making it easy to review the changes before merging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFidelusAleksander%2Fai-translate-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFidelusAleksander%2Fai-translate-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFidelusAleksander%2Fai-translate-action/lists"}