A GitHub Action that opens machine-translated pull requests for resource files
in your repository, powered by Azure AI Translator via Microsoft's official
@azure-rest/ai-translation-text
SDK β built-in retry/throttling, no hand-rolled HTTP clients.
Supported formats: .resx, .xliff, .po, .json, .ini, .restext.
Everything lives on the docs site: ievangelist.github.io/resource-translator
- π Getting started
- βοΈ Configuration β repo config, glossary, tone & industry
- π§Ύ Inputs & outputs
- π File formats
- π³ Recipes
- β FAQ
name: translate
on:
push:
branches: [main]
paths:
- "**/*.en.resx"
- "**/*.en.json"
permissions:
contents: write
pull-requests: write
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- id: translator
uses: IEvangelist/resource-translator@v3
with:
sourceLocale: en
subscriptionKey: ${{ secrets.AZURE_TRANSLATOR_SUBSCRIPTION_KEY }}
endpoint: ${{ secrets.AZURE_TRANSLATOR_ENDPOINT }}
region: ${{ secrets.AZURE_TRANSLATOR_REGION }}
toLocales: '["es","fr","de"]'
- if: steps.translator.outputs.has-new-translations == 'true'
uses: peter-evans/create-pull-request@v7
with:
branch: machine-translation
title: ${{ steps.translator.outputs.summary-title }}
body: ${{ steps.translator.outputs.summary-details }}
labels: localizationFor all inputs, repo config, glossary, tone/industry control, and recipes, see the full docs.
- π Changelog
- π Security policy
- π€ Contributing
- π Code of conduct
Thanks goes to these wonderful people (emoji key):
vs-savelich π» |
Yevgen Nykytenko π |
Peter Rekdal Khan-Sunde π |
Tim Heuer π π€ π |
Tibor Tompa π€ |
Matteo π» |
Jeffrey T. Fritz π |
This project follows the all-contributors specification. Contributions of any kind welcome!