Anule le bejil yéetel le configPath yaan wa k'abéet jump'éel tu'ux ku yaantal ma' predeterminada.
Esquema
# .github/resource-translator.ymlsourceLocale: 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 - esinclude: - "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 | htmlprofanityAction: NoAction # NoAction | Marked | DeletedprofanityMarker: 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: 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
providerEither 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.
sourceLocaleKu ka'a ti' le sourceLocale yaan wa ma' u configurado. Xan reenviado u Translator bey from=<locale> tumen ku ma' u autodetectan cadenas cortas.
toLocalesTs'o'ok bixake' jump'éel matriz wa jump'éel cadena separada tumen coma.
include / excludePatrones globo evaluados xu'ullsa'al le bejo' absoluto yéetel relativo u kúuchil meyajo'ob.
glossaryAnulaciones términos post-traducción. Consciente ti' le límite t'aano' (maneja C++, .NET).
categoryIdAzure Custom Translator categoría — u perilla industria/dominio (legal, médico, tono marketing, etc.). Túuxta'ab ?category=....
textTypeTuméen defecto ti' plain. Meyaj html chéen wa u uts' k'ajóolilo'obo' nu'ukulo'ob ya'alik fragmentos HTML reales.
profanityActionBix k'aax términos profanos ti' salida traducida.
profanityMarkerChéen ba'ax profanityAction "Marked".
allowFallbackConfigurar ti' false fallar le traducción ken u categoryId mina'an u despliegue utia'al jump'éel kúuchil destino kúuchil k'a' k'a'atik le bix tuláakal.
apiVersionVersión API REST u traductor. Tuméen defecto ti' 3.0.
awsFormalityAWS Translate formality setting for supported target languages.
awsBrevitySet to true to enable AWS Translate brevity mode for supported language pairs.
awsTerminologyNames / awsParallelDataNamesAWS Translate custom terminology and parallel data resource names. Either an array or comma-separated string.
googleModelGoogle Cloud Translation model, e.g. nmt or base.
googleApiEndpointOptional Google Cloud Translation API endpoint override.
googleAutoRetryOptional Google Cloud Translation automatic retry toggle. Leave unset to use the Google client default.
maxRetriesMáximo intentos reintento ti' respuestas HTTP transitorias (408, 425, 429, 500, 502, 503, 504). Tuméen defecto ti' 5. Total llamadas HTTP tumen j-na'akij jach 1 + maxRetries.
retryBackoffMsTapón (ms) ti' je'el chéen retroceso weenel. Tuméen defecto ti' 30000. Le encabezado Retry-After Azure jach honrado exactamente ka táan presente; U contrario ku meyajtiko'ob jumptered jumptered Exponencial backoff, u límite ti' le je'o'.
protectPlaceholdersTuméen defecto ti' true. Le ken activado, le fichas bey {{name}}, ${var}, {0}, {0:N2}, %s, %1$s yéetel HTML ku reemplazan tumen fichas centinela bey ma' le traducción yéetel restauradas ts'o'okole'. Desactivar chéen ken le fuente intencionadamente ku taasik literales bix u marcador lugar.
customPlaceholderPatternsPatrones regex adicionales (xma' delimitadores) añadidos ti' le nu'ukulo'ob marcador predeterminado, je'ebix, <<.+?>> utia'al u sintaxis token personalizado. Le regex válidos ku ignoran.
noTranslatePatternsPatrones globo emparejados xu'ullsa'al teclas nivel analizador (JSON bejo' punteado, RESX name, PO msgid, unidad XLIFF id, clave INI leti' restext). Le claves coincidentes ku sueltan ti' le j-na'akij yéetel ku yúuchul yéetel u ku fuente preservado.
changeDetectionDefaults 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.
statePathPath to the deterministic smart change-detection state manifest. Defaults to .github/resource-translator-state.json.
Orden kuuch
- Le molayil xook entradas explícitas ti' le flujo meyaj.
- Carga le configuración YAML tak
configPath. - Utia'al Amal jach yáax compartido, ku náajaltik le yaan; u contrario ku meyajtiko'ob le je'o' YAML.
- Le uts' k'ajóolilo'obo' fusionados ku validan. Enums ma' válidos (je'ebix,
profanityAction: Mask) ku beetik u le molayil falle séeba'an yéetel juntúul t'aan jul t'aano'.
Tono yéetel industria, ti' términos llanos
Le API Azure AI Translator v3 mina'an ti' jump'éel chéen perilla tono. Ka'ap'éel ajustes combinan utia'al u ts'aik teech óol tuláakal le máasewáalo'obo' ti' le wéet kaambalil yo'osal:
- Industria leti' dominio: utilizar
categoryIdutia'al apuntar ti' jump'éel categoría Azure Custom Translator entrenada ti' u leti'ob corpus — legal, técnico, ts'aako'ob, marketing, jump'éel uláak' ba'ala'. Lela' le palanca asab k'a'am utia'al tono, t'aan marca yéetel vocabulario. - Analte'o' superficial: Meyaj le Glosario utia'al bloquear k'aaba'obo' marca yéetel términos producto palabra tumen
profanityAction, ka utilizar utia'al u fregar términos profanos ti' le ku ts'áabal localización utia'al u audiencias asab jóeno'ob.