Skip to content

Reo

A ma'iti i to outou reo

A taui i ni'a i te hoê â api na roto i te 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

Faanahoraa no te haaputuraa

A faaite i te mau parau faati'a i te hoê taime i roto i te putu'ite config file e a vaiiho i te mau ohipa atoa ia fatu i te reira. E upooti'a noa te mau mana'o no te ohipa ia horo'ahia mai na mea e piti.

I ni'a i teie api

    A mono i te e'a e te configPath mai te mea e hinaaro outou i te hoê vahi e ere i te mea matauhia.

    Hoho'a

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

    Faahororaa no te tuhaa fenua

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

    E ho'i mai i ni'a i te sourceLocale mai te mea e, aita i haamauhia. E hapono-atoa-hia i te Translator ei from=<locale> ia ore te mau taura poto e ite-noa-hia.

    toLocales
    Huru
    string[]

    Te hoê anairaa anei e aore râ, te hoê taura tei faataa-ê-hia e te vira.

    include / exclude
    Huru
    string[]

    Te mau hoho'a o te glob tei hi'opo'ahia ia au i te mau e'a papû e te vahi ohiparaa.

    glossary
    Huru
    map<string,string>

    Te mau ta'o i muri a'e i te iritiraa. Haapa'o i te oti'a o te ta'o (e haapa'o i te C++, .NET).

    categoryId
    Huru
    string

    Azure Custom Translator category — ta outou tuhaa ohipa (ture, rapaauraa, tapihooraa, e te tahi atu â). Haponohia mai te ?category=....

    textType
    Huru
    "plain" | "html"

    E tano i te plain. A faaohipa i te html mai te mea te vai ra te mau hu'ahu'a HTML mau i roto i ta outou mau faufaa.

    profanityAction
    Huru
    "NoAction" | "Marked" | "Deleted"

    Nahea ia faaohipa i te mau parau faufau i roto i te iritiraa.

    profanityMarker
    Huru
    "Asterisk" | "Tag"

    E mea faufaa noa ia profanityAction i te "Marked".

    allowFallback
    Huru
    boolean

    A faanaho i ni'a i te false ia ore e manuïa i te iritiraa mai te mea e, aita ta outou categoryId e faaohipahia no te hoê vahi opuaraa, eiaha râ e ho'i faahou i ni'a i te hoho'a rahi.

    apiVersion
    Huru
    string

    Translator REST API version. E tano i te 3.0.

    awsFormality
    Huru
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Huru
    boolean

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

    awsTerminologyNames / awsParallelDataNames
    Huru
    string[]

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

    googleModel
    Huru
    string

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

    googleApiEndpoint
    Huru
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Huru
    boolean

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

    maxRetries
    Huru
    integer

    Rahiraa tamataraa no te tamata faahou i ni'a i te mau pahonoraa HTTP poto (408, 425, 429, 500, 502, 503, 504). E tano i te 5. Te taatoaraa o te mau niuniu HTTP i te aniraa tata'itahi, e 1 + maxRetries ïa.

    retryBackoffMs
    Huru
    integer

    A tapo'i (ms) i ni'a i te hoê noa taotoraa. E tano i te 30000. E faahanahanahia te upoo parau Retry-After Azure i te taime ti'a ; aita ana'e, e faaohipahia te backoff exponential jittered, taoti'ahia i teie faufaa.

    protectPlaceholders
    Huru
    boolean

    E tano i te true. Mai te mea e, e monohia te mau token mai te {{name}}, ${var}, {0}, {0:N2}, %s, %1$s e HTML e te mau token sentinel hou te iritiraa e e faaho'ihia mai i muri iho. A tupohe noa mai te mea e, te vai ra te mau parau mau i roto i te tumu parau.

    customPlaceholderPatterns
    Huru
    string[]

    Te tahi atu mau hoho'a regex (aita e taoti'araa) tei tuuhia i ni'a i te faanahoraa placeholder, ei hi'oraa, <<.+?>> no te syntax o te token. Aita te mau regex tano ore e tau'a-ore-hia.

    noTranslatePatterns
    Huru
    string[]

    Te mau hoho'a glob e tu'ati i ni'a i te mau taviri parser (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI/restext key). E faaru'ehia te mau taviri tu'ati mai roto mai i te aniraa e e faahereherehia te faufaa tumu.

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

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

    Faanahoraa no te faautaraa

    1. E tai'o te ohipa i te mau mana'o papû no roto mai i te tereraa ohipa.
    2. E faauta te reira i te faanahoraa YAML mai te configPath.
    3. No te mau tuhaa tata'itahi, e upooti'a te mana'o ; aita ana'e, e faaohipahia te faufaa YAML.
    4. E haamanahia te mau faufaa amuihia. E faatupu te mau enum hape (ei hi'oraa, profanityAction: Mask) i te manuïa vitiviti o te ohipa na roto i te hoê poro'i maramarama.

    Te ta'iraa e te ohipa, i roto i te mau parau ohie

    Aita e pitopito ta'iraa i roto i te Azure AI Translator v3 API. E piti faanahoraa e amuihia no te horo'a ia outou i te hoê â hi'opo'araa :

    • Ohipa / tuhaa : a faaohipa i te categoryId no te faatoro i te hoê tuhaa Azure Custom Translator tei haapiipiihia i ni'a i ta outou iho faanahoraa — i te pae no te ture, i te pae aravihi, i te pae rapaauraa, i te tapihooraa, e aore râ, i te tahi atu mea. Teie te rave'a puai roa a'e no te ta'iraa, te reo e te ta'o.
    • Papa'iraa i ni'a i te papa'iraa : A faaohipa i te Glossary no te ponao i te mau i'oa o te mau tao'a e te mau parau no te mau tauihaa e a faaohipa i te profanityAction no te tamâ i te mau parau faufau no te faanaho i te vahi no te feia apî.