跳转到内容

语言

选择你的语言

切换到同一页的另一种语言。

EnglishEnglishenAfrikaansAfrikaansafአማርኛAmharicamالعربيةArabicarঅসমীয়াAssameseasAzərbaycanAzerbaijaniazБашҡортBashkirbaБългарскиBulgarianbgभोजपुरीBhojpuribhoবাংলাBanglabnབོད་སྐད་Tibetanboबड़ोBodobrxBosanskiBosnianbsCatalàCatalancaČeštinaCzechcsCymraegWelshcyDanskDanishdaDeutschGermandeडोगरीDogridoiDolnoserbšćinaLower SorbiandsbދިވެހިބަސްDivehidvΕλληνικάGreekelEspañolSpanishesEestiEstonianetEuskaraBasqueeuفارسیPersianfaSuomiFinnishfiFilipinoFilipinofilVakavitiFijianfjFøroysktFaroesefoFrançaisFrenchfrFrançais (Canada)French (Canada)fr-CAGaeilgeIrishgaGalegoGalicianglकोंकणीKonkanigomગુજરાતીGujaratiguHausaHausahaעבריתHebrewheहिन्दीHindihiछत्तीसगढ़ीChhattisgarhihneHrvatskiCroatianhrHornjoserbsceUpper SorbianhsbHaitian CreoleHaitian CreolehtMagyarHungarianhuՀայերենArmenianhyIndonesiaIndonesianidÌgbòIgboigInuinnaqtunInuinnaqtuniktÍslenskaIcelandicisItalianoItalianitᐃᓄᒃᑎᑐᑦInuktitutiuInuktitut (Latin)Inuktitut (Latin)iu-Latn日本語JapanesejaქართულიGeorgiankaҚазақ ТіліKazakhkkខ្មែរKhmerkmKurmancîKurdish (Northern)kmrಕನ್ನಡKannadakn한국어KoreankoكٲشُرKashmiriksکوردیی ناوەندیKurdish (Central)kuКыргызчаKyrgyzkyLëtzebuergeschLuxembourgishlbLingálaLingalalnລາວLaoloLietuviųLithuanianltLugandaGandalugLatviešuLatvianlv中文 (文言文)Chinese (Literary)lzhमैथिलीMaithilimaiMalagasyMalagasymgTe Reo MāoriMāorimiМакедонскиMacedonianmkമലയാളംMalayalammlМонгол хэлMongolian (Cyrillic)mn-Cyrlᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡMongolian (Traditional)mn-MongমৈতৈলোনManipurimniमराठीMarathimrMelayuMalaymsMaltiMaltesemtHmong DawHmong Dawmwwမြန်မာMyanmar (Burmese)myNorsk BokmålNorwegian BokmålnbनेपालीNepalineNederlandsDutchnlSesotho sa LeboaSesotho sa LeboansoChinyanjaChichewanyaଓଡ଼ିଆOdiaorHñähñuQuerétaro OtomiotqਪੰਜਾਬੀPunjabipaPolskiPolishplدریDariprsپښتوPashtopsPortuguês (Brasil)Portuguese (Brazil)ptPortuguês (Portugal)Portuguese (Portugal)pt-PTRomânăRomanianroРусскийRussianruIkirundiRundirunKinyarwandaKinyarwandarwسنڌيSindhisdසිංහලSinhalasiSlovenčinaSlovakskSlovenščinaSlovenianslGagana SāmoaSamoansmchiShonaShonasnSoomaaliSomalisoShqipAlbaniansqСрпски (ћирилица)Serbian (Cyrillic)sr-CyrlSrpski (latinica)Serbian (Latin)sr-LatnSesothoSesothostSvenskaSwedishsvKiswahiliSwahiliswதமிழ்TamiltaతెలుగుTeluguteไทยThaithትግርTigrinyatiTürkmen DiliTurkmentkLea fakatongaTongantoTürkçeTurkishtrТатарTatarttReo TahitiTahitiantyئۇيغۇرچەUyghurugУкраїнськаUkrainianukاردوUrduurUzbek (Latin)Uzbek (Latin)uzTiếng ViệtVietnameseviisiXhosaisiXhosaxhÈdè YorùbáYorubayoYucatec MayaYucatec Mayayua粵語Cantonese (Traditional)yue中文 (简体)Chinese Simplifiedzh-Hans中文 (繁體)Chinese Traditionalzh-HantisiZuluisiZuluzu

历史

更新日志

发布的高级总结。规范且权威的变更日志存放在仓库的 CHANGELOG.md 中。

在本页

    完整记录请参见 CHANGELOG.md

    发行作品

    3.2.0 —

    • Smart change detection now defaults to smart: a compact provider-neutral state manifest (.github/resource-translator-state.json) tracks parser keys, source hashes, target hashes, and translation-affecting settings so only changed or missing keys are sent to the selected provider. Use changeDetection=disabled or false for legacy always-translate behavior, statePath to relocate the manifest, and snapshotOnly to bootstrap the manifest from existing target files without calling a provider. The same release adds nested {provider} blocks, AWS/Google-native behavior knobs, narrow-friendly reference cards, and official provider-doc links. Key-level audit rule codes are logged for every decision.

    3.1.0 —

    • 多供应商:通过Azure AI Translator、AWS Translate或Google Cloud Translation在统一的API表面进行转换。每次运行选择一个新的provider输入的提供者;该动作委派给工厂后面的匹配 SDK,且无论供应商如何,行为都相同。完全向后兼容——provider默认为azure,因此现有的Azure工作流程保持不变。
    • 新的 AWS 翻译服务提供商(@aws-sdk/client-translate)。使用AWS默认凭证链(推荐:通过aws-actions/configure-aws-credentials OIDC)或显式awsAccessKeyId/awsSecretAccessKey进行认证;通过awsRegionAWS_REGION地区。
    • 新的 Google Cloud 翻译提供商(@google-cloud/translate,v2)。使用服务账户JSON凭据(googleCredentials)或API密钥(googleApiKey)进行认证;可选googleProjectId
    • 新输入:providerawsAccessKeyIdawsSecretAccessKeyawsRegiongoogleApiKeygoogleCredentialsgoogleProjectId
    • 意图-指定符映射: textType映射到谷歌的formatprofanityAction映射到AWS的脏话掩蔽,存在相应的保护。仅 Azure 的指定符(categoryIdapiVersionprofanityMarkerallowFallback)被其他提供者忽略。
    • Azure 请求输入(subscriptionKeyendpointregion)在 action.yml 中不再标记为必需,因此可以选择其他提供者——当provider azure时,仍然会被验证。
    • 新增翻译提供商页面,“入门”的提供者标签,输入页面的提供者选择,以及以Azure、AWS和Google为首的刷新主页。

    3.0.2 —

    • 修复:转播器请求现在会在线路上同时为/translate/languages 都固定api-version=3.0。Azure SDK 仅在通过凭证传递时才支持客户端级 API 版本选项;该动作通过头部为每个请求进行认证,因此该选项被悄然放弃,请求默认使用预览版 API 版本,其 /translate 契约拒绝了带有 HTTP 400 的正文(错误代码 400074)。完成了从3.0.1开始的修复。

    3.0.1 —

    • 修复: /translate请求体现在是一个裸的 JSON 数组,包含 { text } 项,而不是一个封装的 { inputs } 对象,符合 v3.0 REST 契约。单独这并不能恢复翻译——参见3.0.2。

    3.0.0 —

    • 被推迟到node24运行时间(破碎)。
    • 新输入:includeexcludeconfigPathcategoryIdapiVersiondryRunfailOnError,以及先进的翻译旋钮textTypeprofanityActionprofanityMarkerallowFallback
    • 源位置现在也会像 from=<locale> 一样转发给翻译器,这样短字符串就不会被自动检测。
    • 韧性:对暂时HTTP响应(408, 425, 429, 500, 502, 503, 504)的自动重试,尊重Azure的Retry-After首部——缺席时会退回到抖动指数退缩。通过maxRetriesretryBackoffMs调节。关闭#46。
    • 占位保护:标记,比如{{name}}${var}{0}{0:N2}%s%1$s和HTML实体,在翻译前被封装在哨兵中,翻译后恢复,所以翻译器停止了破坏i18next/Mustache/Handlebars/.NET/printf占位符。通过protectPlaceholders切换;与customPlaceholderPatterns相连。收紧#16。
    • 按密钥选择退出:新的noTranslatePatterns输入会完全从翻译器请求中丢弃匹配的密钥(保留品牌名称、错误代码等的源值)。将球状模式与解析器级别的键(JSON点路径、RESX name、PO msgid、XLIFF单元id、INI/restext键)匹配。关闭#35。
    • 通过.github/resource-translator.yml实现仓库级别配置。
    • 术语表支持,步骤摘要通过core.summary
    • esbuild bundler,ESLint 9 flat config,Prettier,EditorConfig.
    • NPM审计净化(0漏洞)。
    • Astro + Tailwind v4 文档网站,带有视图切换和表达代码。
    • 文档的可及性: WCAG 2.1 AA通行证。标志字形转换为路径,使其不再因渐变色块而失色,浮动Back to top按钮隐藏时使用inert(取代了aria-hidden切换时保持标签页),formats.astro部分不再与自动生成的标题ID发生冲突,三张区域卡现在显示了BCP-47有效的lang属性(nya→nylug→lgrun→rn),重复的Documentation地标标签在侧边栏和页脚之间进行了消歧。 inputs/configuration上的每个数据表都配有屏幕阅读器字幕。
    • 内联代码样式: Docs 的散文<code>现在采用了温暖/琥珀色主题的口音——这与品牌的链接和标题用→口音调色板区分开来。
    • Dependabot 自动合并,CodeQL 扫描,CI 矩阵。

    2.2.1 —

    • Security: bumped axios (1.4.0 → 1.6.0), @babel/traverse, semver, and tough-cookie/@azure/ms-rest-js to clear Dependabot alerts.

    2.2.0 —

    • Maintenance release (dependency and dist refresh).

    2.1.9 —

    • Dependency upgrades (including xml2js 0.4.23 → 0.5.0) and a refreshed dist build.

    2.1.8 —

    • Security: bumped follow-redirects, node-fetch, decode-uri-component, minimist, ansi-regex, jsdom, json5, minimatch, and @actions/core (1.2.6 → 1.9.1).

    2.1.7 —

    • Use a different delimiter when building the translation map so keys containing the previous separator are handled correctly (#36).
    • Fixes #32.

    2.1.6 —

    • Assorted bug fixes and improved logging.

    2.1.5 —

    • Fix an issue with file names containing four segments.

    2.1.4 —

    • Added a JSON parser and .json file support.
    • Fix batching bug (#18).

    2.1.3 —

    • Maintenance release.

    2.1.2 —

    • Fixes #15.

    2.1.1 —

    • Fix the generated step summary.

    2.1.0 —

    • Support for additional resource file formats beyond .resx: .ini, .po, .restext, and .xliff.

    2.0.4 —

    • Maintenance release.

    2.0.3 —

    • Fixes a batching bug and other related issues.

    2.0.2 —

    • File filtering to limit excessive translations.
    • Batching of the translate API call to avoid rate limiting.

    2.0.1 —

    • New action outputs: has-new-translations, summary-title, and summary-details.
    • Fix a bug where an error was logged but the action failure was not set.

    2.0.0 —

    • First official, fully functional and verified release.

    1.0.1 —

    • Build release.

    1.0.0 —

    • Initial release of the Azure AI Translator resource action (.resx support).

    0.0.x —

    • Initial prototype pre-releases (tags 0.01–0.09).