Whakatuwheratia he tono kume i muri i ia whakahaere
- 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: whakawhitinga whānuitanga mō ia mōkī
with: sourceLocale: en include: | apps/web/**/*.en.resx packages/shared/**/*.en.json exclude: | **/dist/** **/__tests__/**Papakupu mō ngā ingoa parani me ngā kupu hua
Whakataka .github/resource-translator.yml ki roto i te repo:
glossary: Acme: Contoso Octocat: Octocat ".NET": ".NET" "C++": "C++"Ka hoatu ngā kupu papakupu i muri i te te whakamāoritanga, nā reira ka puritia e te huaputa whakamāori-mīhini tō tohu manako ahakoa i whakawhitia e te tauira mō tētahi kupu taurite.
Kāwai Kaiwhakamāori Ritenga (ahumahi/rohe)
with: sourceLocale: en subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} categoryId: 1234abcd-5678-90ef-... Whakaakona tētahi kāwai Azure Custom Translator ki tētahi huinga e hopu ana i ō kupu me te oro o te umanga (ā-ture, rongoā, mākete, pūkaha ā-roto, aha atu) ka tukuna tōna ID mā te categoryId. Koinei te kōwhiti oro tino kaha e tukuna ana e Azure.
Mana oro + whakahoki pākaha
# .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 Whakakotahitia tētahi categoryId Kaiwhakamāori Ritenga ki te profanityAction me te allowFallback: false hei whakaū i tētahi reo ōrite, ā, ka rahua te rerengamahi mēnā kāore he tukunga o te kāwai i kōwhiria mō tētahi o ō rohe ūnga.
Whakahaere maroke i mua i te whakakānga o te rerengamahi
with: dryRun: true failOnError: false Ka whakaputa tonu te hohenga i ngā huaputa whakarāpopoto me tētahi whakarāpopototanga hipanga, engari kāore he kōnae i tuhia. Whakakotahitia me failOnError: false ki te whakaputa i ia take hei whakatūpato i a koe e auau ana.