ዘይግቡእ ቦታ እንተ ደሊኻ ነቲ መገዲ በቲ 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 ናይ ምንጪ ዋጋታትካ ናይ ሓቂ ቝርጽራጽ HTML እንተ ኣልይዎ ጥራይ ተጠቐመሉ።
profanityActionኣብ ትርጕማት እተተርጐመ ጽዩፍ ቃላት ብኸመይ ከም እትሕዞ።
profanityMarkerትርጉም ዘለዎ profanityAction "Marked" ምስ ኰነ ጥራይ እዩ።
allowFallbackኣብ ክንዲ ናብ ሓፈሻዊ ሞደል ኣብ ክንዲ እትወድቕ categoryId ኣብ ክንዲ እትወድቕ ነቲ ትርጕም ክትውድኦ false ኣቐምጦ።
apiVersionተርጓሚ 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ኣብ ግዜያዊ HTTP መልስታት (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 ከምኡውን HTML ዝኣመሰሉ ቶከናት ቅድሚ ምትርጓሞም ብሴንቲነል ቶከን ይትካእ ድሕሪኡ ድማ ይምለስ። ምንጪ ደይመደይ ኢሉ ቃል ብቓሉ ምስ ዚሕዝ ጥራይ እዩ ኣሰናክሎ።
customPlaceholderPatternsተወሳኺ ናይ ሬጌክስ ንድፊ (ብዘይ ገደብ) ናብ ነባሪ ቦታ ተወሰኸ፣ ንኣብነት <<.+?>> ናይ ልሙድ ቶከን ኣገባብ። ዘይቅኑዓት ሪግክስ ዕሽሽ ይብሉ።
noTranslatePatternsንድፊ ግሎብ ምስ መፋትሕ ደረጃ ተንታኒ (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI/restext key) ይሰማማዕ ነበረ። እቲ ዝሰማማዕ መፍትሕ ካብቲ ሕቶ ይድርበ ምንጪ ዋጋኡ ድማ ይዕቀብ።
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ተጠቐም።