Anular u bejil yéetel le yaan configPath wa k'abéet jump'éel tu'ux ku yaantal ma' predeterminada.
Esquema
# .github/resource-translator.ymlsourceLocale: entoLocales: - fr - de - esinclude: - "src/**/*.en.json" - "apps/**/*.en.resx"exclude: - "**/__tests__/**"glossary: Acme: Contoso Octocat: Octocat # keep brand names verbatim
# Domain / industry — uses an Azure Custom Translator category trained on# your tone and vocabulary. Leave unset for the general model.categoryId: my-custom-translator-category
# Translator request shape — most users can ignore these.textType: plain # plain | htmlprofanityAction: NoAction # NoAction | Marked | DeletedprofanityMarker: Asterisk # Asterisk | Tag (only when profanityAction == Marked)allowFallback: true # false fails when the categoryId has no deployment
apiVersion: "3.0"
# Resilience — Translator returns 429 under load. Defaults are usually# fine; tune only if your runs are large enough to hit them.maxRetries: 5retryBackoffMs: 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: truecustomPlaceholderPatterns: - "<<.+?>>" # 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.*"K'a'ana'an jach yáax
| Jach yáax | Bin yano'ob | Notas |
|---|---|---|
sourceLocale | string | Ku k'a'ab ti' le sourceLocale yaan wa ma' ajusta. Xan reenviado ti' le traductor bey from=<locale> jach le cadenas cortas ma' u detectan automáticamente. |
toLocales | string[] | Ts'o'ok bixake' jump'éel matriz wa jump'éel cadena separada tumen coma. |
include / exclude | string[] | Patrones glob evaluados tu xu'ullsa'al bejo'ob absolutos yéetel relativos ti' le kúuchilo' kúuchil. |
glossary | map<string,string> | Anulaciones término posterior ti' le traducción. T'aano'-límite consciente (maneja C++, .NET). |
categoryId | string | Categoría Custom Translator Azure — u mando industria leti' dominio (legal, médico, tono marketing, etc.). Túuxta'ab bey ?category=.... |
textType | "plain" | "html" | Por defecto u plain. Utilizar html chéen wa u uts' k'ajóolilo'obo' nu'ukulo'ob ya'alik fragmentos HTML reales. |
profanityAction | "NoAction" | "Marked" | "Deleted" | Bix k'aax términos profanos ti' salida traducido. |
profanityMarker | "Asterisk" | "Tag" | Chéen u k'áat u ya'al ken profanityAction "Marked". |
allowFallback | boolean | Establezca false utia'al fallar le traducción ken u categoryId mina'an u despliegue utia'al jump'éel lu'umil locales destino en vez de k'a'ab le bix tuláakal. |
apiVersion | string | Traductor versión API REST. Por defecto u 3.0. |
maxRetries | integer | Intentos máximos reintentos ti' respuestas HTTP transitorias (408, 425, 429, 500, 502, 503, 504). Tumen defecto u 5. Total llamadas HTTP tumen j-na'akij 1 + maxRetries. |
retryBackoffMs | integer | Cap (ms) ti' je'el tin juunal backoff weenel. Por defecto u 30000. Le Retry-After cabecera u Azure jach honrada exactamente ken si'ipil; U tu contrario u ku meyajtiko'ob jumptered exponencial retroceso, limitado ti' le je'o'. |
protectPlaceholders | boolean | Por defecto u true. Le ken táan activado, fichas bey {{name}}, ${var}, {0}, {0:N2}, %s, %1$s yéetel HTML ku reemplazan yéetel fichas centinela bey ma' le traducción yéetel restauradas ts'o'okole'. Deshabilitar chéen ken le fuente ku taasik intencionalmente literales ti' bix u marcador u posición. |
customPlaceholderPatterns | string[] | Patrones regex adicionales (ma' delimitadores) añadidos ti' le nu'ukulo'ob marcador u posición tumen defecto, je'ebix, <<.+?>> utia'al u sintaxis le ficha personalizada. Ku ignoran regex ma' válidos. |
noTranslatePatterns | string[] | Patrones glob emparejados xu'ullsa'al wach'ebo'obo' nivel analizador (bejil punteado JSON, RESX name, PO msgid, XLIFF unidad id, clave INI leti' restext). Claves coincidentes ku eliminan ti' le solicitud yéetel ku yúuchul yéetel u ku k'aaba' conservado. |
Orden kuuch
- Le asab xook entradas explícitas tak le flujo meyaj.
- Kuuch le configuración YAML
configPath. - Utia'al Amal jach yáax compartido, le yaan náajal; U tu contrario ku meyajtiko'ob le je'o' YAML.
- Le uts' k'ajóolilo'obo' combinados u validan. Enumeraciones ma' válidas (je'ebix,
profanityAction: Mask) ku beetik u le asab falle séeba'an yéetel juntúul k'uuben t'aano' xane'.
Tono ka industria, ti' términos sencillos
Le API Azure AI Translator v3 mina'an jump'éel chéen botón tono. Ka'atúul ajustes ku combinan utia'al u ts'aik ti' asab ti' le k'iino' je'el xano' kaambalil yo'osal:
- Industria leti' dominio: Utilizar
categoryIdutia'al señalar jump'éel categoría Azure Custom Translator entrenada ti' u leti'ob corpus — legal, técnico, ts'aako', marketing wa uláak' ba'ala'. Lela' le palanca asab k'a'am yo'osal tono, t'aan marca yéetel vocabulario. - Analte'o' superficial: Meyaj le Glosario utia'al u bloquear u marcas yéetel términos le producto textual, ka meyaj
profanityActionutia'al frotar términos profanos ken ku ts'áabal localización utia'al u audiencias asab jóoken.