generated from windingwind/zotero-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Bug] 仅当姓名全大写或全小写时执行大写转换 #111
Labels
bug
Something isn't working
Comments
我又试了一下,发现只有“van der Waal”和“Jean de La Fontaine”会分别被错误地转为“Van Der Waal”和“Jean De La Fontaine”,“d’Aubignac”和“al-Aswānī”保持不变。这是因为 我建议将这一条件进一步限制为“ |
apply(item: Zotero.Item): Zotero.Item | Promise<Zotero.Item> {
const creators = item.getCreators();
for (const creator of creators) {
creator.firstName =
isFullUpperCase(creator.firstName!) || isFullLowerCase(creator.firstName!)
? Zotero.Utilities.capitalizeName(creator.firstName!.trim())
: creator.firstName;
creator.lastName =
isFullUpperCase(creator.lastName!) || isFullLowerCase(creator.lastName!)
? Zotero.Utilities.capitalizeName(creator.lastName!.trim())
: creator.lastName;
}
item.setCreators(creators);
return item;
} |
LGTM. |
github-project-automation
bot
moved this from 🏗 In progress
to ✅ Done
in @northword's Zotero
Jan 2, 2024
🚀 This ticket has been resolved in v1.8.0. See Release 1.8.0 for release notes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前的方法可能会将部分姓名(比如下面的例子)错误地转为大写。按照 APA 的要求 姓名的大小写应遵循本人的偏好。建议限制范围,比如仅当姓(或名)为全大写或全小写时进行转换。
Originally posted by @zepinglee in #47 (comment)
The text was updated successfully, but these errors were encountered: