跳转到内容
打开/关闭搜索
搜索
打开/关闭菜单
397
文件
1978
用户
1.2万
编辑
Gal中文百科
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
在其他项目中
打开/关闭外观设置菜单
无法加载偏好设置。请检查您的网络连接并重试。
重试
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
讨论
贡献
创建账号
登录
编辑“︁
Module
:
Vgn
”︁
来自Gal中文百科
查看
阅读
编辑源代码
查看历史
associated-pages
模块
讨论
更多操作
更多
工具
链入页面
相关更改
页面信息
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
require("strict") local getArgs = require("Module:Arguments").getArgs local list = require("Module:List").unbulleted local conv = require("Module:WikitextLC").converted local region_labels = { ww = "全球", hans = "简体中文", hant = "繁体中文", cn = "中国大陆", hk = "香港", mo = "澳门", my = "马来西亚", sg = "新加坡", tw = "台湾", } local function nocc(text) return conv(text, {"zh", "zh-hans", "zh-hant"}) end local function build_regions_label(region_codes_str) if region_codes_str == nil then return nil end local region_names = {} local region_codes = mw.text.split(region_codes_str, ",", false) for _, code in ipairs(region_codes) do code = mw.ustring.lower(mw.text.trim(code)) local label = region_labels[code] if label then table.insert(region_names, label) end end if #region_names == 0 then return nil end return "<small>(" .. table.concat(region_names, "、") .. ")</small>" end local function build_item(text) local _, _, code, name = mw.ustring.find(text, "^%s-([^:]+)%s-:%s-(.+)%s-$") local label = build_regions_label(code) if label == nil then return nocc(text) end return nocc(name) .. label end local function main(args) local list_items = {} for _, v in ipairs(args) do table.insert(list_items, build_item(v)) end return list(list_items) end local p = {} local function makeInvokeFunc(funcName) return function(frame) local args = getArgs(frame) return p[funcName](args) end end p.main = makeInvokeFunc("_main") function p._main(args) return main(args) end return p
摘要:
请注意,所有对Gal中文百科的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Gal中文百科:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
此页面嵌入的页面:
Module:Vgn/doc
(
编辑
)
编辑“︁
Module
:
Vgn
”︁
来自Gal中文百科