ඔබට පෙරනිමි නොවන ස්ථානයක් අවශ් ය නම් configPath ආදානය සමඟ මාර්ගය අභිබවා යන්න.
සැලැස්ම
# .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.*"ක්ෂේත් ර විමර්ශනය
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.
sourceLocaleසකසා නොමැති නම් sourceLocale ආදාන වෙත ආපසු වැටේ. එසේම කෙටි නූල් ස්වයංක් රීයව හඳුනා නොගන්නා බැවින් from=<locale> ලෙස පරිවර්තකයා වෙත යොමු කර ඇත.
toLocalesඑක්කෝ අරාවක් හෝ කොමාවෙන් කරන ලද නූලක්.
include / excludeනිරපේක්ෂ හා වැඩබිම-සාපේක්ෂ මාර්ග වලට එරෙහිව ග්ලොබ් රටා ඇගයීමට ලක් කරන ලදී.
glossaryපශ්චාත් පරිවර්තන පදය අභිබවා යයි. වචන-මායිම් දැනුවත් කිරීම (C++, .NET හසුරුවයි).
categoryIdAzure Custom Translator කාණ්ඩය - ඔබේ කර්මාන්තය / වසම් මොට්ටු (නෛතික, වෛද්ය, අලෙවිකරණ ස්වරය, ආදිය). ?category=... ලෙස යවා ඇත.
textTypeපෙරනිමි plain. ඔබේ සම්පත් අගයන්හි සැබෑ HTML කැබලි අඩංගු නම් පමණක් html භාවිතා කරන්න.
profanityActionපරිවර්තනය කරන ලද ප් රතිදානයේ අපහාසාත්මක වචන වලට ප් රතිකාර කරන්නේ කෙසේද.
profanityMarkerprofanityAction "Marked" වූ විට පමණක් අර්ථවත් වේ.
allowFallbackඔබේ categoryId නැවත සාමාන්ය ආකෘතියට වැටීම වෙනුවට ඉලක්කගත ප් රදේශයක් සඳහා යෙදවීමක් නොමැති විට පරිවර්තනය අසමත් වීමට false කිරීමට සකසන්න.
apiVersionපරිවර්තකයෙකු REST API අනුවාදය. පෙරනිමි 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.
maxRetriesඅස්ථිර HTTP ප්රතිචාර මත උපරිම නැවත උත්සාහ උත්සාහයන් (408, 425, 429, 500, 502, 503, 504). 5 කිරීමට පෙරනිමි වේ. ඉල්ලීමකට මුළු HTTP ඇමතුම් 1 + maxRetries.
retryBackoffMsඕනෑම තනි පසුබිම් නින්දක් මත කැප් (ms). පෙරනිමි 30000. Azure හි Retry-After ශීර්ෂය හරියටම ගෞරවයට පාත් ර වේ; එසේ නොමැති නම් මෙම අගය සීමා කර ඇති ඝාතීය පසුපස භාවිතා වේ.
protectPlaceholdersපෙරනිමි true. ක් රියාත්මක වන විට, {{name}}, ${var}, {0}, {0:N2}, %s, %1$s සහ HTML ආයතන වැනි ටෝකන් පරිවර්තනයට පෙර සෙන්ටිනල් ටෝකන් සමඟ ප් රතිස්ථාපනය කර පසුව ප් රතිෂ්ඨාපනය කරනු ලැබේ. මූලාශ්රය හිතාමතාම ස්ථාන දරන්නා හැඩැති සාහිත්යයන් අඩංගු විට පමණක් අක්රිය කරන්න.
customPlaceholderPatternsඅතිරේක regex රටා (delimiters තොරව) පෙරනිමි ස්ථාන කට්ටලයක් එකතු, උදා: අභිරුචි ටෝකන් කාරක රීතිය සඳහා <<.+?>>. වලංගු නොවන රෙජෙක්ස් නොසලකා හරිනු ලැබේ.
noTranslatePatternsග්ලොබ් රටා ව්යාකරණ විග්රහ මට්ටමේ යතුරු සමඟ ගැලපේ (JSON තිත් මාර්ගය, RESX name, තැපැල් msgid, XLIFF ඒකකය id, INI / restext යතුර). ගැලපෙන යතුරු ඉල්ලීමෙන් ඉවත් කර ඒවායේ මූලාශ් ර වටිනාකම සංරක්ෂණය කර ඇත.
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.
පැටවීම සඳහා
- මෙම ක් රියාව කාර්ය ප් රවාහයෙන් පැහැදිලි යෙදවුම් කියවයි.
- එය
configPathසිට YAML වින් යාසය පටවයි. - සෑම හවුල් ක්ෂේත් රයක් සඳහාම, ආදානය ජයග් රහණය කරයි; එසේ නොමැති නම් YAML අගය භාවිතා වේ.
- ඒකාබද්ධ අගයන් වලංගු වේ. වලංගු නොවන enums (උදා:
profanityAction: Mask) පැහැදිලි පණිවුඩයක් සමඟ පියවර වේගයෙන් අසාර්ථක වීමට හේතු වේ.
ස්වරය සහ කර්මාන්තය, සරල වචන වලින්
මෙම Azure AI Translator v3 API හි තනි නාද මොට්ටයක් නොමැත. සැකසුම් දෙකක් ඒකාබද්ධ වී ඔබට එකම පාලනයක් ලබා දෙයි:
- කර්මාන්තය / වසම: නෛතික, තාක්ෂණික, වෛද් ය, අලෙවිකරණය හෝ වෙනත් ඕනෑම දෙයක් - ඔබේම කෝපුස් මත පුහුණු කරන ලද Azure Custom Translator කාණ්ඩයක් පෙන්වා දීමට
categoryIdභාවිතා කරන්න. ස්වරය, වෙළඳ නාම හ voice සහ වචන මාලාව සඳහා ශක්තිමත්ම ලීවරය මෙයයි. - මතුපිට පෙළ: වෙළඳ නාම සහ නිෂ්පාදන කොන්දේසි වාචිකව අගුලු දැමීමට පාරිභාෂික ශබ්ද මාලාව භාවිතා කරන්න, සහ තරුණ ප් රේක්ෂකයින් සඳහා දේශීයකරණය ඉලක්ක කිරීමේදී අසභ් ය වචන ඉවත් කිරීමට
profanityActionභාවිතා කරන්න.