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

标签引用支持限定命名空间 #85

Closed
ghost opened this issue Sep 6, 2021 · 6 comments
Closed

标签引用支持限定命名空间 #85

ghost opened this issue Sep 6, 2021 · 6 comments
Assignees

Comments

@ghost
Copy link

ghost commented Sep 6, 2021

举例:比如我现在想给一个描述中加入group标签,表示“乱交”,但我以group引用后,显示的是"团队"。
我去看了female.md下的各种3p标签对group的引用,均正常引用到“乱交”,而文件中也没有别的特别的标记。请问是如何做到的。
图
图
还有比如标签toddlercon这样的不同命名空间,会以不同翻译显示的。如何准确地定位到其中一个。ETE中引用后,只能默认显示成“幼儿”

@OpportunityLiu
Copy link
Collaborator

现在是优先在同命名空间找,找不到再扩大范围

@ghost
Copy link
Author

ghost commented Sep 6, 2021

现在是优先在同命名空间找,找不到再扩大范围

好吧,我了解了。谢谢

@ghost ghost closed this as completed Sep 6, 2021
@OpportunityLiu OpportunityLiu reopened this Sep 7, 2021
@OpportunityLiu
Copy link
Collaborator

过段时间我优化下吧,确实是个问题

@ghost
Copy link
Author

ghost commented Sep 7, 2021

过段时间我优化下吧,确实是个问题

好的,期待更新。

@OpportunityLiu
Copy link
Collaborator

OpportunityLiu commented Sep 7, 2021

弄好了

  1. 修正了未指定命名空间时标签引用的检索顺序
    https://github.com/EhTagTranslation/Editor/blob/274d907e5345fed7ea6de09caa0f369a1e3f2b42/src/shared/markdown/md-parser.ts#L129-L140

  2. 可以显式指定引用的标签所在的命名空间 如 f:groupfemale:group
    https://github.com/EhTagTranslation/Editor/blob/274d907e5345fed7ea6de09caa0f369a1e3f2b42/src/shared/namespace.ts#L3-L38

@OpportunityLiu OpportunityLiu changed the title 请问在ETE中描述标签,需要引入其他标签说明时。如何限定其命名空间。 标签引用支持限定命名空间 Sep 7, 2021
@OpportunityLiu OpportunityLiu self-assigned this Sep 7, 2021
@OpportunityLiu OpportunityLiu pinned this issue Sep 7, 2021
@ghost
Copy link
Author

ghost commented Sep 7, 2021

好快,大佬神速!

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

1 participant