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

Optimize Quote Reply for GitHub / 针对 GitHub 的引用回复功能优化 #1700

Closed
ShellWen opened this issue May 11, 2024 · 1 comment
Closed
Labels
enhancement New update or improvement request

Comments

@ShellWen
Copy link

您希望的更新和改进是什么 | Update or Improve

GitHub 拥有一项非常有用的功能:引用回复。在 Issues 和 PR 中,都可以使用引用回复,引用一部分评论。

但沉浸式翻译生成的翻译文本,可能会被意外包含进引用文本中,造成困惑。

我希望沉浸式翻译能针对性地对 GitHub 的相应场景进行优化,以解决上述问题。

GitHub has a very useful feature: quote replies. In Issues and PR, you can use quote replies to quote part of a comment.

However, the translated text generated by immersive translate may be accidentally included in the quoted text, causing confusion.

I'd like to see Immersive Translation optimized for GitHub scenarios to solve this problem.

补充说明 | Additional context

上述提到的问题可以在这里得到复现:ShellWen/immersive_translate_github_bug_poc#1
复现方法:

  • 翻译包含英文的评论,点击该评论右上角的菜单,点击“Quote reply”,原文和翻译文本都会被插入到输入框中;
  • 翻译包含英文的评论,选择该评论的任意部分(框选范围需包括翻译文本),点击该评论右上角的菜单,点击“Quote reply”,选区中的原文和翻译文本都会被插入到输入框中。

我已通过油猴 userscript 修复了这个问题,可以作为参考,这是它的项目地址:https://github.com/ShellWen/fix-immersive-translate-github-reply

The problems mentioned above can be reproduced here: ShellWen/immersive_translate_github_bug_poc#1
Reproduction ways:

  • To translate a comment that contains English, click on the menu at the top right corner of the comment, click "Quote reply", and both the original text and the translated text will be inserted into the input box;
  • To translate a comment that contains English, select any part of the comment (the box must include the translated text), click the menu at the top right corner of the comment, click "Quote reply", and both the original text and the translated text in the selection will be inserted into the input box.

I've fixed this problem with Grease Monkey userscript FYI: https://github.com/ShellWen/fix-immersive-translate-github-reply

@ShellWen ShellWen added the enhancement New update or improvement request label May 11, 2024
@keyboard3
Copy link
Contributor

我们考虑了,正对特别特殊的场景做处理,不是沉浸式应该关注的方向,会导致沉浸式变得越来越臃肿

@keyboard3 keyboard3 closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New update or improvement request
Projects
None yet
Development

No branches or pull requests

2 participants