置顶公告:【置顶】关于临时开启评论区所有功能的公告(2022.10.22) | 【置顶】关于本站Widget恢复使用的公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:Citation/CS1/Suggestions/sandbox

贴贴♀百科,万娘皆可贴的百科全书!转载请标注来源页面的网页链接,并声明引自贴贴百科。内容不可商用。
跳到导航 跳到搜索
Template-info.svg 模块文档  [查看] [编辑] [历史] [刷新]

这个模块及其相关的下级模块支持Citation Style 1以及Citation Style 2格式的引文模板。这两者通常简称为CS1和CS2。

cs1 • cs2 模块
在用的 沙盒 简介
Module:Citation/CS1 Module:Citation/CS1/sandbox [编辑] Rendering and support functions
Module:Citation/CS1/Configuration Module:Citation/CS1/Configuration/sandbox [编辑] Translation tables; error and identifier handlers
Module:Citation/CS1/Whitelist Module:Citation/CS1/Whitelist/sandbox [编辑] List of active, deprecated, and obsolete cs1 • 2 parameters
Module:Citation/CS1/Date validation Module:Citation/CS1/Date validation/sandbox [编辑] Date format validation functions
Module:Citation/CS1/Identifiers Module:Citation/CS1/Identifiers/sandbox [编辑] Functions that support the named identifiers (isbn, doi, pmid, etc)
Module:Citation/CS1/Utilities Module:Citation/CS1/Utilities/sandbox [编辑] Common functions and tables
Module:Citation/CS1/COinS Module:Citation/CS1/COinS/sandbox [编辑] Functions that render a cs1 • 2 template's metadata
Module:Citation/CS1/Suggestions Module:Citation/CS1/Suggestions/sandbox [编辑] List that maps common erroneous parameter names to valid parameter names
  1. --Please insert new suggestions in alphabetical order
  2. --The form is ['incorrect'] = 'correct',
  3. suggestions = {
  4. -- ['acccessdate'] = 'access-date',
  5. -- ['accesdate'] = 'access-date',
  6. -- ['access date'] = 'access-date',
  7. -- ['accessate'] = 'access-date',
  8. -- ['accessdare'] = 'access-date',
  9. -- ['accessdatte'] = 'access-date',
  10. -- ['accessddate'] = 'access-date',
  11. -- ['accessdte'] = 'access-date',
  12. -- ['accessed'] = 'access-date',
  13. -- ['accessedate'] = 'access-date',
  14. -- ['accesssdate'] = 'access-date',
  15. -- ['accssdate'] = 'access-date',
  16. -- ['acessdate'] = 'access-date',
  17. ['address'] = 'location',
  18. ['année'] = 'year', -- French
  19. ['añoacceso'] = 'access-date', -- Spanish, Italian
  20. ['apellido'] = 'last', -- Spanish, Italian
  21. ['archive date'] = 'archive-date',
  22. ['archive url'] = 'archive-url', -- Spanish, Italian
  23. ['artist'] = 'others',
  24. ['auteur'] = 'author', -- French
  25. ['auther'] = 'author',
  26. ['authorformat'] = 'name-list-format', -- remove after 2016-01-01
  27. ['author-format'] = 'name-list-format', -- remove after 2016-01-01
  28. ['author link'] = 'author-link',
  29. -- ['autor'] = 'author', -- Spanish, Italian
  30. -- ['autor2'] = 'author2', -- Spanish, Italian
  31. ['autthor'] = 'author',
  32. ['began'] = 'date', -- remove after 2016-01-01
  33. ['chapter_title'] = 'chapter',
  34. ['cita'] = 'quote', -- Spanish, Italian
  35. ['coautores'] = 'coauthors', -- Spanish, Italian
  36. ['consulté le'] = 'access-date', -- French
  37. ['deadlink'] = 'dead-url',
  38. ['distributor'] = 'publisher',
  39. ['éditeur'] = 'editor', -- French
  40. ['editon'] = 'edition',
  41. ['editoin'] = 'edition',
  42. ['editorformat'] = 'name-list-format', -- remove after 2016-01-01
  43. ['editor-format'] = 'name-list-format', -- remove after 2016-01-01
  44. ['editorgiven'] = 'editor-given', -- remove after 2016-01-01
  45. ['editorial'] = 'publisher',
  46. ['editorsurname'] = 'editor-surname', -- remove after 2016-01-01
  47. ['en ligne le'] = 'archive-date', -- French
  48. ['ended'] = 'date', -- remove after 2016-01-01
  49. ['enlaceautor'] = 'author-link', -- Spanish, Italian
  50. ['fecha'] = 'date', -- Spanish, Italian
  51. ['fechaacceso'] = 'access-date', -- Spanish, Italian
  52. ['fechaarchivo'] = 'archive-date', -- Spanish, Italian
  53. ['filetype'] = 'format',
  54. ['first 1'] = 'first1',
  55. ['foramt'] = 'format',
  56. ['formato'] = 'format', -- Spanish, Italian
  57. ['frist'] = 'first',
  58. ['idioma'] = 'language', -- Spanish, Italian
  59. ['isnb'] = 'isbn',
  60. ['lang'] = 'language',
  61. ['langauge'] = 'language',
  62. ['langue'] = 'language', -- French
  63. ['last 1'] = 'last1',
  64. ['lieu'] = 'location', -- French
  65. ['lire en ligne'] = 'url', -- French
  66. ['loaction'] = 'location',
  67. ['locatoin'] = 'location',
  68. ['mois'] = 'month', -- French
  69. ['month'] = 'date', -- remove after 2016-01-01
  70. -- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
  71. ['nespaper'] = 'newspaper',
  72. ['newpaper'] = 'newspaper',
  73. ['news'] = 'newspaper',
  74. ['nom'] = 'last', -- French
  75. ['nom1'] = 'last1', -- French
  76. ['nombre'] = 'first', -- Spanish, Italian
  77. ['obra'] = 'work', -- Spanish, Italian
  78. ['origdate'] = 'orig-year',
  79. ['other'] = 'others',
  80. ['pagees'] = 'pages',
  81. ['página'] = 'page', -- Spanish, Italian
  82. ['páginas'] = 'pages', -- Spanish, Italian
  83. ['passage'] = 'pages', -- French
  84. ['périodique'] = 'publisher', -- French
  85. ['plublisher'] = 'publisher',
  86. ['pmcid'] = 'pmc',
  87. ['prénom'] = 'first', -- French
  88. ['prénom1'] = 'first1', -- French
  89. ['ps'] = 'postscript',
  90. ['pub'] = 'publisher',
  91. -- ['pubisher'] = 'publisher',
  92. -- ['publiser'] = 'publisher',
  93. -- ['publishers'] = 'publisher',
  94. -- ['publsher'] = 'publisher',
  95. -- ['publsiher'] = 'publisher',
  96. ['pulbication-place'] = 'publication-place',
  97. -- ['pulbisher'] = 'publisher',
  98. -- ['pulisher'] = 'publisher',
  99. ['retrieved'] = 'access-date',
  100. ['separator'] = 'mode', -- remove after 2016-01-01
  101. ['série'] = 'work', -- French
  102. ['service'] = 'agency',
  103. ['suscripción'] = 'subscription', -- Spanish, Italian
  104. ['tile'] = 'title',
  105. ['tite'] = 'title',
  106. ['titolo'] = 'title', -- Spanish, Italian
  107. ['titre'] = 'title', -- French
  108. ['título'] = 'title', -- Spanish, Italian
  109. ['transchapter'] = 'trans-chapter',
  110. ['translator'] = 'others',
  111. ['transtitle'] = 'trans-title',
  112. ['ubicación'] = 'location', -- Spanish, Italian
  113. ['urlarchivo'] = 'archive-url', -- Spanish, Italian
  114. ['vol'] = 'volume',
  115. }
  116. --[[--------------------------< P A T T E R N S >--------------------------------------------------------------
  117. Here we use Lua patterns to make suggestions. The form is ['pattern'] = 'correct',
  118. Lua patterns are not regex though they are similar. The escape character is '%', not '\'. For more information about
  119. lua patterns, see: Extension:Scribunto/Lua_reference_manual#Patterns
  120. Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial match from incorrectly
  121. suggesting the wrong parameter name. For instance, the pattern 'a[utho]+r' matches 'author' in the no-longer-supported
  122. parameter |author-separator= so the code suggests '|author='; the same pattern also matches the no-longer-supported
  123. parameter |separator= (returning 'ator') so again, the code suggests '|author='.
  124. One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.) The value from the
  125. capture replaces $1 in the 'correct' value.
  126. ]]
  127. local patterns = {
  128. ['^ac+es+ ?d?a?t?e?$'] = 'access-date',
  129. ['^a[utho]+r$'] = 'author',
  130. ['^a[utho]+r(%d+)$'] = 'author$1', -- enumerated
  131. ['^pu[blish]+ers?$'] = 'publisher',
  132. }
  133. return {suggestions = suggestions, patterns=patterns};