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

关于 MenuTranslate.js 有一个小问题 #273

Open
RainSkyFox opened this issue Aug 31, 2024 · 1 comment
Open

关于 MenuTranslate.js 有一个小问题 #273

RainSkyFox opened this issue Aug 31, 2024 · 1 comment

Comments

@RainSkyFox
Copy link

感谢您无私地分享

您好,这次更新发现了一个小问题

replaceText(target) function 内的 for (const childNode of target.childNodes) 内需要增加 if (this.tSkip(childNode)) return;
目前这边会透过 childNode 处将 "lite-search-item-type" 的内容转换出来

  for (const childNode of target.childNodes) {
       if (this.tSkip(childNode)) return;  <== 这边
    this.replaceText(childNode);
    const targetLangText = childNode?.nodeType === Node.ELEMENT_NODE ? this.MT(childNode.innerText) : this.MT(childNode.nodeValue);
    if (!targetLangText) continue;
    if (childNode?.nodeType === Node.TEXT_NODE) {
      childNode.nodeValue = targetLangText;
    }
    if (childNode?.nodeType === Node.ELEMENT_NODE) {
      childNode.innerText = targetLangText;
    }
  }
@Yorha4D
Copy link
Collaborator

Yorha4D commented Sep 1, 2024

@RainSkyFox 感谢反馈,目前正在对新版本进行适应性开发,这将起到帮助

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