तुमकां नॉन-डिफॉल्ट सुवात जाय जाल्यार configPath इनपुटान मार्ग ओव्हरराइड करात.
Schema
# .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अणकारीत आउटपुटांत अपवित्र उतरां कशीं हाताळचीं.
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. दर विनंतीक वट्ट HTTP कॉल 1 + maxRetries.
retryBackoffMsखंयच्याय एका बॅकऑफ न्हिदेचेर कॅप (ms). डिफॉल्ट टू 30000. अझूराचो Retry-After हेडर हाजीर आसतनाच हुबेहूब मानता. नाजाल्यार ह्या मूल्याचेर कॅप केल्लो जिटर्ड एक्सपोनेन्शियल बॅकऑफ वापरतात.
protectPlaceholdersडिफॉल्ट टू true. चालू आसतना, {{name}}, ${var}, {0}, {0:N2}, %s, %1$s आनी HTML घटकां सारकिल्या टोकनांच्या जाग्यार अणकार करचे पयलीं सेंटिनल टोकन दवरतात आनी उपरांत पुनर्संचयित करतात. जेन्ना स्रोतांत हेतुपुरस्सर प्लेसहोल्डर-आकाराचे लिटरल्स आसतात तेन्नाच अक्षम करात.
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वापरात.