模組:Scripts/data/doc

此頁面為 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 a characters 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.