northword / zotero-format-metadata

Linter for Zotero. A plugin for Zotero to format item metadata. Shortcut to set title rich text; set journal abbreviations, university places, and item languages, etc; detect duplicate items.
GNU Affero General Public License v3.0
390 stars 6 forks source link

[Bug] 学位论文的语言、地点在添加条目时不自动更新;学位论文的语言更新有误;国防科大的地点无法更新 #189

Closed Phoebe-test closed 3 months ago

Phoebe-test commented 3 months ago

Is there an existing issue for this?

Environment

Describe the bug

  1. 学位论文的语言地点在添加条目时不自动更新
    • 如图所示: PixPin_2024-05-26_06-16-10
  2. 右键手动“Lint并修复”后,语言变更有误
    • 如图所示: PixPin_2024-05-26_06-19-29
  3. 右键手动“Lint并修复”后,国防科学技术大学地点不更新
    • 相同问题:#126
    • 如图所示: PixPin_2024-05-26_06-20-29
    • 推测原因:国防科大在不同时期有不同称呼,因此导致无法匹配,但测试了三个名字都无法更新地点 PixPin_2024-05-26_06-25-43

Anything else?

No response

northword commented 3 months ago

烦请截图设置页。

image image

Phoebe-test commented 3 months ago

感谢大佬拨冗垂阅,有关设置如图 PixPin_2024-05-26_13-46-17

northword commented 3 months ago

我未能复现你所说的第一点,是否可能存在其他插件干扰的情况?

EDIT: 你是通过哪种方式添加的条目呢?(Zotero Connector 还是由茉莉花提供的识别呢?)

语言识别错误的请启用“限制识别语言为 简体中文,英文”;

高校地点问题将于下一版本修复。

Phoebe-test commented 3 months ago

您好,我在逐项排查插件后,发现是插件zotero-actions-tags中,脚本[Share] Auto-Translate the New Item's Title #107导致的,将此脚本关闭后就可以在添加条目时自动更新学位论文的语言地点了。问题并不是Zotero Connector或茉莉花导致的。

northword commented 3 months ago

可能插件之间存在冲突,Zotero 官方目前没有提供有效的控制插件触发顺序的机制。

可以尝试关闭 Linter 的添加条目自动 lint,然后在 Actions 里调用 Linter:

Zotero.Linter.hooks.onLintInBatch("std", item)

这个接口在短时间内应该不会作显著改变。

后二者将在下一版本修复。

northword commented 3 months ago

:rocket: This ticket has been resolved in v1.16.11. See Release 1.16.11 for release notes.

Phoebe-test commented 3 months ago

可能插件之间存在冲突,Zotero 官方目前没有提供有效的控制插件触发顺序的机制。

可以尝试关闭 Linter 的添加条目自动 lint,然后在 Actions 里调用 Linter:

Zotero.Linter.hooks.onLintInBatch("std", item)

这个接口在短时间内应该不会作显著改变。

后二者将在下一版本修复。

您好,我在 Actions 里没能成功调用 Linter (已关闭 Linter 的添加条目自动 lint),可否麻烦您看一下这样设置是否正确: PixPin_2024-05-27_13-39-06 数据:

Zotero.Linter.hooks.onLintInBatch("std", item)

非常感谢!

northword commented 3 months ago

抱歉我给错了代码,Linter 插件这个接口接收的参数是一个 Zotero.Item[],代码需要修改为:

return await Zotero.Linter.hooks.onLintInBatch("std", [item])
Phoebe-test commented 3 months ago

抱歉我给错了代码,Linter 插件这个接口接收的参数是一个 Zotero.Item[],代码需要修改为:

return await Zotero.Linter.hooks.onLintInBatch("std", [item])

芜湖!可以解决插件之间的冲突了!为大佬献上膝盖!

Phoebe-test commented 3 months ago

为了解决Linter与自动翻译脚本之间的冲突,我想了一种解决方案

  1. 先通过 Action & Tags 运行 Linter 调整语言字段
  2. 延时2000毫秒运行 Auto-Translate the New Item's Title翻译标题和摘要