configPath Bwâ€TMoba weetaaga akawuka akaleeta siriimu, bwâ€TMoba weetaaga akawuka akaleeta siriimu.
Schema
# .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.*"Field reference
| Ennimiro | Ekika | Ebiwandiiko |
|---|---|---|
sourceLocale | string | Okudda mu sourceLocale bw'eba nga teyateekebwawo. Also forwarded to Translator as from=<locale> so short strings are not autodetected. |
toLocales | string[] | Oba ng'ekitundu eky'enjawulo oba eky'omulembe eky'enjawulo eky'omuwendo gw'abazannyi ba Cranes. |
include / exclude | string[] | Glob patterns tested against absolute and workspace-relative paths. |
glossary | map<string,string> | Post-translation term overrides. Word-boundary aware (handles C++, .NET). |
categoryId | string | Azure Custom Translator category — your industry/domain knob (legal, medical, marketing tone, etc.). Sent as ?category=.... |
textType | "plain" | "html" | Okulemererwa plain Use html only if your resource values contain real HTML fragments. |
profanityAction | "NoAction" | "Marked" | "Deleted" | Engeri gy'oyinza okuvvuunula ebigambo ebitali bimu mu kuvvuunula ebitabo by'Obusiraamu? |
profanityMarker | "Asterisk" | "Tag" | Only meaningful when profanityAction is "Marked". |
allowFallback | boolean | Set to false to fail the translation when your categoryId has no deployment for a target locale instead of falling back to the general model. |
apiVersion | string | Translator REST API version. Okulemererwa 3.0 |
maxRetries | integer | Maximum retry attempts on transient HTTP responses (408, 425, 429, 500, 502, 503, 504). Okulemererwa okutuukiriza 5. Total HTTP calls per request is 1 + maxRetries. |
retryBackoffMs | integer | Dil Ki Awaaz Okulemererwa 30000 Azure's Retry-After header is honored exactly when exist; otherwise jittered exponential backoff is used, capped at this value. |
protectPlaceholders | boolean | Okulemererwa true Obubonero nga {{name}}, ${var}, {0}, {0:N2}, %s, %1$s ne HTML bukyusibwa n'obubonero bwa sentinel nga tebunnaba kuvvuunulwa era ne buzzibwayo oluvannyuma. Disable only when source intentionally contains placeholder-shaped literals. |
customPlaceholderPatterns | string[] | Endagaano ez'enjawulo (nga tezirina delimiters) zongeddwako ku seti y'ekifo eky'enjawulo, e.g. <<.+?>> for custom token syntax. Invalid regexes are ignored. |
noTranslatePatterns | string[] | Obubonero bwa Glob bukwatagana n'ebisumuluzo eby'omutendera ogwa parser (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI/restext key). Matching keys are dropped from the request and pass through with their source value preserved. |
Loading order
- The action reads explicit inputs from the workflow.
- It loads the YAML config from
configPath. - For every shared field, the input wins; Bw'oba tokozesezza omuwendo gwa YAML gukozesebwa.
- The merged values are validated. Obubaka obutali butuufu (e.g.
profanityAction: Mask) buleetera ekikolwa okulemererwa mangu n'obubaka obutegeerekeka.
Tone and industry, in plain terms
S3 Ssabasajja Kabaka Muteesa I Ssabasajja Kabaka Muteesa I S3 Tekirina Ssabasajja Kabaka Yekka - Watchdog Uganda Two settings together to give you most of the same control:
- Industry / domain: Use
categoryIdto point at an Azure Custom Translator category trained on your own corpus — legal, technical, medical, marketing, or anything else. Eno y'enkola esinga amaanyi mu ddoboozi lya langi n'olulimi lw'eggwanga. - Surface text: Use the Glossary to lock brand names and product terms verbatim, and use
profanityActionto scrub profane terms when targeting localization for young audiences.