যদি আপোনাক এক অ-ডিফল্ট অৱস্থানৰ প্ৰয়োজন তেনেহ'লে 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=... হিচাপে প্ৰেৰণ।
textTypeplain কৰিবলৈ অবিকল্পিত। আপোনাৰ সম্পদ মূল্যত প্ৰকৃত HTML টুকুৰা থাকিলেহে html ব্যৱহাৰ কৰিব।
profanityActionঅনুবাদিত আউটপুটত অশ্লীল শব্দবোৰ কেনেদৰে ব্যৱহাৰ কৰিব।
profanityMarkerকেৱল তেতিয়াহে অৰ্থপূৰ্ণ যেতিয়া profanityAction "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 ডিফল্ট প্ৰতি অনুৰোধত মুঠ এইচটিটিপি কল 1 + maxRetries।
retryBackoffMsযিকোনো বেকঅফ টোপনিত কেপ (ms)। 30000 কৰিবলৈ অবিকল্পিত। Azureৰ Retry-After শিৰোনামটো ঠিক উপস্থিত থাকিলেই সন্মানিত কৰা হয়; অন্যথা জিটাৰ্ড এক্সপোনেনচিয়েল বেকঅফ ব্যৱহাৰ কৰা হয়, এই মানত আৱৰা হয়।
protectPlaceholderstrue কৰিবলৈ অবিকল্পিত। যেতিয়া অন হয়, {{name}}, ${var}, {0}, {0:N2}, %s, %1$s আৰু এইচটিএমএল সত্তাৰ দৰে টোকেনবোৰ অনুবাদৰ আগতে চেণ্টিনেল টোকেনেৰে সলনি কৰা হয় আৰু পিছত পুনৰুদ্ধাৰ কৰা হয়। উৎসত ইচ্ছাকৃতভাৱে প্লেচহ'ল্ডাৰ আকৃতিৰ লিটাৰেল থাকিলেহে অক্ষম কৰিব।
customPlaceholderPatternsডিফল্ট প্লেচহোল্ডাৰ ছেটত অতিৰিক্ত ৰেজেক্স পেটাৰ্ণ (ডিলিমিটাৰ অবিহনে) যোগ দিয়া হয়, যেনে কাষ্টম টোকেন চিনটেক্সৰ বাবে <<.+?>>। অবৈধ ৰেজিক্সসমূহ উপেক্ষা কৰা হৈছে।
noTranslatePatternsগ্লব বিন্যাসসমূহ বিশ্লেষক-স্তৰ কি'সমূহৰ সৈতে মিল খায় (JSON ডটেড পথ, RESX name, PO 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 মান ব্যৱহাৰ কৰা হয়।
- মাৰ্জ কৰা মূল্যবোৰ প্ৰমাণীকৰণ কৰা হয়। অবৈধ এনামৰ ফলত (যেনে
profanityAction: Mask) এটা স্পষ্ট বাৰ্তাৰ সৈতে কাৰ্য্যটো দ্ৰুত বিফল হয়।
সুৰ আৰু উদ্যোগ, সৰল ভাষাত
Azure AI Translator v3 API ৰ এটা একক ট'ন নব নাই। দুটা ছেটিংছ একেলগ হৈ আপোনাক বেছিভাগ একে নিয়ন্ত্ৰণ প্ৰদান কৰে:
- উদ্যোগ / ডমেইন: আপোনাৰ নিজৰ কৰ্পাছৰ ওপৰত প্ৰশিক্ষিত Azure Custom Translator শ্ৰেণীলৈ আঙুলিয়াবলৈ
categoryIdব্যৱহাৰ কৰক - আইনগত, কাৰিকৰী, চিকিৎসা, বিপণন, বা আন যিকোনো বস্তু। এইটো সুৰ, ব্ৰেণ্ড কণ্ঠস্বৰ আৰু শব্দভাণ্ডাৰৰ বাবে আটাইতকৈ শক্তিশালী লিভাৰ। - পৃষ্ঠৰ লিখনী: ব্ৰেণ্ড নাম আৰু সামগ্ৰীৰ চৰ্তাৱলী শব্দাৱলী লক কৰিবলৈ শব্দকোষ ব্যৱহাৰ কৰক, আৰু যুৱ দৰ্শকৰ বাবে স্থানীয়কৰণ লক্ষ্য কৰাৰ সময়ত অশ্লীল শব্দবোৰ ঘঁহিবলৈ
profanityActionব্যৱহাৰ কৰক।