Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【问题】翻译文本时,对段落中的标签会被解释为一个单独的标签 #5

Open
zeng-hang opened this issue Dec 4, 2022 · 2 comments

Comments

@zeng-hang
Copy link

如果一段文本中的所有单词都被一个标签包裹起来,那么翻译的结果将会是单词翻译,而不是段落翻译:
image

@wangrongding
Copy link
Member

是的,所以提供了两种模式(点击插件图标可以看到,行内对比翻译,和段落对比翻译),你希望的那种属于,段落对比翻译,但是它有一个缺点,会直接破坏原本的布局,你可以在一些布局比较复杂的页面测试,不出意外的话,应该排版会错乱。而行间对比翻译是直接遍历所有标签,只在这个标签的最深处,找到文本节点后,将译文和它放在一起,这样不会影响页面。

当然,目前插件还有很多改进的空间,如果大家有好的建议和改进的想法,欢迎提出来,一起共建 DevGo,也欢迎大家给它提 PR

@zeng-hang
Copy link
Author

我在提pr,代码提交不上去,哈哈哈

wangrongding added a commit that referenced this issue Dec 4, 2022
fix: 修复对段落标签解析方式,针对内联元素翻译解析合并到父级 #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants