模组:Scripts/data/doc
< Module:Scripts | data
这是Module:Scripts/data的文档页面
该模块包含Wiktionary上所有文字代码的定义和元数据。有关更多信息,请参见en:Wiktionary:Scripts。
此模块不得使用require
导入。正确的导入方式如下:
local m_scripts = mw.loadData("Module:scripts")
这样可以确保每个页面仅加载一次数据,而不是像通常那样为每个模块调用加载一次。
要从模板访问此数据,请使用Module:script utilities。
必需值
编辑表中的每个段落(entry)必须包含以下属性:
canonicalName
- 文字的“规范”(canonical)名称,即维基词典条目和类分类名称中所使用的名称。
可选值
编辑otherNames
- 此文字除了规范名称以外的其他名称。
characters
- A Lua character class that matches on any character that belongs to this script. The character classes are the same as those in Lua search/replace patterns, but without the surrounding
[ ]
(these are implicitly added). They also resemble those found in regular expressions. - In its simplest form, the character class can just be a list of all the characters in the script (Example:
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
). But it's easier to describe using character ranges, especially when the script contains many dozens or even hundreds of different characters. Character ranges are given with only the first and last character, and separated by a hyphen-
. The set then implicitly includes all characters whose Unicode codepoints are in between the two given characters (Example:"A-Za-z"
). character_category
- Used by Module:character info. If
false
, prevents{{character info/new}}
from adding acharacters
category, such as Category:Latin script characters. systems
- The categories of writing system to which the script belongs. See Module:writing_systems/data for a list of supported values. At the moment, this is only used by Module:category tree/scriptcatboiler. The system will only be displayed if there is only one category. See Category:拉丁文字 for an example.