See Configuration for the YAML schema and loading order.
Inputs required
| Izina | Ibisobanuro |
|---|---|
sourceLocale | Source locale (e.g. en) used to find resource files such as **/*.en.resx. Yoherejwe kandi n'umusemuzi nk'uko from=<locale>. |
subscriptionKey | Azure AI Translator subscription key. Pass via secrets. |
endpoint | Translator endpoint URL, e.g. https://api.cognitive.microsofttranslator.com/. |
Common optional inputs
| Izina | Default | Ibisobanuro |
|---|---|---|
region | none | Translator resource region (omit for global resources). |
toLocales | Bose bashyigikiwe | Locales to translate to. Yemera JSON array (["fr","de"]) cyangwa ibipimo bitandukanywa na koma. |
include | none | Newline-separated glob patterns; gusa inyandiko zihuje n'izo zihindurwa. |
exclude | none | Newline-separated glob patterns; Matching files are skipped (applied after include). |
configPath | .github/resource-translator.yml | Inzira y'umurongo wa YAML config file (ijyanye n'umuzi w'akazi). |
dryRun | false | Mu gihe true, jya uhindura inyandiko n'inyandiko zinyuranye, ariko ntuzigere wandika. |
failOnError | true | When true, unexpected errors fail the action; Iyo false amakosa aba ari umuburo. |
Translator request inputs
These map directly into Azure AI Translator v3 query parameters. Buri wese aba ari amahitamo ye; The Translator defaults apply when unset.
| Izina | Default | Ibisobanuro |
|---|---|---|
categoryId | general | Azure Custom Translator category — the industry/domain/tone knob. Bye Bye ?category=.... |
textType | plain | plain cyangwa html. Use html only when your resource values are real HTML fragments. |
profanityAction | NoAction | NoAction, Marked, cyangwa Deleted. Genzura uburyo amagambo y'urukozasoni akoreshwa mu buhinduzi. |
profanityMarker | Asterisk | Asterisk cyangwa Tag. Only significant when profanityAction is Marked. |
allowFallback | true (Translator default) | Mu gihe false, umusemuzi asubiza ikosa aho gusubira muri sisitemu rusange niba categoryId yawe idafite aho igenewe. |
apiVersion | 3.0 | Translator REST API version. |
Resilience & placeholder protection
These inputs control how the action behaves when Translator throttles your request and how it shields placeholder tokens like {{name}} or {0} from being mangled during translation.
| Izina | Default | Ibisobanuro |
|---|---|---|
maxRetries | 5 | Maximum retry attempts on transient HTTP responses (408, 425, 429, 500, 502, 503, 504). Umubare w'abahamagara kuri buri busabe ni 1 + maxRetries. |
retryBackoffMs | 30000 | Cap (in milliseconds) on any single backoff sleep. The action honors Azure's Retry-After response header exactly when present; otherwise it uses jittered exponential backoff capped at this value. |
protectPlaceholders | true | When true (default), placeholders such as {{name}}, ${var}, {0}, {0:N2}, %s, %1$s and HTML entities are replaced with sentinel tokens before translation and restored afterward. Disable only when your source intentionally contains literal placeholder-shaped text that should be translated. |
customPlaceholderPatterns | none | Newline-separated regexes (without delimiters) added to the default placeholder set, e.g. <<.+?>> for custom token syntax. |
noTranslatePatterns | none | Newline-separated glob patterns matched against parser-level keys (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI / restext key). Imfunguzo zihuza zikurwa ku busabe bw'Umusemuzi hanyuma zinyura hamwe n'agaciro k'inkomoko yazo. |
Ibicuruzwa
| Izina | Ibisobanuro |
|---|---|
summary-title | Short PR-title-friendly summary, e.g. Machine-translated 320 files, a total of 5,418 translations. |
summary-details | Markdown summary suitable for a PR body or job summary. |
has-new-translations | 'true' igihe hasohotse ubuhinduzi bushya bumwe cyangwa bwinshi. |