-
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: