{"id":29082384,"url":"https://github.com/TanStack-dev/translate-docs-action","last_synced_at":"2025-06-27T20:30:41.105Z","repository":{"id":289915072,"uuid":"972799843","full_name":"TanStack-dev/translate-docs-action","owner":"TanStack-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-06T22:37:41.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T23:28:22.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TanStack-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-25T17:23:10.000Z","updated_at":"2025-05-06T22:37:45.000Z","dependencies_parsed_at":"2025-04-25T18:43:32.680Z","dependency_job_id":"d568ebbf-d1dc-4364-ba97-820c709826a8","html_url":"https://github.com/TanStack-dev/translate-docs-action","commit_stats":null,"previous_names":["tanstack-dev/translate-docs-action"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TanStack-dev/translate-docs-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanStack-dev%2Ftranslate-docs-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanStack-dev%2Ftranslate-docs-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanStack-dev%2Ftranslate-docs-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanStack-dev%2Ftranslate-docs-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TanStack-dev","download_url":"https://codeload.github.com/TanStack-dev/translate-docs-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TanStack-dev%2Ftranslate-docs-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":[],"created_at":"2025-06-27T20:30:33.994Z","updated_at":"2025-06-27T20:30:41.055Z","avatar_url":"https://github.com/TanStack-dev.png","language":null,"readme":"# Translate Documentation Action\n\nA GitHub Action to automatically translate documentation using machine translation services.\n\n## Features\n\n- Automatically translates documentation into multiple languages\n- Creates a pull request with translated content\n- Fully customizable translation arguments\n- Customizable pull request details\n- Supports scheduled or manual triggering\n\n## Usage\n\n### Basic usage in your workflow\n\nCreate a workflow file (e.g., `.github/workflows/translate-docs.yml`) in your repository:\n\n```yaml\nname: Translate Documentation\n\non:\n  schedule:\n    - cron: '0 20 * * *'  # Daily at 20:00 UTC (DeepSeek API off-peak pricing window 16:30-00:30 UTC)\n  workflow_dispatch:      # Allow manual triggering\n    inputs:\n      custom_arguments:\n        description: 'Custom arguments to pass to the translation package command'\n        required: false\n        type: string\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  translate:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Translate docs\n        uses: TanStack-dev/translate-docs-action@v1\n        with:\n          api_key: ${{ secrets.OPENAI_API_KEY }}\n          custom_arguments: ${{ github.event.inputs.custom_arguments }}\n```\n\n### Advanced Configuration\n\n```yaml\nname: Translate Documentation\n\non:\n  schedule:\n    - cron: '0 20 * * *'  # Daily at 20:00 UTC\n  workflow_dispatch:      # Allow manual triggering\n    inputs:\n      custom_arguments:\n        description: 'Custom arguments to pass to the translation package command'\n        required: false\n        type: string\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  translate:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Translate docs\n        uses: TanStack-dev/translate-docs-action@v1\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          api_key: ${{ secrets.OPENAI_API_KEY }}\n          custom_arguments: ${{ github.event.inputs.custom_arguments }}\n          translation_package: '@your-org/your-translation-package'\n          base_branch: 'main'\n          pr_branch: 'docs/translations-update'\n          pr_title: 'Update documentation translations'\n          commit_message: 'chore: update translations for documentation'\n          pr_body: |\n            This PR updates the documentation translations automatically.\n            \n            Generated by the translate workflow.\n```\n\n## Inputs\n\n| Name | Description | Required | Default |\n|------|-------------|:--------:|:-------:|\n| `custom_arguments` | Custom arguments to pass to the translation package command | No | '' |\n| `github_token` | GitHub token for creating PRs | No | `${{ github.token }}` |\n| `api_key` | API key for translation service (e.g., OPENAI_API_KEY) | Yes | N/A |\n| `translation_package` | NPM package to use for translation | No | '@tanstack-dev/translate-docs' |\n| `base_branch` | Base branch to create PR against | No | 'main' |\n| `pr_branch` | Branch name for the PR | No | 'docs/update-translations' |\n| `pr_title` | Title for the PR | No | 'Update translations' |\n| `pr_body` | Body text for the PR | No | Default message |\n| `commit_message` | Commit message for the translation changes | No | 'docs: update documentation translations' |\n| `add_paths` | A comma or newline-separated list of file paths to commit. Paths should follow git's pathspec syntax. | No | 'docs/**' |\n| `enable_formatting` | Whether to run code formatting before creating the PR | No | 'true' |\n| `format_command` | The command to run for formatting code | No | 'pnpm prettier:write' |\n\n## Q\u0026A\n\n### Why are my translated Spanish docs not showing in the PR?\n\nThis is often due to `.gitignore` patterns that exclude build folders with language codes like `es` (Spanish). If you have a line like `es` in your `.gitignore`, it will ignore all folders named `es`, including your translated documentation.\n\nTo fix this issue, you should exclude your documentation folders from being ignored by using the negation pattern:\n\n```\n# build files \nes\n# we don't need to ignore the docs folder\n!docs/es\n```\n\nThis ensures that build output directories are ignored, but your Spanish documentation in the `docs/es` directory will be included in your git repository and PRs.\n\n\n### How often should I run the translation job?\n\nFor the best cost efficiency, we recommend running the translation job on a schedule during API off-peak pricing windows. For example, DeepSeek API has an off-peak pricing window from 16:30-00:30 UTC.\n\n### Can I manually trigger a translation for a specific language?\n\nYes, the workflow_dispatch trigger allows you to manually run the action for a specific language by providing the language code as an input.\n\n## License\n\nMIT","funding_links":[],"categories":["Categories"],"sub_categories":["Continuous Documentation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTanStack-dev%2Ftranslate-docs-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTanStack-dev%2Ftranslate-docs-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTanStack-dev%2Ftranslate-docs-action/lists"}