匿名
未登录
中文(中国大陆)
登录
深色模式
「荏苒之境」
搜索
查看“︁模块:Phrases”︁的源代码
来自「荏苒之境」
命名空间
模块
讨论
更多
更多
页面操作
阅读
查看源代码
历史
清除缓存
←
模块:Phrases
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local translation = require("Module:Template translation") local utils_str = require("Module:Utils/String") local cargo = mw.ext.cargo local escape_sql = utils_str.escape_sql local trim = utils_str.trim local PHRASE_THEMES_TABLE = "PhraseThemes" local phrases = {} phrases.show = function(frame) local args = frame.args local table_name = escape_sql(args.table) local theme_text = args.theme_text if theme_text == "" then theme_text = nil end local parent_frame = frame:getParent() local theme = escape_sql(trim(parent_frame.args[1])) local language = translation.getCurrentLanguageSubpage() if language ~= "zh-cn" then if language == nil or language == "" then language = "zh-cn" end cargo.store(PHRASE_THEMES_TABLE, { PhraseTable = table_name, Theme = theme, Language = language, Translation = theme_text }) for i, phrase in ipairs(parent_frame.args) do if i ~= 1 then cargo.store(table_name, { Language = language, Phrase = escape_sql(trim(phrase)), Theme = theme, Time = os.time() }) end end end local t = {} t[#t+1] = "<ul>" for i, phrase in ipairs(parent_frame.args) do if i ~= 1 then t[#t+1] = "<li>" t[#t+1] = frame:preprocess(phrase) t[#t+1] = "</li>" end end t[#t+1] = "</ul>" return table.concat(t) end return phrases
该页面使用的模板:
模块:Phrases/doc
(
查看源代码
)
返回
模块:Phrases
。
导航
导航
最近更改
随机页面
特殊页面
模板列表
wiki工具
wiki工具
Cargo数据
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志