यदि आप मन के नान- डिफाल्ट जगह चाही तहां 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 ल संभालथे).
categoryIdएज़्योर Custom Translator श्रेणी - आप मन के उद्योग / डोमेन घुंडी (कानूनी, चिकित्सा, विपणन टोन, आदि)। ?category=... के रूप मं भेजिस.
textTypeडिफाल्ट मं plain. एखर उपयोग तभी करव जब आप मन html संसाधन मूल्य मन मं सही एचटीएमएल फ्रेगमेंट हे.
profanityActionअनुवादित आउटपुट म अपवित्र शब्द के इलाज कइसे करें।
profanityMarkerकेवल सार्थक जब profanityAction "Marked"।
allowFallbackअनुवाद ल फेल करे बर false मं सेट करव जब आप मन के categoryId तिर सामान्य माडल मं वापस आने के बदला मा लक्छ्य लोकेल बर कोनो डिपायोमेंट नइ होही.
apiVersionअनुवादक आरईएसटी एपीआई संस्करन. डिफाल्ट मं 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ट्रांजिएंट एचटीटीपी रिस्पांस (408, 425, 429, 500, 502, 503, 504) मं सबसे अधिक फिर से कोसिस प्रयास. डिफाल्ट मं 5. प्रति निवेदन कुल एचटीटीपी काल 1 + maxRetries हे.
retryBackoffMsकोनो भी एक बैकऑफ नींद म कैप (एमएस)। डिफाल्ट मं 30000. एज़्योर के Retry-After हेडर ल ठीक तब सम्मानित करे जाथे जब उपस्थित होथे; आने रहिस जिटर्ड घातीय बैकऑफ के उपयोग करे जात हवय , ए मूल्य म कैप्ड हवय।
protectPlaceholdersडिफाल्ट मं true. जब चालू होत हवय, त {{name}}, ${var}, {0}, {0:N2}, %s, %1$s अउ एचटीएमएल इकाइमन जैसे टोकन ल अनुवाद ले पहिली सेंटिनल टोकन के साथ बदल दिए जात हवय अउ बाद म बहाल करे जात हवय । तभे अक्छम करव जब स्रोत मं जानबूझ के प्लेसहोल्डर के आकार के लिटरल्स हों.
customPlaceholderPatternsअतिरिक्त रेगेक्स पैटर्न (डेलिमिटर के बिना) डिफाल्ट प्लेसहोल्डर सेट मं जोड़े गिस, उदाहरन बर <<.+?>> कस्टम टोकन सिंटेक्स बर. अवैध रेगेक्स ल अनदेखा करव.
noTranslatePatternsग्लोब पैटर्न पार्सर- स्तर कुंजी (जेएसओएन बिंदीदार पथ, आरईएसएक्स name, पीओ msgid, एक्सएलआईएफएफ इकाई id, आईएनआई/रेस्टेक्स्ट कुंजी) के खिलाफ मेल खाथे. मैचिंग कुंजी अनुरोध ले छोड़ दे जाथे अउ ओखर स्रोत मूल्य संरक्षित के साथ पास हो जाथे।
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से वाईएएमएल कान्फिग लोड करथे. - प्रत्येक साझा क्षेत्र बर, इनपुट जीतता हवय; नइ तो वाईएएमएल मूल्य उपयोग करे जात हवय।
- सम्मिलित मूल्य वेलिडेट हे. अवैध एनम (जइसन कि
profanityAction: Mask) स्पष्ट संदेस के साथ काम तेजी से फेल होथे.
टोन अउ उद्योग, सादा शब्द म
Azure AI ट्रांसलेटर v3 API मं सिंगल टोन नॉब नइ हे. दो सेटिंग आप मन ल एक ही नियंत्रण दे बर मिलथे:
- उद्योग / डोमेन: अपन स्वयं के कॉर्पस - कानूनी, तकनीकी, चिकित्सा, विपणन, या कुछु अउ चीज म प्रशिक्षित एज़्योर Custom Translator श्रेणी ल इंगित करे बर
categoryIdके उपयोग करव। ए टोन, ब्रांड आवाज अउ शब्दावली बर सबले मजबूत लीवर हवय। - सतह पाठ: ब्रांड नाम अउ उत्पाद शर्त ल शब्दशः लॉक करे बर शब्दावली के उपयोग करव, अउ युवा दर्शक बर स्थानीयकरण ल लक्षित करत समय अपवित्र शर्त ल साफ़ करे बर
profanityActionके उपयोग करव।