Skip to content

Polelo

Kgetha leleme la gago

Fetolela letlakala le tee ka leleme le lengwe.

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

Sebopego sa polokelo

Express defaults once in the repository config file and let every workflow inherit them. Action inputs always win when both are given.

Letlakala le

    Kgonthiša gore o na le configPath ya go tsenya ge e le gore o hloka lefelo leo le sa fetogego.

    Schema

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

    Tšhupetšo ya Tšhemo

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

    E tla boela morago go sourceLocale ge e le gore ga se ya beakanywa. Also forwarded to Translator as from=<locale> so short strings are not autodetected.

    toLocales
    Mohuta
    string[]

    goba bja boitlamo goba go tšweletša mangwalo;

    include / exclude
    Mohuta
    string[]

    Glob patterns tested against absolute and workspace-relative paths.

    glossary
    Mohuta
    map<string,string>

    Post-translation term overrides. Word-boundary aware (handles C++, .NET).

    categoryId
    Mohuta
    string

    Azure Custom Translator category — your industry/domain knob (legal, medical, marketing tone, etc.). Sent ya ?category=....

    textType
    Mohuta
    "plain" | "html"

    Refilwe plain. Use html only if your resource values contain real HTML fragments.

    profanityAction
    Mohuta
    "NoAction" | "Marked" | "Deleted"

    Ka moo o ka šomišago ditaodišosengwalo tša Sepedi ka go fetolela?

    profanityMarker
    Mohuta
    "Asterisk" | "Tag"

    E na le mohola fela ge profanityAction "Marked".

    allowFallback
    Mohuta
    boolean

    Set to false to fail the translation when your categoryId has no deployment for a target locale instead of falling back to the general model.

    apiVersion
    Mohuta
    string

    Translator REST API version. Refilwe 3.0.

    awsFormality
    Mohuta
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Mohuta
    boolean

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

    awsTerminologyNames / awsParallelDataNames
    Mohuta
    string[]

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

    googleModel
    Mohuta
    string

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

    googleApiEndpoint
    Mohuta
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Mohuta
    boolean

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

    maxRetries
    Mohuta
    integer

    Maximum retry attempts on transient HTTP responses (408, 425, 429, 500, 502, 503, 504). Refilwe 5. Palomoka ya megala ya HTTP ka kgopelo ke 1 + maxRetries.

    retryBackoffMs
    Mohuta
    integer

    Lebo Sekgobela - Lebo Sekgobela - Lebo Sekgobela Refilwe 30000. Hlogo ya Retry-After ya Azure e hlomphiwa gabotse ge e le gona; otherwise jittered exponential backoff is used, capped at this value.

    protectPlaceholders
    Mohuta
    boolean

    Refilwe true. When on, tokens like {{name}}, ${var}, {0}, {0:N2}, %s, %1$s and HTML entities are replaced with sentinel tokens before translation and restored later. Disable only when source intentionally contains placeholder-shaped literals.

    customPlaceholderPatterns
    Mohuta
    string[]

    Extra regex patterns (without delimiters) added to the default placeholder set, e.g. <<.+?>> for custom token syntax. Melao ye e sego ya maleba e a hlokomologwa.

    noTranslatePatterns
    Mohuta
    string[]

    Glob patterns matched against parser-level keys (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI/restext key). Dinotlelo tša go swana di tlošwa go tšwa go kgopelo gomme di fetišetšwa ka boleng bja tšona bja mothopo bo bolokilwe.

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

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

    Loading order

    1. Mongwadi o bala ditaodišosengwalo tša Sepedi go tšwa go Kgoro ya Merero ya Selegae.
    2. It loads the YAML config from configPath.
    3. Mo tšhemong ye nngwe le ye nngwe ye e abelanwago, input e a fenya; go sego bjalo, boleng bja YAML bo a šomišwa.
    4. Ditekanyetšo tše di kopantšwego di a tiišetšwa. Mantšu ao a sa amogelegego (mohlala, profanityAction: Mask) a dira gore molaetša o se ke wa palelwa ka pela ka molaetša wo o kwagalago.

    Tone & Industry in plain terms

    Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Mp3 Ditefelo tše pedi di kopanya go go fa bontši bja taolo e swanago:

    • Industry / domain: diriša categoryId go šupa sehlopha sa Azure Custom Translator seo se hlahlilwego ka corpus ya gago — ya molao, ya sethekniki, ya kalafo, ya papatšo, goba se sengwe le se sengwe. Ye ke segalo se segolo sa segalo, segalo le tlotlontšu.
    • Sengwalwa sa bokagodimo: Use the Glossary to lock brand names and product terms verbatim, and use profanityAction to scrub profane terms when targeting localization for young audiences.