One source key changes
Smart detection isolates the delta before any provider call.
為航運而建
將呢個動作放入你現有嘅CI,指向Azure、AWS或者Google,令你嘅倉庫可以同你目標嘅語言溝通。
Default in v3.2
A compact .github/resource-translator-state.json tracks parser keys, source hashes, and translation-affecting settings. The action skips stable keys, preserves manual target edits, and logs every decision with rule codes. Use snapshotOnly to bootstrap existing translations without a provider call.
Most runs translate only the changed keys
來回行程.resx、.xliff、.po、.json、.ini同.restext,格式穩定。
放一個.github/resource-translator.yml檔案,包含 globs、詞彙表同自訂翻譯器分類。
用智能字邊界正則表達式鎖定品牌名同產品名稱,處理C++、.NET同朋友。
預覽翻譯時唔寫檔案,或者喺迭代時將每個錯誤當成警告顯示。
summary-title、summary-details 同 has-new-translations 直接插入 create-pull-request。
每次跑步揀一個供應商。 每個 SDK 都用官方 SDK(@azure-rest/ai-translation-text、@aws-sdk/client-translate、@google-cloud/translate)驅動,408/429/5xx 自動重試 - - 冇手卷 HTTP。 esbuild捆綁,審計乾淨。
Resource Translator 會用 Azure、AWS 或 Google 開啟機器翻譯嘅資源檔案 pull request - - 一個統一操作,每次執行一個供應商,底層有官方 SDK。
開始name: translateon: push: 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 provider: | azure: subscriptionKey: ${{ secrets.KEY }} endpoint: ${{ secrets.ENDPOINT }} region: ${{ secrets.REGION }} toLocales: '["fr","de","es","ja"]'
- uses: peter-evans/create-pull-request@v7 with: title: Update translations一個供應商密鑰 - - Azure、AWS 或 Google - - 同一個工作流程檔案。 剩低嘅嘢就用資源翻譯器處理。