Skip to content

Commit

Permalink
新的平行语言支持,使用original-*方式
Browse files Browse the repository at this point in the history
  • Loading branch information
redleafnew committed Nov 9, 2024
1 parent 894dfc1 commit b200297
Showing 1 changed file with 120 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</author>
<category citation-format="numeric"/>
<category field="engineering"/>
<updated>2024-07-16T16:39:25+08:00</updated>
<summary>1. 按照语言显示“等”或“et al.”;2. 仅纯电子资源显示引用日期和 URL;3. 无 DOI;4. 中文文献的英译(中文文献需要将作者姓名、标题、期刊、出版地、出版社的英文翻译分别填写在 `extra` 中的 `original-author`, `original-title`, `original-container-title`, `original-publisher-place`, `original-publisher` 字段。)。</summary>
<updated>2024-11-08T16:39:25+08:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="zh">
Expand All @@ -22,6 +23,7 @@
<term name="close-quote">”</term>
<term name="open-inner-quote">‘</term>
<term name="close-inner-quote">’</term>
<term name="zh-et-al">et al</term> <!-- 翻译中的"等" -->
<term name="page" form="short">
<single>p.</single>
<multiple>pp.</multiple>
Expand All @@ -42,6 +44,22 @@
</else>
</choose>
</macro>
<!-- 翻译的主要责任者(暂只支持人名) -->
<macro name="author-translation">
<choose>
<if variable="original-author">
<names variable="original-author">
<name et-al-min="4" et-al-use-first="3" initialize="false" sort-separator=", ">
<name-part name="family" text-case="uppercase"/>
</name>
<et-al term="zh-et-al"/>
</names>
</if>
<else>
<text macro="author"/>
</else>
</choose>
</macro>
<macro name="title">
<text variable="title"/>
<choose>
Expand All @@ -53,6 +71,21 @@
<text macro="type-id"/>
</group>
</macro>
<!-- 翻译的题名 -->
<macro name="title-translation">
<choose>
<if variable="original-title">
<text variable="original-title"/>
<group delimiter="/" prefix="[" suffix="]">
<text macro="type-id"/>
<!-- <text macro="medium-id"/> -->
</group>
</if>
<else>
<text macro="title"/>
</else>
</choose>
</macro>
<macro name="type-id">
<choose>
<if type="article-journal article-magazine" match="any">
Expand Down Expand Up @@ -90,6 +123,27 @@
</else>
</choose>
</macro>
<!-- 翻译的出版物名 -->
<macro name="container-title-translation">
<choose>
<if variable="original-container-title">
<text variable="original-container-title"/>
</if>
<else>
<text variable="container-title"/>
</else>
</choose>
</macro>
<!-- 翻译的出版社、地点 -->
<macro name="publisher-translation">
<group delimiter=", ">
<group delimiter=": ">
<text variable="original-publisher-place"/>
<text variable="original-publisher"/>
</group>
<text macro="issued-year"/>
</group>
</macro>
<macro name="container-contributors">
<names variable="container-author">
<name/>
Expand Down Expand Up @@ -214,7 +268,71 @@
</choose>
</else>
</choose>
<!-- 学位论文显示页码,学位论文无page项,引用页码需要放在总页数字段-->
<choose>
<if type="thesis" match="any">
<text variable="number-of-pages" prefix=": "/>
</if>
<!-- 书籍不显示日期 -->
<else-if type="book" match="none">
<text macro="accessed-date"/>
</else-if>
<!-- <else>
<text macro="accessed-date"/>
</else> -->
</choose>
</macro>
<!-- 翻译的英文 -->
<macro name="entry-layout-translation">
<text macro="author-translation" suffix=". "/>
<text macro="title-translation"/>
<choose>
<if type="bill book chapter legislation paper-conference report standard thesis" match="any">
<text macro="editor" prefix=". "/>
<choose>
<if variable="container-title">
<text value="//"/>
<text macro="container-contributors" suffix=". "/>
<text macro="container-title-translation" suffix=". " text-case="title"/>
</if>
<else>
<text value=". "/>
</else>
</choose>
<text macro="edition" suffix=". "/>
<text macro="publisher-translation"/>
</if>
<else-if type="article-journal article-magazine article-newspaper" match="any">
<group prefix=". ">
<choose>
<if variable="original-container-title">
<text macro="container-title-translation" text-case="title"/>
<text macro="serial-information" prefix=", "/>
</if>
<else>
<text macro="serial-information" suffix=". "/>
<text macro="publisher-translation"/>
</else>
</choose>
</group>
</else-if>
<else-if type="patent">
<text macro="issued-date" prefix=". "/>
</else-if>
<else>
<text macro="publisher-translation" prefix=". "/>
<choose>
<if has-day="issued">
<text macro="issued-date" prefix="(" suffix=")"/>
</if>
<else-if variable="issued">
<text macro="issued-year"/>
</else-if>
</choose>
</else>
</choose>
<text macro="accessed-date"/>
<text value="(in Chinese with English abstract)" prefix=". "/>
</macro>
<citation collapse="citation-number" after-collapse-delimiter=",">
<sort>
Expand All @@ -232,7 +350,7 @@
<layout locale="zh">
<text variable="citation-number" prefix="[" suffix="] "/>
<text macro="entry-layout" suffix="."/>
<text variable="title-short" suffix="." display="block"/>
<text macro="entry-layout-translation" display="block"/>
</layout>
<layout>
<text variable="citation-number" prefix="[" suffix="] "/>
Expand Down

0 comments on commit b200297

Please sign in to comment.