ເປີດ pull request ຫຼັງຈາກການແລ່ນແຕ່ລະເທື່ອ
- 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: ການແປຂອບເຂດຕໍ່ແພັກເກດ
with: sourceLocale: en include: | apps/web/**/*.en.resx packages/shared/**/*.en.json exclude: | **/dist/** **/__tests__/**ຄໍາສັບສໍາລັບຊື່ແບຣນ ແລະ ຄໍາສັບຂອງຜະລິດຕະພັນ
ວາງ ຂໍ້ .github/resource-translator.yml ໃນ repo:
glossary: Acme: Contoso Octocat: Octocat ".NET": ".NET" "C++": "C++"ຄໍາ ສັບ ຂອງ ຄໍາ ສັບ ຈະ ຖືກ ນໍາ ໃຊ້ ຫຼັງຈາກ ການ ແປ, ສະ ນັ້ນ ຜົນ ສະ ທ້ອນ ທີ່ ແປ ໂດຍ ເຄື່ອງ ຈັກ ຈະ ຮັກ ສາ brand ທີ່ ທ່ານ ມັກ ເຖິງ ແມ່ນ ວ່າ model ໄດ້ ແລກ ປ່ຽນ ມັນ ເປັນ ຄໍາ ທີ່ ຄ້າຍ ຄື ກັນ.
ປະເພດ Custom Translator (ອຸດສາຫະກໍາ / domain)
with: sourceLocale: en subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} categoryId: 1234abcd-5678-90ef-... ຝຶກອົບຮົມປະເພດ Azure Custom Translator ໃນກຸ່ມທີ່ຈັບຄໍາສັບແລະນໍ້າສຽງໃນອຸດສະຫະກໍາຂອງເຈົ້າ (ກົດຫມາຍ, ການແພດ, ການຕະຫຼາດ, ວິສະວະກອນພາຍໃນ, ແລະອື່ນໆ) ແລະສົ່ງ ID ຂອງມັນຜ່ານ categoryId. ນີ້ ຄື ສຽງ ທີ່ ເຂັ້ມ ແຂງ ທີ່ ສຸດ ທີ່ Azure ສະ ເຫນີ.
ການ ຄວບ ຄຸມ ນ້ໍາ ສຽງ + ການ ປ່ຽນ ແປງ ຢ່າງ ເຄັ່ງ ຄັດ
# .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 ລວມເອົາລະບົບ Custom Translator categoryId ກັບ profanityAction ແລະ allowFallback: false ເພື່ອບັງຄັບສຽງທີ່ສອດຄ່ອງແລະລົ້ມລະລາຍຖ້າປະເພດທີ່ເລືອກບໍ່ມີການນໍາໃຊ້ສໍາລັບຫນຶ່ງໃນທ້ອງຖິ່ນເປົ້າຫມາຍຂອງເຈົ້າ.
ແລ່ນ ແຫ້ງ ກ່ອນ ເປີດ ວຽກ ງານ
with: dryRun: true failOnError: false ການກະທໍາຍັງສົ່ງຜົນສະຫລຸບແລະສະຫຼຸບຂັ້ນຕອນ, ແຕ່ບໍ່ມີການຂຽນແຟ້ມ. ຮ່ວມ ກັບ ການ failOnError: false ເພື່ອ ສະ ແດງ ບັນ ຫາ ທຸກ ຢ່າງ ເພື່ອ ເປັນ ການ ເຕືອນ ໃນ ຂະ ນະ ທີ່ ທ່ານ ເຮັດ ຊ້ໍາ ອີກ.