Open a pull request after each run
- id: translate uses: IEvangelist/resource-translator@v3 with: sourceLocale: en subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} region: ${{ secrets.TRANSLATOR_REGION }}
- if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: branch: machine-translation title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} labels: localizationMonorepos: scope translation per package
with: sourceLocale: en include: | apps/web/**/*.en.resx packages/shared/**/*.en.json exclude: | **/dist/** **/__tests__/**Glossary for brand names and product terms
Drop a .github/resource-translator.yml into the repo:
glossary: Acme: Contoso Octocat: Octocat ".NET": ".NET" "C++": "C++"Glossary terms are applied after translation, so the machine-translated output keeps your preferred branding even when the model swapped it for a synonym.
Custom Translator category (industry / domain)
with: sourceLocale: en subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} categoryId: 1234abcd-5678-90ef-... Train an Azure Custom Translator category on a corpus that captures your industry vocabulary and tone (legal, medical, marketing, internal-engineering, etc.) and pass its ID via categoryId. This is the strongest tone lever Azure offers.
Tone control + strict fallback
# .github/resource-translator.yml# Industry / domain — choose your tone via a Custom Translator categorycategoryId: legal-en
# Treat profanity strictly for content aimed at younger audiencesprofanityAction: MarkedprofanityMarker: Tag
# Fail the run rather than silently fall back to the general modelallowFallback: false Combine a Custom Translator categoryId with profanityAction and allowFallback: false to enforce a consistent voice and fail the workflow if the chosen category does not have a deployment for one of your target locales.
Dry run before turning the workflow on
with: dryRun: true failOnError: false The action still emits summary outputs and a step summary, but no files are written. Combine with failOnError: false to surface every issue as a warning while you iterate.