Tīpoka ki te ihirangi

Reo

Kōwhiria tō reo

Whakawhitia ki te whārangi ōrite i roto i tētahi atu reo.

EnglishEnglishenAfrikaansAfrikaansafአማርኛAmharicamالعربيةArabicarঅসমীয়াAssameseasAzərbaycanAzerbaijaniazБашҡортBashkirbaБългарскиBulgarianbgभोजपुरीBhojpuribhoবাংলাBanglabnབོད་སྐད་Tibetanboबड़ोBodobrxBosanskiBosnianbsCatalàCatalancaČeštinaCzechcsCymraegWelshcyDanskDanishdaDeutschGermandeडोगरीDogridoiDolnoserbšćinaLower SorbiandsbދިވެހިބަސްDivehidvΕλληνικάGreekelEspañolSpanishesEestiEstonianetEuskaraBasqueeuفارسیPersianfaSuomiFinnishfiFilipinoFilipinofilVakavitiFijianfjFøroysktFaroesefoFrançaisFrenchfrFrançais (Canada)French (Canada)fr-CAGaeilgeIrishgaGalegoGalicianglकोंकणीKonkanigomગુજરાતીGujaratiguHausaHausahaעבריתHebrewheहिन्दीHindihiछत्तीसगढ़ीChhattisgarhihneHrvatskiCroatianhrHornjoserbsceUpper SorbianhsbHaitian CreoleHaitian CreolehtMagyarHungarianhuՀայերենArmenianhyIndonesiaIndonesianidÌgbòIgboigInuinnaqtunInuinnaqtuniktÍslenskaIcelandicisItalianoItalianitᐃᓄᒃᑎᑐᑦInuktitutiuInuktitut (Latin)Inuktitut (Latin)iu-Latn日本語JapanesejaქართულიGeorgiankaҚазақ ТіліKazakhkkខ្មែរKhmerkmKurmancîKurdish (Northern)kmrಕನ್ನಡKannadakn한국어KoreankoكٲشُرKashmiriksکوردیی ناوەندیKurdish (Central)kuКыргызчаKyrgyzkyLëtzebuergeschLuxembourgishlbLingálaLingalalnລາວLaoloLietuviųLithuanianltLugandaGandalugLatviešuLatvianlv中文 (文言文)Chinese (Literary)lzhमैथिलीMaithilimaiMalagasyMalagasymgTe Reo MāoriMāorimiМакедонскиMacedonianmkമലയാളംMalayalammlМонгол хэлMongolian (Cyrillic)mn-Cyrlᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡMongolian (Traditional)mn-MongমৈতৈলোনManipurimniमराठीMarathimrMelayuMalaymsMaltiMaltesemtHmong DawHmong Dawmwwမြန်မာMyanmar (Burmese)myNorsk BokmålNorwegian BokmålnbनेपालीNepalineNederlandsDutchnlSesotho sa LeboaSesotho sa LeboansoChinyanjaChichewanyaଓଡ଼ିଆOdiaorHñähñuQuerétaro OtomiotqਪੰਜਾਬੀPunjabipaPolskiPolishplدریDariprsپښتوPashtopsPortuguês (Brasil)Portuguese (Brazil)ptPortuguês (Portugal)Portuguese (Portugal)pt-PTRomânăRomanianroРусскийRussianruIkirundiRundirunKinyarwandaKinyarwandarwسنڌيSindhisdසිංහලSinhalasiSlovenčinaSlovakskSlovenščinaSlovenianslGagana SāmoaSamoansmchiShonaShonasnSoomaaliSomalisoShqipAlbaniansqСрпски (ћирилица)Serbian (Cyrillic)sr-CyrlSrpski (latinica)Serbian (Latin)sr-LatnSesothoSesothostSvenskaSwedishsvKiswahiliSwahiliswதமிழ்TamiltaతెలుగుTeluguteไทยThaithትግርTigrinyatiTürkmen DiliTurkmentkLea fakatongaTongantoTürkçeTurkishtrТатарTatarttReo TahitiTahitiantyئۇيغۇرچەUyghurugУкраїнськаUkrainianukاردوUrduurUzbek (Latin)Uzbek (Latin)uzTiếng ViệtVietnameseviisiXhosaisiXhosaxhÈdè YorùbáYorubayoYucatec MayaYucatec Mayayua粵語Cantonese (Traditional)yue中文 (简体)Chinese Simplifiedzh-Hans中文 (繁體)Chinese Traditionalzh-HantisiZuluisiZuluzu

YAML

Whirihoranga putunga

Kia kotahi te whakapuaki i ngā taunoa i roto i te kōnae whirihoranga putunga, ā, ka tuku i ia rerengamahi kia riro i a rātou. Ka toa ngā tāurunga hohenga i ngā wā katoa ina tukua ngā mea e rua.

I tēnei whārangi

    Takahi i te ara ki te tāuru configPath mēnā e hiahia ana koe ki tētahi tauwāhi taunoa-kore.

    Aronuinga

    .github/resource-translator.yml
    # .github/resource-translator.yml
    sourceLocale: en
    # Provider config can be nested. Keep secrets in workflow inputs; use repo
    # config for non-secret defaults like region, model, formality, or category.
    provider:
    azure:
    categoryId: my-custom-translator-category
    apiVersion: "3.0"
    allowFallback: true
    toLocales:
    - fr
    - de
    - es
    include:
    - "src/**/*.en.json"
    - "apps/**/*.en.resx"
    exclude:
    - "**/__tests__/**"
    glossary:
    Acme: Contoso
    Octocat: Octocat # keep brand names verbatim
    # Translator request shape — most users can ignore these.
    textType: plain # plain | html
    profanityAction: NoAction # NoAction | Marked | Deleted
    profanityMarker: Asterisk # Asterisk | Tag (only when profanityAction == Marked)
    # Resilience — Translator returns 429 under load. Defaults are usually
    # fine; tune only if your runs are large enough to hit them.
    maxRetries: 5
    retryBackoffMs: 30000 # cap on any single backoff sleep (ms)
    # Placeholder protection. ON by default — wraps tokens like {{name}},
    # {0}, %s, ${var} into sentinels before translation and restores them
    # on the way back. Set false only when source intentionally contains
    # placeholder-shaped literals.
    protectPlaceholders: true
    customPlaceholderPatterns:
    - "<<.+?>>" # any extra token syntax you use
    # Per-key opt-out. Keys matching any glob are dropped from the request
    # and pass through with the source value preserved.
    noTranslatePatterns:
    - "errors.code.*"
    - "brands.*"

    Tohutoro āpure

    provider
    Momo
    "azure" | "aws" | "google" | provider block

    Either a provider string or a nested provider block (provider.azure, provider.aws, or provider.google). Prefer nested blocks for provider-specific settings; keep secrets in workflow inputs rather than committed config.

    sourceLocale
    Momo
    string

    Ka hoki whakamuri ki te tāuru sourceLocale ki te kore e tautuhia. Ka whakamua hoki ki te Kaiwhakamāori hei from=<locale> kia kore ai ngā aho poto e kiteanoatia.

    toLocales
    Momo
    string[]

    He huānga, he aho whakawehe-piko rānei.

    include / exclude
    Momo
    string[]

    Ngā tauira glob i arotakea ki ngā ara pūmau me ngā ara pātahi mokowāmahi.

    glossary
    Momo
    map<string,string>

    Ngā takahitanga kupu i muri i te whakamāoritanga. E mōhio ana ki te rohenga-kupu (ka raweke i te C++, .NET).

    categoryId
    Momo
    string

    Kāwai Custom Translator Azure — tō pona umanga/rohe (ā-ture, rongoā, oro mākete, aha atu). I tukua hei ?category=....

    textType
    Momo
    "plain" | "html"

    Taunoa ai ki te plain. Whakamahia html anake mēnā he kongakonga HTML tūturu kei ō uara rauemi.

    profanityAction
    Momo
    "NoAction" | "Marked" | "Deleted"

    Me pēhea te whakamahi i ngā kupu whakarihariha i roto i te huaputa kua whakamāoritia.

    profanityMarker
    Momo
    "Asterisk" | "Tag"

    Whai tikanga anake ina profanityAction "Marked".

    allowFallback
    Momo
    boolean

    Tautuhia ki te false kia rahua te whakawhitinga ina kore tō categoryId e tuku mō tētahi wāhi ūnga, kaua e hoki whakamuri ki te tauira ahuwhānui.

    apiVersion
    Momo
    string

    Putanga REST API kaiwhakamāori. Taunoa ai ki te 3.0.

    awsFormality
    Momo
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Momo
    boolean

    Set to true to enable AWS Translate brevity mode for supported language pairs.

    awsTerminologyNames / awsParallelDataNames
    Momo
    string[]

    AWS Translate custom terminology and parallel data resource names. Either an array or comma-separated string.

    googleModel
    Momo
    string

    Google Cloud Translation model, e.g. nmt or base.

    googleApiEndpoint
    Momo
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Momo
    boolean

    Optional Google Cloud Translation automatic retry toggle. Leave unset to use the Google client default.

    maxRetries
    Momo
    integer

    Ko te mōrahi o ngā nganatanga ngana anō i runga i ngā urupare HTTP rangitahi (408, 425, 429, 500, 502, 503, 504). Taunoa ai ki te 5. He 1 + maxRetries te tapeke o ngā waea HTTP mō ia tono.

    retryBackoffMs
    Momo
    integer

    Pū (ms) i runga i tētahi moe whakamuri kotahi. Taunoa ai ki te 30000. Ka whakahonoretia te pane Retry-After o Azure i te wā i konei; ki te kore ka whakamahia te whakahoki taupua āmaimai, ka whakawhāititia ki tēnei uara.

    protectPlaceholders
    Momo
    boolean

    Taunoa ai ki te true. Ina kā ana, ka whakakapia ngā maimai pēnei i te {{name}}, ${var}, {0}, {0:N2}, %s, %1$s me ngā mea HTML ki ngā maimai sentinel i mua i te whakamāoritanga, ā, ka whakaoratia i muri iho. Monokia anake mēnā kei roto i te pūtake ngā āhuatanga puriwāhi.

    customPlaceholderPatterns
    Momo
    string[]

    Kua tāpirihia ētahi atu tauira regex (me te kore kaiwehe) ki te huinga puriwāhi taunoa, hei tauira, <<.+?>> mō te wetereo maimai ritenga. Ka waihotia ngā kōrero kōrero muhu.

    noTranslatePatterns
    Momo
    string[]

    Ko ngā tauira glob e ōrite ana ki ngā kī taumata-parser (ara iraira JSON, RESX name, PO msgid, XLIFF unit id, kī INI/restext). Ka whakatakahia ngā kī ōrite mai i te tono, ā, ka puta atu me te uara pūtake e pupuritia ana.

    changeDetection
    Momo
    "smart" | "disabled"

    Defaults to smart. Uses the committed state manifest to translate only changed or missing parser keys. Set to disabled or false to preserve the legacy always-translate behavior.

    statePath
    Momo
    string

    Path to the deterministic smart change-detection state manifest. Defaults to .github/resource-translator-state.json.

    Uta ana i te raupapa

    1. Ka pānui te hohenga i ngā tāurunga mārama mai i te rerengamahi.
    2. Ka utaina te whirihoranga YAML mai i configPath.
    3. Mō ia āpure tiritiri, ka toa te tāuru; ki te kore ka whakamahia te uara YAML.
    4. Kua whakamanatia ngā uara hanumi. Mā ngā tau muhu (hei tauira, profanityAction: Mask) ka rahua tere te hohenga me tētahi karere ūkui.

    Oro me te mahi, i roto i ngā kupu māmā

    Kāore he pona oro kotahi o te Azure AI Translator v3 API. E rua ngā tautuhinga e paheko ana hei hoatu i te nuinga o te mana ōrite:

    • Ahumahi / rohe: whakamahia categoryId hei tohu i tētahi kāwai Azure Custom Translator kua whakaakona ki tō ake huinga — ā-ture, hangarau, rongoā, mākete, tētahi atu mea rānei. Koinei te kōwhiti tino kaha mō te oro, te reo parani, me te kupu.
    • Kuputuhi mata: Whakamahia te pukapuka kupu hei maukati i ngā ingoa parani me ngā kupu hua kuputuhi, me te whakamahi i te profanityAction hei horoi i ngā kupu whakarihariha ina whakarite i te whakawāteatanga mō ngā kaimātakitaki tamariki.