Step 1: Elija jump'éel proveedor traducción
Le molayil meyaj yéetel Azure AI Translator, AWS Translate ka Traducción u múuyal u Google paach jump'éel superficie API unificada. Elegir jump'éel chéen proveedor tumen ejecutada yéetel le provider yaan — le flujo meyaj ku comporta idénticamente independientemente u proveedor; Chéen le credenciales difieren. Wil Ku Páaybe'en u traducción utia'al jump'éel comparación completa.
Step 2: Añadir credenciales yéetel juntúul flujo meyaj
Almacenar le credenciales u proveedor bey secretos repositorio GitHub, ts'o'okole' crear .github/workflows/translate.yml. Seleccione u proveedor in continuación utia'al u configuración específica — u yaalab le flujo meyaj jach idéntico.
Azure AI Translator
Azure le proveedor tumen defecto, yo'olal provider ku páajtal omitir. Provisione jump'éel recurso Azure AI Translator ti' le portal Azure, ts'o'okole' almacenar u credenciales:
Almacenar lelo'oba' bey secretos repositorio
TRANSLATOR_KEY— le clave suscripción utia'al u recurso.TRANSLATOR_ENDPOINT— le URL endpoint regional.TRANSLATOR_REGION— región Azure le recurso.
Añadir le flujo meyaj
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | azure: subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} region: ${{ secrets.TRANSLATOR_REGION }} sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationAWS Translate
Ku ts'áaj provider aws. Prefiere OIDC yóol aws-actions/configure-aws-credentials yo'olal le ba'ax ma' u almacenan secretos chowakak kuxtal — le je'elo'oba' paso AWS_REGION ti' tech. Utia'al u utilizar wach'ebo'obo' estáticas tu kúuchilo'ob, almacenar:
Almacenar lelo'oba' bey secretos repositorio
AWS_ACCESS_KEY_ID— u ID clave muuk' AWS.AWS_SECRET_ACCESS_KEY— u clave muuk' secreta AWS.
Mantats' k'a'abet jump'éel petenil — establecer yéetel awsRegion wa le variable jeets' AWS_REGION.
Añadir le flujo meyaj
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: id-token: write # for aws-actions/configure-aws-credentials (OIDC) contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/gh-actions-translate aws-region: us-east-1 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | aws: region: us-east-1 # or rely on AWS_REGION from the step above formality: FORMAL brevity: true sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationTraducción u múuyal u Google
Ku ts'áaj provider google. Autenticar ts'o'ok bixake' yéetel jump'éel mayaj - yilaje' JSON credencial wa jump'éel clave API — suministrar exactamente jump'éel:
Almacenar lelo'oba' bey secretos repositorio
GCP_TRANSLATE_CREDENTIALS— jump'éel clave JSON ti'-yilaje' (bey juntúul cadena JSON).GCP_TRANSLATE_API_KEY— wa jump'éel clave API u Google Cloud.
Juntúul googleProjectId opcional u infiere ti' le credencial ken u omit.
Añadir le flujo meyaj
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | google: # Provide EITHER a service-account JSON credential... credentials: ${{ secrets.GCP_TRANSLATE_CREDENTIALS }} # ...OR an API key: # apiKey: ${{ secrets.GCP_TRANSLATE_API_KEY }} model: nmt sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationStep 3: Comprometer jump'éel archivo nu'ukulo'ob k'aaba'
Archivos nu'ukulo'ob utilizan le convención Name.<sourceLocale>.<ext>. Je'ebix Greetings.en.resx ku p'áatal ti' Greetings.fr.resx, Greetings.de.resx, ka bey sucesivamente ka' jump'éel xook.
Step 4: Let smart change detection protect your bill
changeDetection defaults to smart and stores a compact .github/resource-translator-state.json manifest in the repo. Commit that file so future runs can reuse stable translations, preserve manual target edits, and send only new, missing, changed, or settings-invalidated keys to the provider. If localized files already exist, run once with snapshotOnly: true to create the manifest without provider calls.
Step 5: Inspeccione u tíip'ik
Una pakteche' kin ts'o'okok le flujo meyaj asab ye'esik óoxp'éel salidas ku páajtal cablear ti' jump'éel tsoolil PR: summary-title, summary-details ka has-new-translations. Xan ts'íib jump'éel resumen Markdown ti' u linki abas kaambal meyaj yóol core.summary.