-
v0.3.1 Stable
released this
2026-08-06 14:45:58 +08:00 | 1 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/HTBD/compare/v0.3.0...v0.3.1
HTBD v0.3.1
New Features
- Add per-language controls for translating posts and taxonomy terms.
- Add per-language translation cache clearing while retaining the existing global cache cleanup action.
- Preserve target-language routing when submitting comments and following comment redirects.
Fixes
- Use Baidu Translate's supported
jplanguage code for Japanese routing instead ofja. - Allow redirects to configured language-bound domains.
Localization and Release Workflow
- Prefer approved WordPress.org language packs while retaining the bundled Simplified Chinese translation as a fallback.
- Separate GlotPress stable-readme translations from runtime plugin localization files.
- Exclude WordPress.org translation submission files from release archives.
- Refine GitHub Release packaging and WordPress.org SVN deployment triggers.
Upgrade Notes
- Japanese subdirectory routes now use
/jp/rather than/ja/. - Existing persisted translations remain available unless explicitly cleared.
- Minimum requirements remain PHP 8.1 and WordPress 6.4.
HTBD v0.3.1
新增功能
- 新增按语言翻译文章和分类项的控制功能。
- 新增按语言清除翻译缓存的功能,同时保留全局缓存清除操作。
- 提交评论及处理评论重定向时保留目标语言路由。
问题修复
- 日语路由由
ja调整为百度翻译支持的jp语言代码。 - 允许重定向到已配置的语言绑定域名。
本地化与发布流程
- 优先使用 WordPress.org 已批准的语言包,同时保留内置简体中文翻译作为后备。
- 将 GlotPress 稳定版说明翻译与插件运行时本地化文件分离。
- 发布归档不再包含 WordPress.org 翻译提交文件。
- 优化 GitHub Release 打包及 WordPress.org SVN 部署触发流程。
升级说明
- 日语子目录路由现在使用
/jp/,不再使用/ja/。 - 已持久化的翻译会继续保留,除非管理员明确清除。
- 最低要求仍为 PHP 8.1 和 WordPress 6.4。
Downloads
-
v0.3.0 Stable
released this
2026-07-31 19:56:27 +08:00 | 11 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/HTBD/compare/v0.2.4...v0.3.0
New Features
- Added automatic source-language detection using Baidu Translate's
automode. - Added redirects for target-language
wp-adminandwp-login.phprequests to the corresponding source-site URLs. - Preserved query parameters when redirecting administration and login requests.
Release Automation
- Added automated GitHub Release packaging.
- Added automated deployment from GitHub Releases to WordPress.org SVN.
- Improved package validation for runtime files, localization resources, stable tags, and legacy filenames.
Compatibility
- Requires WordPress 6.4 or later.
- Requires PHP 8.1 or later.
- Existing translation data and manually configured source languages remain supported.
Upgrade Notes
Automatic source-language detection is opt-in and stored independently from the configured source language. Existing installations retain their current source-language behavior until the option is enabled.
新增功能
- 新增使用百度翻译
auto模式自动识别源语言的功能。 - 新增目标语言路由下
wp-admin和wp-login.php请求到源站对应地址的重定向。 - 管理后台和登录请求重定向时会保留查询参数。
发布自动化
- 新增 GitHub Release 自动打包流程。
- 新增从 GitHub Release 自动部署到 WordPress.org SVN 的流程。
- 改进安装包校验,覆盖运行时文件、本地化资源、稳定版本号和旧版文件名。
兼容性
- 需要 WordPress 6.4 或更高版本。
- 需要 PHP 8.1 或更高版本。
- 继续支持已有翻译数据和手动配置的源语言。
升级说明
自动识别源语言为可选功能,其状态与配置的源语言独立保存。现有安装会继续使用原有的源语言设置,直到管理员主动启用自动识别。
Downloads
- Added automatic source-language detection using Baidu Translate's
-
v0.2.4 Stable
released this
2026-07-31 16:07:25 +08:00 | 16 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/HTBD/compare/v0.2.3...v0.2.4
Notable Changes
- Preserve content inside HTML
<pre>and<code>elements, preventing source code and preformatted text from being sent to the translation provider. - Improve plugin security metadata and translator attribution.
- Update the plugin homepage URL.
Fixes
- Fix translated titles on singular views by resolving translations against the current post context.
Compatibility
- Requires WordPress 6.4 or later.
- Requires PHP 8.1 or later.
- Translation persistence and routing behavior remain compatible with v0.2.3.
Upgrade Notes
No database migration or configuration changes are required. Existing persisted translations remain available after upgrading.
主要变更
- 保留 HTML
<pre>和<code>元素内的内容,避免将源代码和预格式化文本发送给翻译服务。 - 完善插件安全元数据和译者署名。
- 更新插件主页 URL。
问题修复
- 修复单篇内容页面的翻译标题,确保根据当前文章上下文获取译文。
兼容性
- 需要 WordPress 6.4 或更高版本。
- 需要 PHP 8.1 或更高版本。
- 翻译持久化和路由行为与 v0.2.3 保持兼容。
升级说明
无需执行数据库迁移或修改配置。升级后可以继续使用现有的持久化翻译数据。
Downloads
- Preserve content inside HTML
-
v0.2.3 Stable
released this
2026-07-31 11:54:52 +08:00 | 22 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/HTBD/compare/v0.2.2...v0.2.3
Notable Changes
- Renamed the plugin and codebase to HTBD - hyx Translator powered by Baidu Translate.
- Changed the WordPress plugin slug to
hyx-translator-for-baidu-translate. - Renamed plugin entry points, PHP classes, translation resources, and administration assets to match the new identity.
- Added automatic migration of existing translations from the previous custom database table.
- Updated English and Simplified Chinese documentation, localization metadata, issue templates, and packaging configuration.
Fixes
- Fixed the release archive build workflow after the plugin rename.
- Updated the generated archive name and packaged directory structure to use the new plugin slug.
Compatibility
- Requires WordPress 6.4 or later.
- Requires PHP 8.1 or later.
- Existing persisted translation data is migrated when the renamed plugin is activated.
Upgrade Notes
When upgrading from v0.2.2, replace the previous plugin directory with
hyx-translator-for-baidu-translateand activate HTBD. The plugin will migrate the previous translation table automatically. Back up the WordPress database before upgrading.主要变更
- 将插件及代码库重命名为 HTBD - hyx Translator powered by Baidu Translate。
- 将 WordPress 插件 slug 更改为
hyx-translator-for-baidu-translate。 - 重命名插件入口、PHP 类、翻译资源和后台管理资源,使其与新的插件标识保持一致。
- 增加旧版自建数据表中已有翻译数据的自动迁移功能。
- 更新中英文文档、本地化元数据、问题模板和打包配置。
问题修复
- 修复插件重命名后的发布归档构建流程。
- 更新生成的归档文件名和插件目录结构,使其使用新的插件 slug。
兼容性
- 需要 WordPress 6.4 或更高版本。
- 需要 PHP 8.1 或更高版本。
- 启用重命名后的插件时,将自动迁移已有的持久化翻译数据。
升级说明
从 v0.2.2 升级时,请使用
hyx-translator-for-baidu-translate目录替换旧插件目录并启用 HTBD。插件将自动迁移旧版翻译数据表。升级前建议备份 WordPress 数据库。Downloads
-
v0.2.2 Stable
released this
2026-07-29 20:52:25 +08:00 | 26 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/btranslate/compare/v0.2.1...v0.2.2
Btranslate v0.2.2
This release adds localized administration, failed-translation retries, faster task scheduling, security hardening, and a more reliable packaging workflow.
本版本新增后台界面本地化和翻译失败重试功能,缩短任务调度延迟,同时加强安全性并改进插件打包流程。
English
Added
- Added per-item retry controls for failed post, page, category, and tag translations.
- Failed translations now appear below the settings-page progress bar with their target language and a Retranslate action.
- Added localized administration:
- English is used by default.
- Simplified Chinese is loaded when the WordPress locale is
zh_CN.
- Added English and Simplified Chinese GitHub issue forms with structured environment and reproduction fields.
- Added WordPress.org metadata, GPL-3.0-only licensing, plugin links, bilingual readmes, and Baidu external-service and privacy disclosures.
Improved
- Reduced the translation scheduling delay for newly saved content and edited terms from 30 seconds to 10 seconds.
- Automatic post and page translation is now scheduled only for published content, avoiding translation requests for drafts and other unpublished states.
- Improved localized sitemap retrieval:
- Uses the WordPress safe HTTP API.
- Rejects redirects.
- Limits responses to 5 MiB.
- Requires a successful HTTP response.
- Caches the source sitemap for five minutes.
- Expanded the English and Chinese documentation with:
- Baidu Translate API setup instructions.
- Manual ZIP installation steps.
- Language routing and permalink guidance.
- Translation fallback behavior.
- System requirements and issue-reporting guidance.
Fixed
- A failed forced retranslation no longer replaces an existing successful translation. The last valid translation remains available.
- Corrected the settings-page identifier from
wp-btranslatetobtranslate. - Corrected settings redirects and the Plugins-screen Settings link.
- Corrected the documented installation directory to
wp-content/plugins/btranslate. - Fixed release archives to include all required runtime files, localization catalogs, uninstall handling, license, and bilingual WordPress readmes.
Security
- Escaped translated plain-text titles and content segments before rendering them as HTML.
- Sanitized request paths and host headers used by language routing and sitemap resolution.
- Hardened translation-table queries using the WordPress database preparation APIs.
- Translation diagnostics no longer write directly to the PHP error log.
- Added the
btranslate_translation_request_loggedaction for optional sanitized diagnostics. - Diagnostic metadata excludes credentials, source and translated text, signatures, and complete provider responses.
Packaging
- Added a shared
build.shscript for local and CI release packaging. - Release builds now:
- Generate a versioned installable ZIP.
- Compile and validate the Simplified Chinese
.mocatalog. - Verify Stable tag consistency.
- Confirm required runtime files are present.
- Exclude development-only README files.
- Updated GitHub Actions to use the shared build script.
- Tagged builds publish the ZIP as both a workflow artifact and a GitHub Release asset.
Upgrade Notes
- No database migration, settings reset, or persisted-translation purge is required.
- Custom bookmarks or integrations using
options-general.php?page=wp-btranslateshould be updated tooptions-general.php?page=btranslate. - Sites that relied on translation diagnostics being written directly to the PHP error log should register a handler for
btranslate_translation_request_logged. - After initial installation or first-time configuration, run Retranslate all content to queue existing content.
中文
新增
- 新增文章、页面、分类和标签翻译失败后的逐项重试功能。
- 翻译失败的项目会显示在设置页进度条下方,并显示目标语言和“重新翻译”操作。
- 新增后台界面本地化支持:
- 默认使用英文。
- WordPress 语言为
zh_CN时加载内置简体中文翻译。
- 新增英文和简体中文 GitHub Issue 表单,包含环境信息和问题复现字段。
- 新增 WordPress.org 插件元数据、GPL-3.0-only 许可证、插件链接、中英文说明文件,以及百度外部服务和隐私披露。
改进
- 将新保存内容及已编辑分类、标签的翻译任务延迟从 30 秒缩短至 10 秒。
- 现在仅为已发布的文章和页面自动安排翻译,避免草稿及其他未发布状态产生翻译请求。
- 改进本地化站点地图获取流程:
- 使用 WordPress 安全 HTTP API。
- 禁止跟随重定向。
- 将响应大小限制为 5 MiB。
- 仅接受成功的 HTTP 响应。
- 将源站点地图缓存五分钟。
- 扩充中英文文档,新增以下内容:
- 百度翻译 API 配置说明。
- ZIP 手动安装步骤。
- 语言路由和固定链接配置说明。
- 翻译失败时的回退行为。
- 系统要求及问题反馈指引。
修复
- 强制重新翻译失败时,不再以失败记录覆盖已有成功译文,最后一次有效译文会继续保留。
- 将设置页标识从
wp-btranslate修正为btranslate。 - 修正设置操作后的跳转地址及插件列表中的“设置”链接。
- 将文档中的插件安装目录修正为
wp-content/plugins/btranslate。 - 修复发布压缩包内容,确保包含全部运行时文件、语言目录、卸载处理程序、许可证和中英文 WordPress 说明文件。
安全
- 在将翻译后的纯文本标题和正文片段输出为 HTML 前进行转义。
- 清理语言路由和站点地图解析使用的请求路径及主机头。
- 使用 WordPress 数据库预处理 API 加强翻译数据表查询安全性。
- 翻译请求诊断不再直接写入 PHP 错误日志。
- 新增
btranslate_translation_request_logged动作,用于按需记录经过清理的诊断信息。 - 诊断信息不包含凭据、原文、译文、签名或完整的服务响应。
打包
- 新增本地和 CI 共用的
build.sh发布构建脚本。 - 发布构建现在会:
- 生成带版本号的可安装 ZIP。
- 编译并校验简体中文
.mo语言文件。 - 检查 Stable tag 是否与插件版本一致。
- 确认必要的运行时文件均已包含。
- 排除仅用于开发的 README 文件。
- GitHub Actions 现已统一使用共享构建脚本。
- 创建版本标签后,ZIP 会同时作为工作流构建产物和 GitHub Release 附件发布。
升级说明
- 本次升级不需要执行数据库迁移、重置设置或清理已保存的译文。
- 使用
options-general.php?page=wp-btranslate的自定义书签或集成应更新为options-general.php?page=btranslate。 - 如果站点依赖翻译诊断信息直接写入 PHP 错误日志,需要为
btranslate_translation_request_logged注册处理程序。 - 初次安装或首次配置后,请执行“重新翻译所有内容”,为已有内容安排翻译。
Downloads
-
v0.2.1 Stable
released this
2026-07-27 20:08:09 +08:00 | 39 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/wp-translate/compare/v0.2.0...v0.2.1
English
Highlights
- Added localized sitemap support for both subdirectory and domain-binding routing:
- Subdirectory:
/{language}/sitemap.xml - Bound domain:
/sitemap.xml
- Subdirectory:
- Rewrites source-site URLs in sitemap XML text nodes, attributes, and stylesheet processing instructions to the active language URL.
- Added support for enabling subdirectory and domain-binding modes at the same time.
- Generated links now preserve the routing mode used by the current request.
- Both routing modes can be disabled when localized routing is not required.
- The domain-binding settings field is hidden when domain mode is disabled.
Fixes
- Fixed subdirectory rewrite handling so language-prefixed requests correctly reuse WordPress rewrite rules.
- Fixed fallback routing behavior when one or both routing modes are disabled.
- Fixed conflicts that previously prevented subdirectory and domain modes from working together.
- Improved localized sitemap URL matching and rewriting across several edge cases.
- Sitemap retrieval failures are non-fatal and fall back to normal WordPress request handling.
- External URLs and unrelated sitemap files are no longer rewritten.
Maintenance
- Standardized the plugin entry file and internal identifiers under the
btranslateprefix. - Renamed settings, Cron hooks, translation tables, PHP symbols, and related package references from
wpt_*tobtranslate_*. - Updated the packaging workflow to build releases from btranslate.php.
- Added complete uninstall cleanup for:
- Plugin settings and Baidu credentials
- Retranslation batch state
- Pending Btranslate Cron events
- Persisted translation tables on single-site and multisite installations
- Updated the English and Chinese documentation.
Upgrade Notice
This release changes persistent identifiers from
wpt_*tobtranslate_*, including the settings option and translation table name. No automatic migration from the old identifiers is included.Before upgrading an existing
v0.2.0installation, back up the WordPress database. Existing settings, credentials, and translations stored under the old identifiers may need to be reconfigured or regenerated.
中文
主要更新
- 新增本地化站点地图支持,同时适用于子目录和域名绑定路由:
- 子目录模式:
/{语言}/sitemap.xml - 绑定域名模式:
/sitemap.xml
- 子目录模式:
- 支持将站点地图 XML 文本节点、属性及样式表处理指令中的源站 URL 改写为当前语言 URL。
- 子目录和域名绑定模式现在可以同时启用。
- 页面生成的链接会保持当前请求所使用的路由模式。
- 不需要多语言路由时,可以同时关闭两种路由模式。
- 关闭域名模式后,管理界面会隐藏域名绑定设置。
问题修复
- 修复子目录重写逻辑,使带语言前缀的请求能够正确复用 WordPress 重写规则。
- 修复关闭一种或全部路由模式时的回退行为。
- 修复此前导致子目录模式和域名模式无法同时工作的冲突。
- 修复本地化站点地图请求匹配和 URL 改写中的多个边界问题。
- 获取源站站点地图失败时不再造成致命错误,而是交回 WordPress 按普通请求处理。
- 不再改写外部 URL 和无关的站点地图文件。
维护改进
- 将插件入口文件和内部标识统一为
btranslate前缀。 - 将设置项、Cron 钩子、翻译数据表、PHP 符号及打包配置从
wpt_*统一更名为btranslate_*。 - 更新发布工作流,改为从 btranslate.php 构建插件包。
- 新增完整的卸载清理逻辑,包括:
- 插件设置和百度翻译凭据
- 重新翻译批处理状态
- 待执行的 Btranslate Cron 事件
- 单站点和多站点环境中持久化的翻译数据表
- 更新中英文文档。
升级注意事项
本版本将持久化标识从
wpt_*更改为btranslate_*,其中包括设置选项和翻译数据表名称。目前没有包含旧标识到新标识的自动迁移逻辑。从现有
v0.2.0安装升级前,请先备份 WordPress 数据库。保存在旧标识下的设置、凭据和翻译数据可能需要重新配置或重新生成。
Changes:
v0.2.0...v0.2.1
Commits: 15 non-merge commits / 15 个非合并提交Downloads
- Added localized sitemap support for both subdirectory and domain-binding routing:
-
v0.2.0 Stable
released this
2026-07-27 16:40:48 +08:00 | 54 commits to master since this releaseFull Changelog: https://github.com/hanyixuanten/wp-translate/compare/v0.1.0-pre...v0.2.0
English
Highlights
- Added separate retranslation actions for:
- All supported content
- Published posts and pages only
- Categories and tags only
- Added live translation progress tracking, refreshed every five seconds.
- Added an action to clear all persisted translations and reset translation tasks.
- Improved bulk translation scheduling to reduce WP-Cron timeouts.
- Added optional, privacy-conscious Baidu API request logging.
Improvements
- Translation jobs now begin immediately and are scheduled two seconds apart, preventing a single WP-Cron request from processing the entire queue.
- Progress calculation now uses optimized database queries and only counts translations completed for the current task.
- The progress panel distinguishes between full-content, post/page, category/tag, and single-post translation tasks.
- Existing scheduled events are removed before equivalent forced-retranslation jobs are queued.
- Added an English/Chinese bilingual README and expanded documentation for translation workflows, logging, cache clearing, and uninstall behavior.
Fixes
- Fixed translation of the WordPress AI
wpai_meta_descriptionfield. - Added metadata-level handling for
wpai_meta_descriptionso persisted translations are returned in more rendering paths. - Improved translation handling and diagnostics around Baidu API requests.
Logging
The new Log every Baidu translation request setting is disabled by default. When enabled, it records:
- Source and target languages
- Field context
- Source-text fingerprint and length
- Request status
- Provider error code, when applicable
Credentials, signatures, source content, translated content, and complete API responses are never logged.
Data Management
- The new Clear translated cache action deletes all persisted translations, cancels pending translation jobs, and resets translation progress.
- The front end falls back to source-language content after the cache is cleared.
- Regenerating cleared or forcibly refreshed translations consumes Baidu API quota.
- Uninstalling the plugin now removes its settings, credentials, scheduled events, task state, and translation tables.
- Multisite uninstall cleanup is supported.
- Deactivating the plugin does not delete persisted data.
Development And Packaging
- Simplified the repository and release package by removing Composer, PHPUnit configuration, and the bundled test suite.
- Updated the plugin packaging workflow.
- The minimum supported versions remain WordPress 6.4 and PHP 8.1.
Upgrade Notes
No configuration migration is required. After upgrading:
- Use the scoped retranslation actions when only posts/pages or taxonomies need refreshing.
- Ensure WP-Cron, or a server-side cron runner, executes regularly.
- Enable request logging only when diagnostics are needed.
- Back up persisted translations before clearing the translation cache or uninstalling the plugin.
中文
主要更新
- 新增按范围重新翻译操作:
- 重新翻译所有支持的内容
- 仅重新翻译已发布的文章和页面
- 仅重新翻译分类和标签
- 新增翻译进度面板,每五秒自动刷新。
- 新增清除全部持久化翻译并重置翻译任务的操作。
- 优化批量翻译调度,降低 WP-Cron 超时风险。
- 新增可选且注重隐私保护的百度翻译请求日志。
功能改进
- 翻译任务现在立即开始,并以两秒间隔依次调度,避免单次 WP-Cron 请求处理整个队列。
- 优化翻译进度的数据库查询,只统计当前任务开始后完成的翻译。
- 进度面板可以区分全部内容、文章和页面、分类和标签以及单篇文章翻译任务。
- 强制重新翻译前会清除相同内容已有的计划任务,减少重复执行。
- 新增中文 README,并扩充翻译流程、日志、缓存清理和卸载行为的说明。
问题修复
- 修复 WordPress AI
wpai_meta_description字段的翻译。 - 新增
wpai_meta_description元数据层处理,使更多渲染路径可以正确读取持久化译文。 - 改进百度翻译 API 请求的翻译处理和问题诊断能力。
请求日志
新的 记录每次百度翻译请求 设置默认关闭。开启后会记录:
- 源语言和目标语言
- 字段上下文
- 源文本指纹和长度
- 请求结果状态
- 适用时的服务商错误码
日志不会记录凭据、签名、原文、译文或完整 API 响应。
数据管理
- 新增的 清除已翻译的缓存 操作会删除所有持久化译文、取消待执行的翻译任务并重置翻译进度。
- 清除缓存后,前台会暂时回退显示源语言内容。
- 重新生成已清除的译文或执行强制重新翻译会消耗百度翻译 API 配额。
- 卸载插件时会删除插件设置、凭据、计划任务、任务状态和翻译数据表。
- 支持 WordPress 多站点环境的卸载清理。
- 仅停用插件不会删除已持久化的数据。
开发与打包
- 简化仓库和发布包,移除了 Composer、PHPUnit 配置及仓库内置测试套件。
- 更新插件打包工作流。
- 最低支持版本仍为 WordPress 6.4 和 PHP 8.1。
升级说明
本次升级不需要迁移配置。升级后建议:
- 仅需刷新部分内容时,使用按文章页面或分类标签划分的重新翻译操作。
- 确保 WP-Cron 或服务器定时任务能够正常、定期运行。
- 仅在排查问题时开启百度翻译请求日志。
- 清除翻译缓存或卸载插件前,先备份需要保留的持久化译文。
Downloads
- Added separate retranslation actions for:
-
v0.1.0-pre Pre-Release
released this
2026-07-26 00:49:26 +08:00 | 65 commits to master since this releaseWP Translate v0.1.0-pre
首个预发布版本,提供基于百度翻译 API 的 WordPress 多语言基础能力。
已实现
多语言路由
- 支持目标语言子目录路由,例如
/en/example-post/。 - 支持绑定独立域名或子域名,例如
en.example.com=en。 - 目标语言站点中的文章、页面、分类、标签和主页链接会保持在当前语言域名或子目录中。
- 域名模式不注册前台重写规则,避免影响主站既有文章链接。
翻译与持久化
- 使用百度翻译 API 翻译内容。
- 翻译结果持久化保存到自定义数据表。
- 相同源文本、目标语言、字段上下文和 Provider 版本会复用已有翻译,避免重复 API 调用。
- 源内容改变后生成新的翻译身份。
- 翻译失败时前台回退显示源语言内容,不中断页面渲染。
- 支持单篇内容翻译、重新翻译,以及全站强制重新翻译。
支持的内容
- 文章与页面标题。
- 文章与页面正文。
- 摘要。
- 关联图片
alt文本。 - 分类和标签名称、描述。
- Yoast SEO 标题与描述。
- Rank Math 标题与描述。
- All in One SEO 与 SEOPress 的标题、描述输出。
- WordPress 核心浏览器页面标题。
HTML 内容保护
- 正文 HTML 标签不会发送给翻译 API。
<a>链接的可见文字会单独翻译。- 链接的
href、target、rel、class 等属性保持不变。 <img>、<picture>、<source>、<video>、<iframe>及其他 HTML 标签与属性保持原样。- 正文仅翻译标签之间的纯文本,避免链接、图片与嵌入内容错位。
后台管理
- “设置 > WP Translate”中可配置:
- 源语言与目标语言。
- 子目录或绑定域名模式。
- 域名到语言的绑定关系。
- 百度应用 ID 与密钥。
- 文章和页面列表提供每个目标语言的翻译状态:
- 已翻译 / 未翻译。
- 上次翻译时间。
- 翻译 / 重新翻译操作。
- 设置页提供“重新翻译所有内容”操作,并在执行前提示 API 消耗确认。
- 设置页显示实时翻译进度,按最近一次全量重翻批次统计。
- WordPress 插件列表中提供“设置”快捷链接。
技术与质量
- 最低支持 WordPress 6.4。
- 最低支持 PHP 8.1。
- 使用 WordPress Cron 处理翻译任务,前台请求不会直接调用百度 API。
- 包含 PHPUnit 单元测试与 PHP 语法检查。
- GitHub Actions 自动构建可安装的插件 ZIP,并在版本标签发布时上传 Release 附件。
已知限制
- 这是预发布版本,建议先在测试站使用。
- 自动生成的 SEO description 首次访问目标语言页面后会排入任务队列,等待 WP-Cron 执行后显示译文。
- 需要正确配置 WordPress Cron;生产环境建议使用系统 Cron。
- 域名绑定模式需要自行完成 DNS、SSL 和 Web 服务器虚拟主机配置。
- 当前仅覆盖已支持的 SEO 插件输出钩子。
- 建议升级后对包含复杂 HTML、链接或媒体标签的旧文章执行一次“重新翻译”。
Downloads
- 支持目标语言子目录路由,例如