Skip to content

Puo

Khetha puo ea hau

Tobetsa leqepheng le le leng ka puo e 'ngoe.

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

Tlhophiso ea polokelo

Express defaults hang in the repository config file and let every workflow inherit them. Liketso li lula li hlōla ha li fanoa ka bobeli.

Leqepheng lena

    Tlosa tsela ka ho kenya configPath haeba u hloka sebaka se sa fetoheng.

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

    Reference ea tšimo

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

    Khutlela ho kenyelletso ea sourceLocale haeba e sa sebelisoe. E boetse e romelloa ho Mofetoleli joalo ka from=<locale> e le hore likhoele tse khuts'oane ha li fumanoe ka boiketsetso.

    toLocales
    Mofuta
    string[]

    Ebang ke letoto kapa khoele e arohaneng ea comma.

    include / exclude
    Mofuta
    string[]

    Lipaterone tsa Glob tse hlahlojoang khahlano le litsela tse felletseng le tsa mosebetsi.

    glossary
    Mofuta
    map<string,string>

    Phetolelo ea morao-rao e fetisoa. Ho tseba moeli oa lentsoe (ho sebetsana le C++, .NET).

    categoryId
    Mofuta
    string

    Azure Custom Translator category — your industry/domain knob (legal, medical, marketing tone, etc.). E rometsoe joalo ka ?category=....

    textType
    Mofuta
    "plain" | "html"

    Ho hloleha ho plain. Sebelisa html feela haeba boleng ba hau ba mohloli bo na le likotoana tsa 'nete tsa HTML.

    profanityAction
    Mofuta
    "NoAction" | "Marked" | "Deleted"

    Mokhoa oa ho sebetsana le lipolelo tse sa tloaelehang liphetolelong tsa liphetolelo?

    profanityMarker
    Mofuta
    "Asterisk" | "Tag"

    E na le moelelo feela ha profanityAction "Marked".

    allowFallback
    Mofuta
    boolean

    Beha ho false ho hloleha phetolelo ha categoryId hau e se na ts'ebetso bakeng sa sebaka se shebiloeng ho fapana le ho khutlela mofuteng o akaretsang.

    apiVersion
    Mofuta
    string

    Translator REST API version. Ho hloleha ho 3.0.

    awsFormality
    Mofuta
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Mofuta
    boolean

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

    awsTerminologyNames / awsParallelDataNames
    Mofuta
    string[]

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

    googleModel
    Mofuta
    string

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

    googleApiEndpoint
    Mofuta
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Mofuta
    boolean

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

    maxRetries
    Mofuta
    integer

    Liteko tse phahameng tsa ho leka hape ho likarabo tsa nakoana tsa HTTP (408, 425, 429, 500, 502, 503, 504). Ho hloleha ho 5. Kakaretso ea mehala ea HTTP ka kopo e 1 + maxRetries.

    retryBackoffMs
    Mofuta
    integer

    Cap (MS) bakeng sa boroko bofe kapa bofe ba mokokotlo. Ho hloleha ho 30000. Hlooho ea Retry-After ea Azure e hlomphuoa hantle ha e le teng; ho seng joalo ho sebelisoa li-backoff tse sa tloaelehang, tse koahetsoeng ka boleng bona.

    protectPlaceholders
    Mofuta
    boolean

    Ho hloleha ho true. Ha e le teng, li-tokens tse kang {{name}}, ${var}, {0}, {0:N2}, %s, %1$s le HTML li nkeloa sebaka ke li-tokens tsa sentinel pele li fetoleloa ebe li khutlisetsoa morao. Tima feela ha mohloli o na le li-literals tse bōpehileng joaloka placeholder.

    customPlaceholderPatterns
    Mofuta
    string[]

    Lipaterone tse eketsehileng tsa regex (ntle le li-delimiters) li ekelitsoe ho sete ea sebaka sa marang-rang, mohlala <<.+?>> bakeng sa syntax ea letšoao la tloaelo. Li-regex tse sa sebetseng li hlokomolohuoa.

    noTranslatePatterns
    Mofuta
    string[]

    Lipaterone tsa Glob li bapisoa le linotlolo tsa boemo ba parser (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI / restext key). Linotlolo tse lumellanang li tlosoa ho tsoa ho kopo ebe li feta ka boleng ba tsona ba mohloli bo bolokiloeng.

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

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

    Taelo ea ho kenya

    1. Ketso e bala litlatsetso tse hlakileng ho tsoa ts'ebetsong ea mosebetsi.
    2. E kenya YAML config ho tloha configPath.
    3. Bakeng sa tšimo e 'ngoe le e' ngoe e arolelanoeng, kenyelletso e hlola; ho seng joalo, boleng ba YAML bo sebelisoa.
    4. Litekanyetso tse kopaneng li netefalitsoe. Li-enums tse sa sebetseng (mohlala, profanityAction: Mask) li etsa hore ketso e hlōlehe ka potlako ka molaetsa o hlakileng.

    Tone le indasteri ka mantsoe a hlakileng

    Azure AI Translator v3 API ha e na konopo e le 'ngoe ea molumo. Li-setting tse peli li kopanya ho u fa boholo ba taolo e tšoanang:

    • Indasteri / Domain: sebelisa categoryId ho supa sehlopha sa Azure Custom Translator se koetlisitsoeng ka corpus ea hau — molao, tekheniki, bongaka, papatso, kapa eng kapa eng. Ena ke sesebelisoa se matla ka ho fetisisa sa molumo, lentsoe la lebitso le mantsoe.
    • Sengoloa sa bokaholimo: Sebelisa Glossary ho notlela mabitso a lihlahisoa le mantsoe a sehlahisoa ka nepo, 'me u sebelise profanityAction ho hlakola mantsoe a litšila ha u shebile sebaka sa bamameli ba banyenyane.