Scipeáil chuig an ábhar

Teanga

Roghnaigh do theanga

Athraigh go dtí an leathanach céanna i dteanga eile.

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

Cumraíocht an stórtha

Réamhshocraíonn Express uair amháin i gcomhad cumraíochta an stór agus lig do gach sreabhadh oibre iad a oidhreacht. Bhuaigh ionchuir gníomhaíochta i gcónaí nuair a chuirtear an dá cheann ar fáil.

Ar an leathanach seo

    Sáraigh an cosán leis an ionchur configPath má theastaíonn suíomh neamhréamhshocraithe uait.

    Scéimre

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

    Tagairt réimse

    provider
    Cineál
    "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
    Cineál
    string

    Titeann sé ar ais go dtí an t-ionchur sourceLocale mura bhfuil sé socraithe. Chomh maith leis sin ar aghaidh chuig an Aistritheoir mar from=<locale> ionas nach ndéantar teaghráin ghearra a bhrath go huathoibríoch.

    toLocales
    Cineál
    string[]

    Eagar nó teaghrán scartha le camóga.

    include / exclude
    Cineál
    string[]

    Patrúin glob a mheastar i gcoinne cosáin absalóideacha agus spás oibre.

    glossary
    Cineál
    map<string,string>

    Sáraíonn téarma iar-aistriúcháin. Feasach ar theorainn focal (láimhseálann C++, .NET).

    categoryId
    Cineál
    string

    Catagóir Azure Custom Translator - do knob tionscail / fearainn (dlíthiúil, leighis, ton margaíochta, srl.). Seolta mar ?category=....

    textType
    Cineál
    "plain" | "html"

    Réamhshocraithe go plain. Úsáid html ach amháin má tá fíor-bhlúirí HTML i do luachanna acmhainne.

    profanityAction
    Cineál
    "NoAction" | "Marked" | "Deleted"

    Conas téarmaí profane a chóireáil san aschur aistrithe.

    profanityMarker
    Cineál
    "Asterisk" | "Tag"

    Ach amháin nuair a bhíonn profanityAction "Marked".

    allowFallback
    Cineál
    boolean

    Socraigh go false go dteipfidh ar an aistriúchán nuair nach bhfuil aon imscaradh ag do categoryId le haghaidh sprioc-áitiúil seachas titim ar ais go dtí an tsamhail ghinearálta.

    apiVersion
    Cineál
    string

    Leagan API REST an Aistritheora. Réamhshocraithe go 3.0.

    awsFormality
    Cineál
    "FORMAL" | "INFORMAL"

    AWS Translate formality setting for supported target languages.

    awsBrevity
    Cineál
    boolean

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

    awsTerminologyNames / awsParallelDataNames
    Cineál
    string[]

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

    googleModel
    Cineál
    string

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

    googleApiEndpoint
    Cineál
    string

    Optional Google Cloud Translation API endpoint override.

    googleAutoRetry
    Cineál
    boolean

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

    maxRetries
    Cineál
    integer

    Uasmhéid iarrachtaí athiarrachta ar fhreagairtí HTTP neamhbhuana (408, 425, 429, 500, 502, 503, 504). Réamhshocraithe 5. Is 1 + maxRetries glaonna HTTP iomlán in aghaidh an iarratais.

    retryBackoffMs
    Cineál
    integer

    Caipín (ms) ar aon chodladh cúlú amháin. Réamhshocraithe go 30000. Tugtar onóir do cheanntásc Retry-After Azure go díreach nuair a bhíonn sé i láthair; seachas sin úsáidtear cúlú easpónantúil jittered, uasteorannaithe ag an luach seo.

    protectPlaceholders
    Cineál
    boolean

    Réamhshocraithe go true. Nuair a bhíonn siad ar siúl, cuirtear comharthaí sentinel in ionad comharthaí cosúil le {{name}}, ${var}, {0}, {0:N2}, %s, %1$s agus HTML sula ndéantar iad a aistriú agus a athchóiriú ina dhiaidh sin. Díchumasaigh ach amháin nuair a bhíonn litreacha i gcruth ionaid ag an bhfoinse d'aon ghnó.

    customPlaceholderPatterns
    Cineál
    string[]

    Patrúin bhreise regex (gan teorannaithe) curtha leis an tacar ionaid réamhshocraithe, m.sh. <<.+?>> le haghaidh comhréir comhartha saincheaptha. Déantar neamhaird ar rialaithe neamhbhailí.

    noTranslatePatterns
    Cineál
    string[]

    Patrúin glob meaitseáilte i gcoinne eochracha leibhéal parsálaí (cosán poncaithe JSON, RESX name, PO msgid, aonad XLIFF id, eochair INI / restext). Titeann eochracha meaitseála ón iarratas agus téann siad tríd lena luach foinse caomhnaithe.

    changeDetection
    Cineál
    "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
    Cineál
    string

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

    Ord lochta

    1. Léann an gníomh ionchuir follasacha ón sreabhadh oibre.
    2. Luchtaíonn sé an chumraíocht YAML ó configPath.
    3. I gcás gach réimse roinnte, bhuaigh an t-ionchur; seachas sin úsáidtear an luach YAML.
    4. Déantar na luachanna cumaisc a bhailíochtú. Is cúis le enumaí neamhbhailí (m.sh. profanityAction: Mask) go dteipeann ar an ngníomh go tapa le teachtaireacht shoiléir.

    Ton agus tionscal, i dtéarmaí simplí

    Níl knob ton amháin ag API Azure AI Translator v3. Comhcheanglaíonn dhá shuíomh chun an chuid is mó den rialú céanna a thabhairt duit:

    • Tionscal / fearann: úsáid categoryId chun pointe a chur ar chatagóir Azure Custom Translator oilte ar do chorpas féin - dlíthiúil, teicniúil, leighis, margaíocht, nó aon rud eile. Is é seo an luamhán is láidre le haghaidh ton, guth branda, agus stór focal.
    • Téacs dromchla: bain úsáid as an gluais chun ainmneacha branda agus téarmaí táirge a ghlasáil go briathartha, agus bain úsáid as profanityAction chun téarmaí profane a ghlanadh agus tú ag díriú ar logánú do lucht féachana níos óige.