Option: Translation First 可选项:译文在上方显示#750
Merged
Merged
Conversation
New global rules: Original First / Translation First 新增全局规则:文本顺序 [原文在上方](默认) [译文在上方](可选)
问题:当全局设置改为"译文在上方"(transOrder: "translation-first")时,使用"隐藏原文"快捷键切换时,原文仍然总是显示在上方,没有遵循新的全局规则。 根本原因:#toggleTranslationOnly 方法在切换"隐藏原文"时,只是隐藏或显示原文节点,但没有根据全局的 transOrder 设置重新调整译文框(wrapper)的位置。
Contributor
Author
fishjar
reviewed
Jun 5, 2026
| inner.appendChild(createLoadingSVG()); | ||
| wrapper.appendChild(inner); | ||
|
|
||
| // 在原文和译文之间添加分隔换行 |
Owner
There was a problem hiding this comment.
这一段添加 br 的代码,前面也有根据文本长度添加一次了,是否重复?
如果是译文在前,这个br应该是加在原文前面,或者译文后面。
Owner
|
Contributor
Author
|
自测了一下,来回反复切换双语和仅译文快捷开关,不会出现额外空行了。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

New global rules: Original First / Translation First


新增全局规则:文本顺序 原文在上方(默认) 译文在上方(可选)
设置方法
效果演示