local labels = {}
labels["ROOT"] = {
description = [=[<div style="clear: right; border: solid #aaa 1px; margin: 1 1 1 1; background: #f9f9f9; width: 250px; padding: 5px; text-align: left; float: right">
<div style="text-align: center; margin-bottom: 10px; margin-top: 5px">'''{{{sccat}}}'''</div>
{| style="font-size: 90%; background: #f9f9f9"
| style="vertical-align: middle; height: 35px;" | [[File:Wikipedia-logo.png|35px|none|Wikipedia]] || 維基百科上有關{{{scprosename}}}的條目
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[w:{{{Wikipedia}}}|{{{Wikipedia}}}]]'''
|-
| style="vertical-align: middle; height: 35px;" | [[File:Crystal kfind.png|35px|none|Considerations]] || {{{sccat}}}的相關信息
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[Wiktionary:{{{sccat}}}]]'''
|-
| style="vertical-align: Middle; height: 35px;" | [[File:Abc box.svg|35px|none|Code]] || {{{sccat}}}代码
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''{{{code}}}'''
|}
</div>
可在[[Appendix:{{{sccat}}}]]找到{{{scprosename}}}的相关信息。
在维基词典中,{{{scprosename}}}用[[Wiktionary:文字|代码]]{{{codes}}}来表示。]=],
parents = {{name = "Category:所有文字", sort = "{{{scname}}}"}},
}
labels["字元"] = {
description = "All characters from {{{sccat}}}, and their possible variations, such as versions with diacritics and combinations recognized as single characters in any language.",
parents = {"ROOT"},
}
labels["附錄"] = {
description = "Appendices about {{{scprosename}}}.",
parents = {"ROOT"},
}
labels["characters by language"] = {
description = "{{{sccat}}} characters categorized by language.",
parents = {"ROOT"},
}
labels["語言"] = {
description = "使用{{{scprosename}}}的語言。",
fundamental = "所有語言",
parents = {"ROOT", "Category:各文字語言"},
}
labels["各文字語言"] = {
description = "各種語言依其文字系統分類。",
fundamental = "所有語言",
parents = {{ name = "所有文字", sort = " " }},
}
labels["模板"] = {
description = "Templates with predefined contents for {{{scprosename}}}.",
parents = {"ROOT"},
}
labels["模組"] = {
description = "Modules with scripts for {{{scprosename}}}.",
parents = {"ROOT"},
}
labels["模塊"] = labels["模組"]
labels["所有文字"] = {
description = [=[This category contains the categories for every script (writing system) on Wiktionary.
See [[Wiktionary:List of scripts]] for a full list.]=],
}
-- Types of writing systems listed in [[Module:writing systems/data]].
labels["Scripts by type"] = {
description = "Scripts classified by how they represent words.",
parents = {{ name = "所有文字", sort = " " }},
}
labels["Alphabetic writing systems"] = {
description = "Scripts whose symbols represent individual speech sounds.",
parents = {"Scripts by type"},
}
labels["Abjads"] = {
description = "Scripts whose basic symbols represent consonants. Some of these are impure abjads, which have letters for some vowels.",
parents = {"Scripts by type"},
}
labels["Abugidas"] = {
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part similar in form.",
parents = {"Scripts by type"},
}
labels["Logographic writing systems"] = {
description = "Scripts whose symbols represent individual words.",
parents = {"Scripts by type"},
}
labels["Pictographic writing systems"] = {
description = "Scripts whose symbols represent individual words by using symbols that resemble the physical objects to which those words refer.",
parents = {"Scripts by type"},
}
labels["Syllabaries"] = {
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part different in form.",
parents = {"Scripts by type"},
}
for key, data in pairs(labels) do
if data.parents then
for _, parent in ipairs(data.parents) do
if type(parent) == "table" then
if not parent.name:find("^Category:") then
if labels[parent.name].children then
table.insert(labels[parent.name].children, {name = key, sort = parent.sort})
else
labels[parent.name].children = {{name = key, sort = parent.sort}}
end
end
else
if not parent:find("^Category:") then
if labels[parent].children then
table.insert(labels[parent].children, key)
else
labels[parent].children = {key}
end
end
end
end
end
end
return labels