Skip to content

Puo

Khetha puo ea hau

Tobetsa leqepheng le le leng ka puo e 'ngoe.

English English en Afrikaans Afrikaans af አማርኛ Amharic am العربية Arabic ar অসমীয়া Assamese as Azərbaycan Azerbaijani az Башҡорт Bashkir ba Български Bulgarian bg भोजपुरी Bhojpuri bho বাংলা Bangla bn བོད་སྐད་ Tibetan bo बड़ो Bodo brx Bosanski Bosnian bs Català Catalan ca Čeština Czech cs Cymraeg Welsh cy Dansk Danish da Deutsch German de डोगरी Dogri doi Dolnoserbšćina Lower Sorbian dsb ދިވެހިބަސް Divehi dv Ελληνικά Greek el Español Spanish es Eesti Estonian et Euskara Basque eu فارسی Persian fa Suomi Finnish fi Filipino Filipino fil Vakaviti Fijian fj Føroyskt Faroese fo Français French fr Français (Canada) French (Canada) fr-CA Gaeilge Irish ga Galego Galician gl कोंकणी Konkani gom ગુજરાતી Gujarati gu Hausa Hausa ha עברית Hebrew he हिन्दी Hindi hi छत्तीसगढ़ी Chhattisgarhi hne Hrvatski Croatian hr Hornjoserbsce Upper Sorbian hsb Haitian Creole Haitian Creole ht Magyar Hungarian hu Հայերեն Armenian hy Indonesia Indonesian id Ìgbò Igbo ig Inuinnaqtun Inuinnaqtun ikt Íslenska Icelandic is Italiano Italian it ᐃᓄᒃᑎᑐᑦ Inuktitut iu Inuktitut (Latin) Inuktitut (Latin) iu-Latn 日本語 Japanese ja ქართული Georgian ka Қазақ Тілі Kazakh kk ខ្មែរ Khmer km Kurmancî Kurdish (Northern) kmr ಕನ್ನಡ Kannada kn 한국어 Korean ko كٲشُر Kashmiri ks کوردیی ناوەندی Kurdish (Central) ku Кыргызча Kyrgyz ky Lëtzebuergesch Luxembourgish lb Lingála Lingala ln ລາວ Lao lo Lietuvių Lithuanian lt Luganda Ganda lug Latviešu Latvian lv 中文 (文言文) Chinese (Literary) lzh मैथिली Maithili mai Malagasy Malagasy mg Te Reo Māori Māori mi Македонски Macedonian mk മലയാളം Malayalam ml Монгол хэл Mongolian (Cyrillic) mn-Cyrl ᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡ Mongolian (Traditional) mn-Mong মৈতৈলোন Manipuri mni मराठी Marathi mr Melayu Malay ms Malti Maltese mt Hmong Daw Hmong Daw mww မြန်မာ Myanmar (Burmese) my Norsk Bokmål Norwegian Bokmål nb नेपाली Nepali ne Nederlands Dutch nl Sesotho sa Leboa Sesotho sa Leboa nso Chinyanja Chichewa nya ଓଡ଼ିଆ Odia or Hñähñu Querétaro Otomi otq ਪੰਜਾਬੀ Punjabi pa Polski Polish pl دری Dari prs پښتو Pashto ps Português (Brasil) Portuguese (Brazil) pt Português (Portugal) Portuguese (Portugal) pt-PT Română Romanian ro Русский Russian ru Ikirundi Rundi run Kinyarwanda Kinyarwanda rw سنڌي Sindhi sd සිංහල Sinhala si Slovenčina Slovak sk Slovenščina Slovenian sl Gagana Sāmoa Samoan sm chiShona Shona sn Soomaali Somali so Shqip Albanian sq Српски (ћирилица) Serbian (Cyrillic) sr-Cyrl Srpski (latinica) Serbian (Latin) sr-Latn Sesotho Sesotho st Svenska Swedish sv Kiswahili Swahili sw தமிழ் Tamil ta తెలుగు Telugu te ไทย Thai th ትግር Tigrinya ti Türkmen Dili Turkmen tk Lea fakatonga Tongan to Türkçe Turkish tr Татар Tatar tt Reo Tahiti Tahitian ty ئۇيغۇرچە Uyghur ug Українська Ukrainian uk اردو Urdu ur Uzbek (Latin) Uzbek (Latin) uz Tiếng Việt Vietnamese vi isiXhosa isiXhosa xh Èdè Yorùbá Yoruba yo Yucatec Maya Yucatec Maya yua 粵語 Cantonese (Traditional) yue 中文 (简体) Chinese Simplified zh-Hans 中文 (繁體) Chinese Traditional zh-Hant isiZulu isiZulu zu

YAML

Tlhophiso ea polokelo

Express defaults hang in the repository config file and let every workflow inherit them. Liketso li lula li hlōla ha li fanoa ka bobeli.

Leqepheng lena

    Tlosa tsela ka ho kenya configPath haeba u hloka sebaka se sa fetoheng.

    Schema

    .github/resource-translator.yml
    # .github/resource-translator.yml
    sourceLocale: en
    toLocales:
    - fr
    - de
    - es
    include:
    - "src/**/*.en.json"
    - "apps/**/*.en.resx"
    exclude:
    - "**/__tests__/**"
    glossary:
    Acme: Contoso
    Octocat: Octocat # keep brand names verbatim
    # Domain / industry — uses an Azure Custom Translator category trained on
    # your tone and vocabulary. Leave unset for the general model.
    categoryId: my-custom-translator-category
    # Translator request shape — most users can ignore these.
    textType: plain # plain | html
    profanityAction: NoAction # NoAction | Marked | Deleted
    profanityMarker: Asterisk # Asterisk | Tag (only when profanityAction == Marked)
    allowFallback: true # false fails when the categoryId has no deployment
    apiVersion: "3.0"
    # Resilience — Translator returns 429 under load. Defaults are usually
    # fine; tune only if your runs are large enough to hit them.
    maxRetries: 5
    retryBackoffMs: 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: true
    customPlaceholderPatterns:
    - "<<.+?>>" # 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.*"

    Reference ea tšimo

    Tlhaloso ea tšimo ea tlhaloso
    Tšimo Mofuta Lintlha
    sourceLocale string Khutlela ho kenyelletso ea sourceLocale haeba e sa sebelisoe. E boetse e romelloa ho Mofetoleli joalo ka from=<locale> e le hore likhoele tse khuts'oane ha li fumanoe ka boiketsetso.
    toLocales string[] Ebang ke letoto kapa khoele e arohaneng ea comma.
    include / exclude string[] Lipaterone tsa Glob tse hlahlojoang khahlano le litsela tse felletseng le tsa mosebetsi.
    glossary map<string,string> Phetolelo ea morao-rao e fetisoa. Ho tseba moeli oa lentsoe (ho sebetsana le C++, .NET).
    categoryId string Azure Custom Translator category — your industry/domain knob (legal, medical, marketing tone, etc.). E rometsoe joalo ka ?category=....
    textType "plain" | "html" Ho hloleha ho plain. Sebelisa html feela haeba boleng ba hau ba mohloli bo na le likotoana tsa 'nete tsa HTML.
    profanityAction "NoAction" | "Marked" | "Deleted" Mokhoa oa ho sebetsana le lipolelo tse sa tloaelehang liphetolelong tsa liphetolelo?
    profanityMarker "Asterisk" | "Tag" E na le moelelo feela ha profanityAction "Marked".
    allowFallback boolean Beha ho false ho hloleha phetolelo ha categoryId hau e se na ts'ebetso bakeng sa sebaka se shebiloeng ho fapana le ho khutlela mofuteng o akaretsang.
    apiVersion string Translator REST API version. Ho hloleha ho 3.0.
    maxRetries integer Liteko tse phahameng tsa ho leka hape ho likarabo tsa nakoana tsa HTTP (408, 425, 429, 500, 502, 503, 504). Ho hloleha ho 5. Kakaretso ea mehala ea HTTP ka kopo e 1 + maxRetries.
    retryBackoffMs integer Cap (MS) bakeng sa boroko bofe kapa bofe ba mokokotlo. Ho hloleha ho 30000. Hlooho ea Retry-After ea Azure e hlomphuoa hantle ha e le teng; ho seng joalo ho sebelisoa li-backoff tse sa tloaelehang, tse koahetsoeng ka boleng bona.
    protectPlaceholders boolean Ho hloleha ho true. Ha e le teng, li-tokens tse kang {{name}}, ${var}, {0}, {0:N2}, %s, %1$s le HTML li nkeloa sebaka ke li-tokens tsa sentinel pele li fetoleloa ebe li khutlisetsoa morao. Tima feela ha mohloli o na le li-literals tse bōpehileng joaloka placeholder.
    customPlaceholderPatterns string[] Lipaterone tse eketsehileng tsa regex (ntle le li-delimiters) li ekelitsoe ho sete ea sebaka sa marang-rang, mohlala <<.+?>> bakeng sa syntax ea letšoao la tloaelo. Li-regex tse sa sebetseng li hlokomolohuoa.
    noTranslatePatterns string[] Lipaterone tsa Glob li bapisoa le linotlolo tsa boemo ba parser (JSON dotted path, RESX name, PO msgid, XLIFF unit id, INI / restext key). Linotlolo tse lumellanang li tlosoa ho tsoa ho kopo ebe li feta ka boleng ba tsona ba mohloli bo bolokiloeng.

    Taelo ea ho kenya

    1. Ketso e bala litlatsetso tse hlakileng ho tsoa ts'ebetsong ea mosebetsi.
    2. E kenya YAML config ho tloha configPath.
    3. Bakeng sa tšimo e 'ngoe le e' ngoe e arolelanoeng, kenyelletso e hlola; ho seng joalo, boleng ba YAML bo sebelisoa.
    4. Litekanyetso tse kopaneng li netefalitsoe. Li-enums tse sa sebetseng (mohlala, profanityAction: Mask) li etsa hore ketso e hlōlehe ka potlako ka molaetsa o hlakileng.

    Tone le indasteri ka mantsoe a hlakileng

    Azure AI Translator v3 API ha e na konopo e le 'ngoe ea molumo. Li-setting tse peli li kopanya ho u fa boholo ba taolo e tšoanang:

    • Indasteri / Domain: sebelisa categoryId ho supa sehlopha sa Azure Custom Translator se koetlisitsoeng ka corpus ea hau — molao, tekheniki, bongaka, papatso, kapa eng kapa eng. Ena ke sesebelisoa se matla ka ho fetisisa sa molumo, lentsoe la lebitso le mantsoe.
    • Sengoloa sa bokaholimo: Sebelisa Glossary ho notlela mabitso a lihlahisoa le mantsoe a sehlahisoa ka nepo, 'me u sebelise profanityAction ho hlakola mantsoe a litšila ha u shebile sebaka sa bamameli ba banyenyane.