ނޮން-ޑިފޯލްޓް ލޮކޭޝަނެއް ބޭނުންވާނަމަ configPath އިންޕުޓް ބޭނުންކޮށްގެން ޕާތު އޯވަރައިޑް ކުރޭ
ސްކީމާ
# .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.*"ފީލްޑް ރިފަރެންސް
| ފީލްޑް | ޓައިޕް | ނޯޓްސް |
|---|---|---|
sourceLocale | string | ސެޓް ނުކުރެވިއްޖެނަމަ sourceLocale އިންޕުޓަށް ވެއްޓޭނެއެވެ. އަދި ކުރު ސްޓްރިންގްތައް އޮޓޮޑިޓެކްޓް ނުވުމުން ޓްރާންސްލޭޓަރ from=<locale> އަށް ވެސް ފޮނުވާލަ އެވެ. |
toLocales | string[] | އެރޭއެއް ނުވަތަ ކޮމާއަކުން ވަކިކޮށްފައިވާ ސްޓްރިންގއެއް |
include / exclude | string[] | އެބްސޮލިއުޓް އަދި ވޯކްސްޕޭސް-ރިލޭޓިވް ޕާތްތަކާ ދެކޮޅަށް ގްލޮބް ޕެޓާންސް އިވެލުއޭޓް ކުރެވެއެވެ. |
glossary | map<string,string> | ތަރުޖަމާ ކުރުމަށްފަހު މި ލަފުޒު އޯވަރައިޑް ކުރެވެއެވެ. ވާރޑް-ބައުންޑަރީ އެއަރ (ހޭންޑްލްސް C++، .NET). |
categoryId | string | އެޒޫ Custom Translator ކެޓެގަރީ - ތިޔަ އިންޑަސްޓްރީ/ޑޮމެއިން ނޮބް (ލީގަލް، މެޑިކަލް، މާކެޓިން ޓޯން ފަދަ ކަންކަން). ފޮނުވީ ?category=.... |
textType | "plain" | "html" | ޑިފޯލްޓް ޓު plain html ބޭނުންކުރާނީ ރިސޯސް ވެލިއުގައި އަސްލު އެޗްޓީއެމްއެލް ފްރެގްމެންޓްސް އެކުލެވިގެންވާނަމަ |
profanityAction | "NoAction" | "Marked" | "Deleted" | ތަރުޖަމާ ކުރެވިފައިވާ އައުޓްޕުޓްގައި ހުތުރު ލަފުޒުތައް ބޭނުންކުރާނެ ގޮތް. |
profanityMarker | "Asterisk" | "Tag" | މާނަ profanityAction މާނަ "Marked". |
allowFallback | boolean | އާންމު މޮޑެލްއަށް ވެއްޓުމުގެ ބަދަލުގައި، categoryId އަށް ޓާގެޓް ލޮކޭޝަނަކަށް ޑިޕްލޮއިމެންޓެއް ނެތުމުން، ތަރުޖަމާ ފެއިލް ވާން false އަށް ސެޓް ކުރާށެވެ. |
apiVersion | string | ތަރުޖަމާ REST API ވާޝަން. ޑިފޯލްޓް ޓު 3.0 |
maxRetries | integer | ޓްރާންސިއަންޓް އެޗް.ޓީ.ޓީ.ޕީ ރެސްޕޮންސްތަކަށް މެކްސިމަމް ރިޓްރައި (408, 425, 429, 500, 502, 503, 504) ޑިފޯލްޓް ޓު 5 ރިކުއެސްޓް ކުރާ ކޮންމެ އެޗްޓީޓީޕީ ކޯލަކީ 1 + maxRetries. |
retryBackoffMs | integer | ބެކްއޮފް ސްލީޕްގައި ކެޕް (އެމްއެސް) އެވެ. ޑިފޯލްޓް ޓު 30000 އެޒޫރުގެ Retry-After ހެޑް ވަރަށް ފުރިހަމައަށް ފާހަގަކުރެވެއެވެ. އެހެން ނޫންނަމަ ޖިޓަރޑް އެކްސްޕޮނެންޝިއަލް ބެކްއޮފް ބޭނުންކުރަނީ މި ވެލިއުގައި ކެޕް ކޮށްގެންނެވެ. |
protectPlaceholders | boolean | ޑިފޯލްޓް ޓު true {{name}}، ${var}، {0}، {0:N2}، %s، %1$s އަދި އެޗްޓީއެމްއެލް ފަދަ ޓޯކެންތައް ތަރުޖަމާ ކުރުމުގެ ކުރިން ސެންޓިނެލް ޓޯކެން ބޭނުންކޮށް، އޭގެ ފަހުން އަލުން ރިސްޓޯ ކުރެ އެވެ. ސޯސްގައި ގަސްދުގައި ޕްލޭސްހޯލްޑަރ ޝޭޕްގެ އަކުރުތައް އެކުލެވިގެންވާނަމަ ޑިސޭބަލް ކުރާށެވެ. |
customPlaceholderPatterns | string[] | ޑިފޯލްޓް ޕްލޭސްހޯލްޑަރ ސެޓަށް އެކްސްޓްރާ ރެޖެކްސް ޕެޓާންސް (ޑިލިމިޓަރ ނުލައި) އިތުރުކުރެވިފައި ވެއެވެ. މިސާލަކަށް، ކަސްޓަމް ޓޯކަން ސިންޓެކްސް އަށް <<.+?>>. ނުރަނގަޅު ރެޖެކްސްތައް އިގްނޯރ ކުރޭ |
noTranslatePatterns | string[] | ޕާރސަރ ލެވެލް ކީތައް (JSON dotted path, RESX name, PO msgid, XLIFF ޔުނިޓް id، INI/restext key) އާއި އެއްގޮތް ގްލޮބް ޕެޓާންތައް. މެޗިން ކީތައް ރިކުއެސްޓް އިން ޑްރޮޕްކޮށް، އޭގެ ސޯސް ވެލިއު ރައްކާކޮށްފައި ހުރެ ޕާސް ކުރެ އެވެ. |
ލޯޑް ކުރުމުގެ ތަރުތީބު
- މި އެކްޝަންގައި ވޯކްފްލޯގެ ވަރަށް ސާފު އިންޕުޓްތައް ހިމެނެ އެވެ.
- އެއީ
configPathއިން ޔެމްއެލް ކޮންފިގް ލޯޑް ކޮށްލަ އެވެ. - ކޮންމެ ޝެއަރ ފީލްޑަކަށް އިންޕުޓް ކާމިޔާބު ކުރެވެއެވެ. އެހެން ނޫންނަމަ YAML ވެލިއު ބޭނުންކުރެވެއެވެ.
- އެއްކޮށްލެވިފައިވާ ވެލިއުތައް ވެލިޑޭޓްކުރެވިފައި ސައްހަ ނޫން އެނަމްތައް (މިސާލަކަށް
profanityAction: Mask) ގެ ސަބަބުން ސާފު މެސެޖެއް ލިބުމުން އެކްޝަން ފެއިލް ވެއެވެ.
ޓޯން އެންޑް އިންޑަސްޓްރީ، ސާފު ބަހުން
Azure AI Translator v3 API ގައި އެއް ޓޯން ނޮބެއް ނެތެވެ. ދެ ސެޓިންއެއް އެއްކޮށްލައިގެން އެންމެ ބޮޑަށް ކޮންޓްރޯލް ލިބެ އެވެ.
- އިންޑަސްޓްރީ / ޑޮމެއިން: ލީގަލް، ޓެކްނިކަލް، މެޑިކަލް، މާކެޓިން ނުވަތަ އެނޫންވެސް ކޮންމެ ކަމަކުން ތަމްރީނު ލިބިފައިވާ އެޒުއާ Custom Translator ކެޓަގަރީއަކަށް އިޝާރާތް ކުރުމަށް
categoryIdބޭނުން ކުރާށެވެ. މިއީ ޓޯން، ބްރޭންޑް ވޮއިސް އަދި ވޯކަބިއުލަރީއަށް އެންމެ ވަރުގަދަ ލިވަރ އެވެ. - ސާފޭސް ޓެކްސްޓް: ބްރޭންޑް ނަންތަކާއި ޕްރޮޑަކްޓް ޓާމްސް ލޮކް ކުރުމަށް ގްލޮސަރީ ބޭނުންކޮށް، ޒުވާން އޯޑިއަންސަށް އަމާޒުކޮށް ލޯކަލައިޒޭޝަން ޓާގެޓް ކުރާއިރު ހަޑިހުތުރު ބަސްތައް ސްކްރަބް ކުރުމަށް
profanityActionބޭނުން ކުރާށެވެ.