Repository navigation
Releases: wxmyyds/DiscordAutoTranslate
Releases · wxmyyds/DiscordAutoTranslate
Release list
DiscordAutoTranslate 1.0.0
DiscordAutoTranslate 1.0.0
✨ 新功能
- feat: 新增发布工作流,README 改为 LSPosed 模块页风格
- feat: 集成正式签名到构建流程
- feat: add Anthropic Messages protocol (/v1/messages)
- feat: append protocol endpoint to base API URL
- feat: wrap source text in tags with explicit protocol rule
- feat: style markers preserve bold/italic across merged paragraphs
- feat: use URLs as position markers so URL-adjacent formatted text translates
- feat: disable thinking outright instead of requesting low effort
- feat: request reasoning_effort=low for chat/completions
- feat: replace request template/path config with provider protocol
- feat: rewrite default system prompt in English
- feat: strengthen default translation prompt, drop few-shot examples
- feat: toggle icon on poll question text
- feat: translate poll cards
- feat: inline toggle icon for embeds
- feat: translate embed text (rich embeds and native post previews)
- feat: always-on layout diagnostics with on-screen toasts
- feat: surface layout diagnostics in settings when logcat is unavailable
- feat: 行内翻译图标正式接入(三态 / 切换重试 / 范围限制 / 移除右下角图标)
- feat(prompt): 系统提示词独立成配置项,新增 {{system}} 占位符
- feat(icon): 改用 ImageView + 三个矢量图,并修复图标不稳定的根因
- feat(stage3): 保留 Markdown 的节点树翻译 + 回复引用支持
- feat(stage2): 独立翻译引擎(通用 JSON 配置 + 调度 + 缓存)
- feat: 阶段1 可行性原型骨架(LibXposed API 102)
🐛 修复
- fix: translate items of bullet-list messages
- fix: require exact emoji anchors for translation alignment (#18)
- fix: send emoji in the request so its position survives translation
- fix: detect Anthropic SSE by event: prefix too
- fix: show settings defaults as placeholders and stop persisting them
- fix: skip explicit null content deltas when accumulating streamed translations
- fix: guard styled extraction against whitespace-only text nodes
- fix: stop blocking paragraph alignment on emoji/mention/code between segments
- fix: accept paragraph-tier blank parts inside URL spans, log align refusal reasons
- fix: refuse paragraph alignment when a URL sits between segments of one paragraph
- fix: stop suppressing repeated paragraphs (drop frequency_penalty, prompt rule), log mismatch counts
- fix: align backfill by display paragraph so formatted text translates again
- fix: require exact structure match for backfill, demand structure fidelity in prompt
- fix: reject truncated streams instead of backfilling partial translations
- fix: backfill markerless translation by paragraph blocks, reject duplicated output
- fix: align thinking-disable params with SenseNova docs
- fix: fall back to plain text when a marked request returns empty content
- fix: stream chat/completions requests so long generations stop hitting the read timeout
- fix: fall back to plain request when a marked request times out; add stage timing logs
- fix: exclude URL link display text from plain requests too
- fix: retry without markers when segment protocol validation fails
- fix: harden long-text translation - URL preservation + strict segment validation
- fix: poll icon click never fired - claim gesture on ACTION_DOWN
- fix: wrong list variable name broke PollHooks compile
- fix: translating icon does not spin inside embed cards
- fix: embed rows keep stale height after shorter translation
- fix: keep blank lines from the original when translating
- fix: make inline icon taps hit reliably
- fix: strip segment markers when falling back to line split
- fix: preserve inline styles and line structure across translation
- fix: measure and lay out the content view directly, bypassing the RecyclerView
- fix: notify the inner accessories adapter so the content item is re-measured
- fix: force relayout on ChatListView and widen the parent-chain depth limit
- fix: route measure diagnostics through a public HookBridge entry
- fix: call messageIdOf through the instance in the posted relayout
- fix: defer the forced relayout until after the host layout pass
- fix: synchronously rebind the chat row so the content holder re-binds
- fix: force re-measure of message content after translation
- fix: avoid ContentProvider.requireContext name clash
- fix: refresh outer chat row after translation
- fix: invalidate host bind cache before row refresh
- fix: route layout diagnostics through framework logs
- fix: improve rerender diagnostics and layout sampling
- fix: import Diagnostics in SettingsActivity
- fix: re-read remote prefs and commit diagnostics synchronously
- fix: restore logLayoutFact removed together with the toast block
- fix: make diagnostic context effectively final for the toast lambda
- fix: import Reflect in HookBridge
- fix: rebind the message row via notifyItemChanged after rerender
- fix: force relayout of message row like the host does
- fix: import Nullable in RerenderRegistry
- fix: defer rerenders until after the host layout pass
- fix: trim trailing blank lines after translated content
- fix: omit preserved-node placeholder words from translation requests
- fix: reinforce translation-only prompt and mild repetition penalty
- fix: exclude mention labels from translation replacement
- fix: preserve message text on rich-text translation failures
- fix: address global audit round three findings
- fix: 修复翻译中图标旋转动画有概率卡死
- fix: InlineIconSpan.resetAll() 改为 public(ModuleEntry 在不同包)
- fix: 全局审查第二轮修复(消息正确性/热重载/隐私/UI 生命周期)
- fix(test): 同步空模板的占位符断言
- fix(test): 删除重复定义的测试方法
- fix: 全局审查修复(隐私/并发/JSON 严格性/死代码)
- fix(config): 未配置的配置项一律回落默认值
- fix(prompt): 旧默认模板导致系统提示词静默失效 + 强化脏话词条规则
- fix(settings): 补齐系统提示词输入框的缺失接线
- fix(icon): 修复翻译完成后图标不可点击(无法切回原文)
- fix(icon): 修复上一提交的 3 个编译错误
- fix(icon): 图标改为延迟挂载 — 修复'有译文但无图标'
- fix(build): 修复 TranslationIconView 中残留的重复 @nullable
- fix(hooks): 逐个核验 Hook 点,修复行容器/图标定位/日志不可见
- fix(hooks): 修正渲染漏斗定位错误 — 真机上既无译文也无图标
- fix(json): 未闭合的 {{ 不再吞掉后续合法占位符
⚙️ 改进与优化
- refactor: 包名改为 io.github.wxmyyds 前缀
- refactor: remove LSPosed logging entirely
- refactor: drop unused postJson overload and stage timing logs
- refactor: remove dead segment-marker request machinery
- refactor: single plain-text pipeline, no fallback paths
- refactor: review pass - dedupe helpers, align poll answer iteration
- refactor: dedupe in-memory prefs and SHA-256 hex helpers
- refactor: extract row refresh plumbing from HookBridge into RowRefresher
- refactor(prompt): 去掉自动迁移,改为模板缺占位符时弹窗提醒
📦 其他
- chore(release): 2-1.0.0
- docs: README 精简当前状态,移除阶段标注
- docs: README 更新当前状态为阶段 1-6 全部完成
- docs: 整理文档为分类小文档,删除历史散档
- docs: rewrite code comments to remove AI-writing patterns
- Add MIT License to the project
- cleanup: remove empty blocks and unused locals left by log removal
- test: drop separator space before URL marker in mixed-format case
- test: keep original trailing space in style-fallback assertion
- test: keep original lead/tail spaces in url-after-bold assertion
- test: count url links inside their bold parent in repeated-ad regression
- test: declare throws on fake round-trips throwing checked exceptions
- test: probe example regression by example-specific phrases
- test: update prompt-contract tests for the example-free default
- cleanup: remove production-dead APIs
- cleanup: remove dead code left by the blank-line fix
- test: fix expected join for nested formatting case
- test: update assertions for whitespace kept outside segment markers
- test: remove race in sameMessageWithNewContentIsNotDeduped
- diag: make ParagraphProbe entry points public
- diag: probe paragraph and blank-line structure
- diag: dump the line's x->offset map and the icon's hit offset window
- diag: log the icon span's live range and pixel bounds
- diag: close probe blind spot and record which span the host picks
- diag: add temporary probe for inline icon click misses
- cleanup: remove temporary layout diagnostics
- diag: try guarded RecyclerView dispatchLayout
- diag: watch row bounds after relayout
- diag: expose RecyclerView layout request gates
- diag: capture bounds after relayout request
- diag: capture pre-draw row layout state
- diag: sample the row again one frame later to see if layout was applied
- diag: dump the row's view tree heights to locate the residual blank space
- diag: tag measure passes with the MessageView's own messageId
- revert: drop the synchronous row rebind, keep the deferred relayout
- diag: log every ChatListChildView measure pass, not only the frozen branch
- docs: correct the scheduleRelayoutAfterLayout javadoc
- diag: show layout diagnostics in a host dialog on icon long-press
- Revert "diag: forward layout diagnostics back into the module app"
- diag: forward layout diagnostics back into the module app
- diag: trace row refresh adapter positions
- diag: trace holder rebind after row refresh
- diag: record text view layout metrics
- diag: observe same-key frozen measurements
- docs: hand off the unresolved layout-refresh issue
- diag: write both channels, always record, add channel heartbeat
- diag: write diagnostics to module private files dir, read from settings page
- diag: drop on-screen toasts, read diagnostics from settings with copy
- diag: number each toast and surface rerender dispatch failures
- test: wait for the permit holder instead of inFlight when checking stale tasks
- add layout-diagnostic logs to locate the refresh blocker
- docs: record host relayout behaviour behind the deferred refresh
- test: align nested-format assertion with trailing blank trimming
- docs: 保留行内图标的真机验证记录,修正功能文档的悬空引用
- docs: 记录旋转卡死的四条成因与修复,更新测试计数(118 用例)
- docs: 记录 CI 结果(114 用例通过)与真机测试清单
- docs(stage3): 记录真机失败根因与 Hook 点逐项核验结果
- test(stage3): 修正嵌套结构用例的期望值并补充分段用例
- ci: 固定 ubuntu-24.04 并为 SDK 安装增加 cmdline-tools 兜底
- ci: 修正 API 37 平台包名为 platforms;android-37.0
- ci: 复用 runner 预装 Android SDK,移除 setup-android 动作
基于 main 最新代码构建,versionCode 2。