Hla mus rau cov ntsiab lus

Hom Lus

Xaiv koj hom lus

Hloov mus rau tib nplooj ntawv ua lwm hom lus.

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

Repository configuration

Express defaults ib zaug nyob rau hauv lub repository config ntaub ntawv thiab cia txhua workflow inherit lawv. Kev nqis tes ua inputs yeej yeej thaum ob qho tib si muab.

Ntawm nplooj ntawv no

    Override txoj kev nrog cov configPath tswv yim yog tias koj xav tau qhov chaw tsis yog lub neej ntawd.

    Cov phiaj xwm

    .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.*"

    Field reference

    provider
    Hom
    "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
    Hom
    string

    Ntog rov qab mus rau qhov sourceLocale tswv yim yog tias tsis tau teeb tsa. Kuj tau xa mus rau Tus Neeg Txhais Lus raws li from=<locale> yog li cov hlua luv luv tsis autodetected.

    toLocales
    Hom
    string[]

    Tog twg los ib tug array los yog ib tug comma-cais hlua.

    include / exclude
    Hom
    string[]

    Glob qauv ntsuam xyuas tawm tsam qhov tseeb thiab chaw ua hauj lwm-txheeb ze txoj kev.

    glossary
    Hom
    map<string,string>

    Tom qab txhais lus overrides. Lo lus-ciam teb paub (tuav C++, .NET).

    categoryId
    Hom
    string

    Azure Custom Translator qeb — koj qhov kev lag luam / sau pob (kev cai lij choj, kev kho mob, kev lag luam suab, thiab lwm yam). Xa raws li ?category=....

    textType
    Hom
    "plain" | "html"

    Defaults rau plain. Siv html tsuas yog tias koj cov peev txheej muaj cov khoom siv tiag tiag HTML tawg.

    profanityAction
    Hom
    "NoAction" | "Marked" | "Deleted"

    Yuav ua li cas kho cov ntsiab lus profane hauv cov zis txhais

    profanityMarker
    Hom
    "Asterisk" | "Tag"

    Tsuas yog muaj txiaj ntsig thaum profanityAction yog "Marked".

    allowFallback
    Hom
    boolean

    Teem rau false kom ua tsis tiav qhov kev txhais lus thaum koj lub categoryId tsis muaj kev xa tawm rau lub hom phiaj hauv zos es tsis txhob poob rov qab mus rau tus qauv dav dav.

    apiVersion
    Hom
    string

    Tus neeg txhais lus REST API version. Defaults rau 3.0.

    awsFormality
    Hom
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Hom
    boolean

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

    awsTerminologyNames / awsParallelDataNames
    Hom
    string[]

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

    googleModel
    Hom
    string

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

    googleApiEndpoint
    Hom
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Hom
    boolean

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

    maxRetries
    Hom
    integer

    Qhov siab tshaj plaws rov sim ntawm cov lus teb HTTP ib ntus (408, 425, 429, 500, 502, 503, 504). Defaults rau 5. Tag nrho HTTP hu rau ib qho kev thov yog 1 + maxRetries.

    retryBackoffMs
    Hom
    integer

    Cap (ms) ntawm ib qho kev pw tsaug zog rov qab. Defaults rau 30000. Azure lub Retry-After header yog honored raws nraim thaum muaj; txwv tsis pub jittered exponential backoff yog siv, capped ntawm tus nqi no.

    protectPlaceholders
    Hom
    boolean

    Defaults rau true. Thaum nyob rau, tokens zoo li {{name}}, ${var}, {0}, {0:N2}, %s, %1$s thiab HTML cov chaw raug hloov nrog sentinel tokens ua ntej txhais lus thiab rov qab kho tom qab. Lov tes taw tsuas yog thaum qhov chaw txhob txwm muaj qhov chaw zoo li qhov tseeb.

    customPlaceholderPatterns
    Hom
    string[]

    Ntxiv regex qauv (tsis muaj delimiters) ntxiv rau lub neej ntawd placeholder teeb, piv txwv li <<.+?>> rau kev cai token syntax. Cov regexes tsis raug tsis quav ntsej.

    noTranslatePatterns
    Hom
    string[]

    Glob qauv sib phim tiv thaiv parser-theem yuam sij (JSON dotted path, RESX name, PO msgid, XLIFF chav tsev id, INI / restext yuam sij). Cov yuam sij sib txuam yog poob los ntawm qhov kev thov thiab dhau los ntawm lawv qhov chaw tus nqi khaws cia.

    changeDetection
    Hom
    "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
    Hom
    string

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

    Chaw thau khoom txiav txim

    1. Qhov kev nqis tes ua nyeem cov tswv yim meej los ntawm kev ua haujlwm.
    2. Nws thauj khoom YAML config los ntawm configPath.
    3. Rau txhua daim teb sib koom, cov tswv yim yeej; txwv tsis pub siv tus nqi YAML.
    4. Cov txiaj ntsig sib koom ua ke yog validated. Cov enums tsis raug (piv txwv li profanityAction: Mask) ua rau qhov kev ua tsis tiav sai nrog cov lus meej.

    Lub suab thiab kev lag luam, hauv cov ntsiab lus yooj yim

    Azure AI Translator v3 API tsis muaj ib lub suab nrov. Ob qhov chaw ua ke los muab koj feem ntau ntawm tib qho kev tswj hwm:

    • Kev lag luam / domain: siv categoryId taw tes rau ib qho Azure Custom Translator qeb uas tau kawm ntawm koj tus kheej corpus — kev cai lij choj, thev naus laus zis, kev kho mob, kev lag luam, lossis lwm yam. Qhov no yog qhov muaj zog tshaj plaws rau lub suab, hom suab thiab cov lus.
    • Cov ntawv nyeem: Siv cov phau ntawv txhais lus los xauv cov npe lag luam thiab cov khoom lag luam cov lus verbatim, thiab siv profanityAction los txhuam cov lus tsis zoo thaum lub hom phiaj hauv zos rau cov neeg tuaj saib hluas.