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

希望过滤器“以下单词保持原文,不要翻译”能支持正则! #1622

Open
921j opened this issue Apr 9, 2024 · 3 comments
Open
Labels
enhancement New update or improvement request

Comments

@921j
Copy link

921j commented Apr 9, 2024

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

在搜索 FireFox 的参数时,它的形式是 AAAA.BBB.CCCCC 之类的,Chrome 的参数则是 --AAAA-BBB-CCCCC 之类的,有时在论坛里搜到这些参数时,这些不必要的翻译既浪费资源,也让人眼花缭乱,这类不想翻译的参数、代码之类的太多,仅凭页面规则维护太困难,建议能够在 “以下单词保持原文,不要翻译” 中支持正则功能,应该能减轻管理员们不少负担,也更及时。
比如以下网页
www.reddit.com/r/firefox/comments/18bt20m/privacy_settings_recommendations

补充说明 | Additional context

No response

@921j 921j added the enhancement New update or improvement request label Apr 9, 2024
@theowenyoung
Copy link
Contributor

目前可以在 开发者设置里,修改 "generalRule" 里的这个字段:

  {"generalRule":{
    "excludeRegexps": [
      "(<\\\\/?[a-zA-Z0-9]+(?:[^>]*?)>)",
      "(<form>|<body>|<strong>|<img|<IMG|<Img|<ImG|<iMg|<iMG|<em>|<b>|</b>|<i>|</i>|<u>|</u>|<br>|<br/>)"
    ],
    }
    }

@921j
Copy link
Author

921j commented Apr 24, 2024

抱歉最近很少上网,没及时测试和回复
我把这段代码加入后,貌似没什么变化
加入后是这样,不知道有什么地方不对
"generalRule": { "excludeRegexps": [ "(&lt;\\\\/?[a-zA-Z0-9]+(?:[^&gt;]*?)&gt;)", "(<form>|<body>|<strong>|<img|<IMG|<Img|<ImG|<iMg|<iMG|<em>|<b>|</b>|<i>|</i>|<u>|</u>|<br>|<br/>)" ], "isTranslateTitle": false, "subtitleRule.add": { "showQuickButton": false } },

@theowenyoung
Copy link
Contributor

哦哦,我给的只是示例的正则,你需要写自己的正则在 excludeRegexps 里面 。

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