fishjar / kiss-rules

Ingest and generate subscription rules for [KISS-Translator]. 收录并生成用于 [KISS-Translator] 的订阅规则。
MIT License
25 stars 11 forks source link

blogs.windows.com #7

Closed Bush2021 closed 1 year ago

Bush2021 commented 1 year ago

https://github.com/fishjar/kiss-rules/assets/79072750/1041f491-5268-4d7c-bb54-52fcb472d245

https://blogs.windows.com/windows-insider/2023/09/26/releasing-windows-11-version-23h2-to-the-release-preview-channel/

如图,红框内容翻译不正常,请求支持。规则如下: :is(li, p, h1, h2, h3, h4, h5, h6, dd, blockquote), .c-uhf-nav-link, figcaption

fishjar commented 1 year ago

1、第一个红矿,原因是浏览器语言识别的bug,误将Windows Experience识别为中文了,所以没有翻译。 Screenshot from 2023-10-09 14-40-01

2、第二个红框,这里需要增加一条webfix规则,你可以提交一个PR。

    {
      pattern: "blogs.windows.com",
      selector: ".t-content>div>ul>li",
      rootSelector: "",
      fixer: FIXER_BR,
    },

效果: Screenshot from 2023-10-09 14-40-58

Bush2021 commented 1 year ago

感谢!不过有点好奇是怎么定位到换行问题的呢?

fishjar commented 1 year ago

如果css选择器选择不到的文本,一般都可以用这个方法解决