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

统一题录的语言格式 #73

Closed
fredericky123 opened this issue Feb 19, 2022 · 8 comments
Closed

统一题录的语言格式 #73

fredericky123 opened this issue Feb 19, 2022 · 8 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@fredericky123
Copy link

fredericky123 commented Feb 19, 2022

目前从知网等导入,显示的language为"中文",不符合后端csl的语言规范,能否统一为“zh”或“zh-CN”?英文则统一为"en"

@fredericky123
Copy link
Author

fredericky123 commented Feb 19, 2022

先感谢各位大佬为zotero中文社区做的贡献!!!
对于中文文献的语言格式,感觉各位大佬在csl中写的不统一,斗胆建议各位大佬商量出一致的标准(zh,zh-CN等),供大家明确统一
@l0o0
@redleafnew
@zepinglee
@qnscholar

@zepinglee
Copy link
Contributor

Zetero 的参考文献生成工具 CSL 要求 language 为 ISO 639-1 的语言代码,比如 “en”, “zh” 或者 “de-DE”, “de-AT”( https://docs.citationstyles.org/en/stable/specification.html#standard-variables)。
Screen Shot 2022-02-19 at 20 37 31

大陆地区的中文论文使用 zh-CN 比较合适。

@fredericky123
Copy link
Author

这个其实同样存在于英文文献,不同期刊网址导入的有的显示en,有的显示en-US,还有English,总需要花些额外时间来处理

@zepinglee
Copy link
Contributor

这个其实同样存在于英文文献,不同期刊网址导入的有的显示en,有的显示en-US,还有English,总需要花些额外时间来处理

enen-US 影响不大,CSL 有一套 locale fallback 的机制(https://docs.citationstyles.org/en/stable/specification.html#locale-fallback)。由于 en-USen 的 primary dialect,这两种设置方式其实都是调用 locales-en-US

@fredericky123
Copy link
Author

这个其实同样存在于英文文献,不同期刊网址导入的有的显示en,有的显示en-US,还有English,总需要花些额外时间来处理

enen-US 影响不大,CSL 有一套 locale fallback 的机制(https://docs.citationstyles.org/en/stable/specification.html#locale-fallback)。由于 en-USen 的 primary dialect,这两种设置方式其实都是调用 locales-en-US

明白了,在Zotero中文社区,尤其是tanslators_CN能统一,就足够了

@l0o0
Copy link
Owner

l0o0 commented Mar 15, 2022

好的,我和能联系上的朋友说明下,统一我们使用的语言格式

@l0o0 l0o0 added the enhancement New feature or request label Mar 15, 2022
@l0o0
Copy link
Owner

l0o0 commented Mar 16, 2022

Zetero 的参考文献生成工具 CSL 要求 language 为 ISO 639-1 的语言代码,比如 “en”, “zh” 或者 “de-DE”, “de-AT”( https://docs.citationstyles.org/en/stable/specification.html#standard-variables)。 Screen Shot 2022-02-19 at 20 37 31

大陆地区的中文论文使用 zh-CN 比较合适。

我后面会把中文翻译器里的语言更新为zh-CN

@zepinglee
Copy link
Contributor

简单搜了一下,目前还有一些 translator 的语言设置没有统一,尤其是知网和万方。这个语言的格式其实是 https://en.wikipedia.org/wiki/IETF_language_tag,也叫 BCP 47,简体中文只能设置 zhzh-CNzh_CN 是不合规范的,可能会导致问题。

.replace(/^LA 中文;/gmi, "LA zh_CN") // Default language is zh_CN

newItem.language = 'zh_CN';

需要我发个 PR 吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants