जेकर तुसें गी गैर-डिफ़ॉल्ट थाह् र दी लोड़ ऐ तां 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 दा इस्तेमाल तां गै करो जेकर तुंʼदे संसाधन मुल्लें च असली एचटीएमएल टुकड़े होन।
profanityActionअनूदित आउटपुट च अभद्र शब्दें कन्नै कि'यां बरतेआ जा।
profanityMarkerसिर्फ उसलै गै सार्थक होंदा profanityAction "Marked"।
allowFallbackअनुवाद गी फेल करने आस्तै false पर सेट करो जिसलै तुंʼदे categoryId च सधारण माडल पर वापस औने दे बजाए लक्षत लोकेल आस्तै कोई तैनाती नेईं ऐ।
apiVersionTranslator REST API version. डिफॉल्ट टू 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कुसै बी इक बैकऑफ स्लीप पर कैप (ms)। डिफॉल्ट टू 30000। एज़्योर दा Retry-After हेडर ठीक हाजर होने पर सम्मानत कीता जंदा ऐ; नेईं ते घबराए दे घातीय बैकऑफ दा इस्तेमाल कीता जंदा ऐ, इस मान पर कैप कीता जंदा ऐ।
protectPlaceholdersडिफॉल्ट टू true। चालू होने पर, {{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.
लोड करने दा आर्डर
- कार्रवाई कार्यप्रवाह थमां स्पश्ट इनपुट पढ़दी ऐ।
- एह् YAML कॉन्फिगरेशन गी
configPathथमां लोड करदा ऐ। - हर इक सांझा खेतर लेई, इनपुट जित्ती जंदा ऐ; नेईं ते YAML मान दा इस्तेमाल कीता जंदा ऐ।
- मर्ज कीते गेदे मुल्लें गी मान्य कीता जंदा ऐ। अमान्य एनम ( जिʼयां
profanityAction: Mask) इक स्पश्ट सनेहे दे कन्नै कार्रवाई गी तेजी कन्नै विफल करने दा कारण बनदा ऐ।
स्वर ते उद्योग, सादे शब्दें च
Azure AI Translator v3 API च सिंगल टोन नॉब नेईं ऐ। दो सैट्टिंग्स मिलियै तुसें गी इक गै नियंत्रण दिंदे न:
- उद्योग / खेतर: अपने स्वयं दे कॉर्पस - कानूनी, तकनीकी, मेडिकल, मार्केटिंग, जां किश होर पर प्रशिक्षत Azure Custom Translator श्रेणी गी इंगित करने आस्तै
categoryIdदा इस्तेमाल करो। एह् टोन, ब्रांड अवाज ते शब्दावली आस्तै सभनें शा मजबूत लीवर ऐ। - सतही पाठ: ब्रांड नांऽ ते उत्पाद शब्दें गी शब्दशः लॉक करने आस्तै शब्दकोश दा इस्तेमाल करो, ते युवा दर्शकें आस्तै स्थानीयकरण गी लक्षत करदे समें अपवित्र शब्दें गी रगड़ने आस्तै
profanityActionदा इस्तेमाल करो।