剖腹产吃什么下奶最快| 王八是什么字| 重庆什么时候解放的| 脉搏跳得快是什么原因| 做梦梦见蜘蛛是什么意思| 乳腺瘤不能吃什么| 省人大代表是什么级别| 胃疼可以吃什么| 什么病会引起背部疼痛| 张牙舞爪是什么生肖| 梦见小老鼠是什么征兆| 高血脂挂什么科| 颈椎增生吃什么药| 法图麦是什么意思| 艺高人胆大什么意思| 带状疱疹一般长在什么地方| 大脑供血不足是什么原因引起的| 神经疼痛吃什么药| 头三个月保胎喝什么汤| 吃榴莲不能和什么一起吃| 月老叫什么名字| 血镁偏高是什么原因| 壁虎的尾巴有什么作用| 谋划是什么意思| 什么鱼最好吃| 小布丁是什么意思| 糖皮质激素是什么药| 做b超可以检查出什么| 手抽筋是什么原因| 蚂蚁最怕什么东西| 血常规用什么颜色的试管| 形单影只什么意思| 89年的属什么| 情人果是什么| 铁树是什么生肖| 做什么生意挣钱| vaude是什么品牌| 舌苔是什么东西| 增大淋巴结是什么意思| 低密度脂蛋白高的原因是什么| daddy什么意思| 舌裂纹吃什么可以恢复| 拉条子是什么意思| 五月初是什么星座| 6月20日是什么星座| 切除子宫对身体有什么伤害| 朝鲜韩国什么时候分开的| 什么床最环保没甲醛| 紫苏有什么作用与功效| 膈应是什么意思| 属猴的守护神是什么菩萨| ad医学上是什么意思| 杨梅用什么酒泡最好| 类风湿有什么特效药| 慢性子宫颈炎是什么意思| 脚上长水泡是什么原因| 军训是什么时候开始的| 右侧中耳乳突炎是什么意思| 阴虱用什么药可以根除| 王火火念什么| 前列腺增生吃什么食物好| 卅什么意思| 为什么容易中暑| gmail是什么邮箱| 庶母是什么意思| 什么药可以减肥瘦身| 牙周炎吃什么药最好| 女人梦见狗是什么预兆| 浸猪笼是什么意思| 紫阳茶属于什么茶| ns是什么单位| 中度贫血吃什么补血最快| 辣木籽有什么功效| 脱脂牛奶是什么意思| 异淋是什么意思| 突然戒烟对身体有什么影响| 过期的啤酒能干什么| 栀子泡水喝有什么好处| 梦见大蟒蛇是什么征兆| 蜜月是什么意思| 为什么会打雷闪电| 夜叉是什么意思| 棉纱是什么面料| 3.25是什么星座| 吃什么可以补胶原蛋白| 溺水是什么感觉| queen是什么意思| 钥匙像什么| 济公是什么罗汉| 柴米油盐什么意思| 为什么会有耳石症| 发烧吃什么水果| 急性盆腔炎有什么症状表现呢| 广西属于什么气候| 什么是高脂血症| 泡蛇酒用什么药材最好| 血细胞分析五分类是查什么的| 妄想症有什么症状| 甲状腺腺体回声欠均匀是什么意思| 开颅手术有什么后遗症| 总警司相当于大陆什么官| 文房四宝指什么| 蜂窝织炎是什么病| 天外飞仙是什么意思| 为什么海螺里有大海的声音| 蚂蚁爱吃什么东西| 自私是什么意思| 什么生火| 上皮内低度病变是什么意思| 冰冻三尺的下一句是什么| 肺结节吃什么中成药| 嗜睡是什么病的前兆| 腿上无缘无故出现淤青是什么原因| 假卵是什么样子的| 心脏怕什么| 被动什么意思| 一字千金是什么生肖| 属猪的守护神是什么菩萨| 痔疮是什么样子的图片大全| 什么样的星星| 怀孕了用排卵试纸测会显示什么| 梦见洗头是什么预兆| braun是什么品牌| 阴唇为什么一个大一个小| 穷是什么意思| 糖醋里脊是什么肉做的| 心脏彩超能检查出什么| 囊性灶什么意思严重吗| 节肢动物用什么呼吸| 西洋参吃多了有什么副作用| 叶酸偏高有什么影响| 氯雷他定片治什么病| haccp认证是什么意思| 35年属什么生肖| 尿管型偏高是什么原因| 姓彭的女孩子取什么名字好| 粘纤是什么材质| 沉的右边念什么| 滚刀什么意思| 忠诚的近义词是什么| 矿泉水敷脸有什么作用| 反物质是什么| 5月份什么星座| 电解质氯高是什么原因| 胃疼可以吃什么| 深海鱼油什么牌子好| 南辕北辙告诉我们什么道理| 什么东西软化鱼刺最快| 魏大勋和李沁什么关系| 霉菌性阴道炎什么症状| 中国地图像什么| 车前草是什么| 迪卡侬属于什么档次| 希五行属什么| 蛔虫和蛲虫有什么区别| 黄芪煲汤和什么搭配| 一般什么人会有美人尖| 尿常规红细胞高是什么原因| 腿部发痒是什么原因引起的| 阴历六月是什么月| 慢性胃炎吃什么中成药| 梦见自己坐车是什么意思| 痔疮吃什么药好得快| 淋巴炎吃什么药效果好| 老年人总睡觉是什么原因| 你的书包里有什么英文| 孽债是什么意思| 乙肝小三阳是什么意思| 一醉方休什么意思| 扭捏是什么意思| 记者学什么专业| 枸杞有什么用| 牙疼吃什么食物好得快| 什么是对比色| 经警是做什么的| 为什么没人敢动景甜| 颈椎病用什么药膏| 宝宝拉水便是什么原因| 结肠炎吃什么药好| 月经失调是什么原因引起的| 病毒性感冒咳嗽吃什么药效果好| 童子尿能治什么病| 吃什么能缓解便秘| 崩溃什么意思| 扁平苔藓是什么原因引起的| crl是什么意思| 丁是什么意思| 耳鸣是什么病的前兆| 国资委主任是什么级别| 脾虚吃什么| 爱的真正含义是什么| 氟是什么东西| 艾灸为什么不能天天灸| 3个火读什么| 不是月经期出血是什么原因| 黄色有什么黄| 黑玫瑰代表什么意思| 抗甲状腺球蛋白抗体高是什么原因| 标准的青色是什么颜色| hpv11阳性是什么意思| 挽留是什么意思| 热伤风吃什么药好得快| 水代表什么生肖| 嗓子疼喝什么饮料| 白手起家是什么意思| 平板撑有什么作用| 验孕棒什么时候测最准确| 凌晨2点是什么时辰| 雕琢是什么意思| o型b型生的孩子是什么血型| 什么情况下月经推迟| 氯中毒吃什么可以解毒| 没经验的人开什么店好| 口腔出血是什么原因| 早上起床咳嗽是什么原因| 糖筛和糖耐有什么区别| 恶露是什么颜色的| 皮肤为什么会痒| 萝莉控是什么意思| 非食健字是什么意思| 骨折恢复期吃什么好| 小孩脸上长痣是什么原因引起的| 痞块是什么意思| 头皮痛是什么原因| 出阁宴是什么意思| 弢是什么意思| 医生为什么喜欢开地塞米松| 吃生蚝补什么| 血小板少是什么病| 为什么老流鼻血| 鹿角粉有什么功效和作用| 什么如泰山| mixblu是什么牌子| 胃疼可以吃什么| 吃芒果有什么坏处| 什么如既往| 什么祛斑产品效果好| 总是打嗝是什么原因引起的| 梦见栽树是什么意思| c919是什么意思| 随心所欲的欲什么意思| 冬天送什么礼物| 火把节是什么节日| 什么叫介入治疗| 为什么我| 二月九号是什么星座| hpv16是什么意思| 营卫是什么意思| lancome是什么牌子的| 囟门凹陷是什么原因| 女人月经总是提前是什么原因| 8月26是什么星座| 穿什么衣服显白| 婴儿胎发什么时候剪最好| 什么头什么尾| 口业是什么意思| 胆管炎吃什么药| 男性内分泌失调吃什么药| 夜尿次数多是什么原因| 局灶肠化是什么意思| 3m是什么意思| 达克宁栓治疗什么妇科病| 爱无能是什么意思| 黄帝叫什么名字| 百度Zum Inhalt springen

三月寻春 油菜花开

aus Wikipedia, der freien Enzyklop?die
Vorlagen-
programmierung
Diskussionen Lua Unterseiten
Modul Deutsch English 百度 除了聆听过去,我们还需要直面当下,追问未来。

Esperanto Dolnoserbski Hornjoserbsce Modul: WP:Lua

Diese Seite enth?lt Code in der Programmiersprache Lua. Einbindungszahl Cirrus

Dies ist die (produktive) Mutterversion eines global benutzten Lua-Moduls.
Wenn die serial-Information nicht übereinstimmt, müsste eine Kopie hiervon in das lokale Wiki geschrieben werden.
Versionsbezeichnung auf WikiData: 2025-08-07

local LuaModuleDoc = { suite  = "LuaModuleDoc",
                       serial = "2025-08-07",
                       item   = 12981914,
                       frame  = false,
                       ns     = -9999,
                                -- current namespace number
                       nsDocs = -99999,
                                -- central documentation namespace number
                       title  = false,
                                -- current page Title object
                       transl = false }
--[=[
Support {{LuaModuleDoc}}
* nav()
* failsafe()
]=]

local Failsafe = LuaModuleDoc



local function fetch( arg, assign )
    -- Retrieve template argument
    -- Precondition:
    --     arg     -- string or number; argument identifier
    --     assign  -- any, optional; default value
    -- Uses:
    --     >  LuaModuleDoc.frame
    local r = LuaModuleDoc.frame.args[ arg ]
    if type( r ) ~= "string" then
        if assign == nil then
            r = "{{{<" .. arg .. ">}}}"
        else
            r = assign
        end
    end
    return r
end -- fetch()



local function catIfDefined( slot )
    -- Categorize if category defined
    --     slot  -- string; Config entry
    -- Return:
    --     string or false:  categorization, if any
    -- Uses:
    --     mw.title.makeTitle()
    local s = fetch( slot, "" )
    local r
    if #s > 0 then
        local t = mw.title.makeTitle( "Category", s )
        if t.exists then
            r = string.format( "[[%s]]", t.prefixedText )
        end
    end
    return r
end -- catIfDefined()



local function createPage( swift, sub, start, ns, script )
    -- Create button for page creation
    --     swift   -- string;
    --                "NoPageCentral", "NoTalkCentral", "NoTalkRedir"
    --     sub     -- string; page name to be created
    --     start   -- string; defined pageDocRoot argument
    --     ns      -- number; namespace
    --     script  -- string; module name (main)
    -- Return:
    --     string
    -- Uses:
    --     >  LuaModuleDoc.frame
    --     fetch()
    -- MediaWiki:Move-leave-redirect   Weiterleitung erstellen
    -- MediaWiki:autosumm-new          Seite wurde neu angelegt: ?$1“
    local setup = "preload" .. swift:sub( 7 )
    local r
    setup = fetch( setup )
    if setup then
        local create = { action  = "edit",
                         preload = setup,
                         redlink = "1" }
        local button, path, show, story, summary
        if swift == "NoTalkRedir" then
            show    = "move-leave-redirect"
            story   = string.format( "%s/%s", start, script )
            story   = mw.title.makeTitle( ns, story ).prefixedText
            story   = string.format( "[[%s]]", story )
            summary = "#redirect " .. story
        else
            local s = fetch( "langsRequest", false )
            show    = "recreate"
            if s then
                s = mw.text.trim( s )
                if s ~= "" then
                    s = "|" .. s
                end
            end
            story = ( s or "" )
            summary = "{{LuaModuleDoc}}"
        end
    --  summary = mw.message.new( "autosumm-new" ):params( summary )
        create.summary      = summary
        create.preloadtitle = summary
        if story then
            create[ "preloadparams[]" ] = story
        end
        path   = { sub,  mw.uri.buildQueryString( create ) }
        r      = LuaModuleDoc.frame:callParserFunction( "canonicalurl",
                                                        path )
        show   = mw.message.new( show ):plain()
        button = mw.title.makeTitle( mw.site.namespaces.Template.id,
                                     "MediaWiki-Button" )
        if button.exists then
            button = { template = button.text,
                       Typ      = "progressive",
                       ["Gro?"] = "1",
                       Link     = r,
                       Text     = show }
            r      = LuaModuleDoc.frame:expandTemplate{
                                                 title = button.template,
                                                 args  = button }
        else
            r = string.format( "<br>[%s '''%s''']", r, show )
        end
    end
    return r or ""
end -- createPage()



local function globalRepos( script )
    -- Check for global dissemination
    --     script  -- string; module name (main)
    -- Uses:
    --     >  LuaModuleDoc.title
    --     >  LuaModuleDoc.frame
    --     fetch()
    --     mw.wikibase.getEntity()
    --     mw.title.makeTitle()
    -- Return:
    --     string
    local entity = mw.wikibase.getEntity()
    local r
    if type( entity ) == "table" then
        local mode = 0
        local repo = entity:formatPropertyValues( "P1324" )
        local params, s
        if type( repo ) == "table"  and
           type( repo.value ) == "string"  and
           repo.value:find( "//" ) then
            local t = mw.text.split( repo.value, ",%s+" )
            if #t > 1 then
                for i = 1, #t do
                    if t[ i ]:find( mw.site.server, 1, true ) then
                        s = t[ i ]
                        break -- for i
                    end
                end -- for i
                if not s then
                    s = t[ 1 ]
                end
            else
                s = repo.value
            end
            repo = mw.uri.new( s )
            if type( repo.path ) == "string"  and
               repo.path:match( "^/wiki/" ) then
                local space
                space, s = repo.path:sub( 7 ):match( "^([^:]+):(.+)$" )
                if space and
                   mw.site.namespaces[ space ] then
                    if s:find( "%%%x%x" ) then
                        s = mw.uri.decode( s )
                    end
                    t = mw.title.makeTitle( space, s )
                    s = "//" .. repo.host
                    if t  and
                       mw.title.equals( LuaModuleDoc.title, t )  and
                       mw.site.server:find( s, 1, true ) then
                        mode = 2
                    else
                        mode = 1
                    end
                end
            end
            s = fetch( "templateGlobal", "" )
            if #s > 0 then
                local l, bib = pcall( require,
                                      LuaModuleDoc.title.prefixedText )
                local vsn = entity:formatPropertyValues( "P348" )
                params = { }
                if mode < 2 then
                    params[ 1 ] = string.format( "[%s %s]",
                                                 tostring( repo ),
                                                 repo.host )
                end
                if type( vsn ) == "table"  and
                   type( vsn.value) == "string" and
                   vsn.value ~= "" then
                    params.version = vsn.value
                end
                if type( bib ) == "table" then
                    local serial
                    if bib.failsafe then
                        if type( bib.failsafe ) == "function" then
                            serial = bib.failsafe( { args = { } } )
                        else
                            serial = bib.failsafe
                        end
                    elseif bib[ "#serial"] then
                        serial = bib[ "#serial"]
                    end
                    if type( serial ) == "number" then
                        serial = string.format( "%d", serial )
                    end
                    if type( serial ) == "string" then
                        params.here = serial
                    end
                end
                if fetch( "forkedGlobal", "0" ) ~= "1"  and
                   params.version  and  params.here  and
                   params.version ~= params.here then
                    params.update = "1"
                end
                r = LuaModuleDoc.frame:expandTemplate{ title=s,
                                                       args=params }
            end
        end
        s = fetch( "categoryWikiData", "" )
        if #s > 0 then
            local slot
            if mode > 0 then
                if mode == 2 then
                    slot = catIfDefined( "categoryWikiDataParent" )
                else
                    slot = catIfDefined( "categoryWikiDataChild" )
                end
            end
            if not slot then
                slot = catIfDefined( s )
            end
            if slot then
                if r then
                    r = r .. slot
                else
                    r = slot
                end
                if params and params.update then
                    slot = catIfDefined( "categoryWikiDataReplication" )
                    if slot then
                        r = r .. slot
                    end
                end
            end
        end
    end
    return r or ""
end -- globalRepos()



local function navDevelop( start, script )
    -- Most interesting test and development page
    -- Precondition:
    --     start   -- string; central documentation root
    --     script  -- string; basic module name
    -- Return:
    --     string or false:  full page name, if any
    -- Uses:
    --     >  LuaModuleDoc.nsDocs
    --     mw.title.makeTitle()
    local n   = LuaModuleDoc.nsDocs
    local r   = false
    local sub = "/" .. fetch( "subTest", "Test" )
    local s   = string.format( "%s/%s%s", start, script, sub )
    local t   = mw.title.makeTitle( n, s )
    if not t.exists then
        local low    = false
        local subLow = mw.ustring.lower( sub )
        if subLow ~= sub then
            s   = string.format( "%s/%s%s", start, script, subLow )
            t   = mw.title.makeTitle( n, s )
            low = t.exists
        end
        if not low then
            n = mw.site.namespaces.Module.id
            s = string.format( "%s/%s", script, sub )
            t = mw.title.makeTitle( n, s )
            if not t.exists  and  subLow ~= sub then
                s = script .. subLow
                t = mw.title.makeTitle( n, s )
                t = t.exists
            end
        end
    end
    if t then
        r = string.format( "%s:%s",
                           mw.site.namespaces[ n ].name, s )
    end
    return r
end -- navDevelop()



local function navError( say, specific )
    -- Return error message, evaluate page .pageErr
    -- Precondition:
    --     say       -- string; message key
    --     specific  -- string, optional; additional information
    -- Uses:
    --     >  LuaModuleDoc.frame
    --     fetch()
    local show = fetch( "pageErr" )
    local r
    if type( show ) == "string" then
        local pars = { say }
        if type( specific ) == "string" then
            table.insert( pars, specific )
        end
        r = LuaModuleDoc.frame:expandTemplate{ title = show,
                                               args = pars }
    else
        local e = mw.html.create( "span" )
                         :attr( "class", "error" )
                         :wikitext( error( "arg 'pageErr' missing", 3 ) )
        r = tostring( e )
    end
    return r
end -- navError()



local function navLang( suite, collect, lazy )
    -- Append languages from string to collection
    -- Precondition:
    --     suite    -- string; space separated source
    --     collect  -- table; to be extended
    --                 every element: { langCode, lazy }
    --     lazy     -- true if only existing page is to be linked
    if type( suite ) == "string" then
        local raw = mw.text.split( suite, "%s+" )
        local e, i, j, s
        for i = 1, #raw do
            s = raw[ i ]
            if #s > 1 then
                for j = 1, #collect do
                    if s then
                        e = collect[ j ]
                        if e[ 1 ] == s then
                            s = false
                            if not lazy then
                                e[ 2 ] = false
                            end
                        end
                    end
                end -- for j
                if s then
                    table.insert( collect,  { s, lazy } )
                end
            end
        end -- for i
    end
end -- navLang()



local function navLangs( start, script )
    -- Analyze languages
    -- Precondition:
    --     current page is supposed to transclude LuaModuleDoc
    --     start   -- string; central documentation root
    --     script  -- string; basic module name
    -- Postcondition:
    --     LuaModuleDoc.transl is set up as table:
    --                         args for navigation template
    --                         [1] basic module name
    --                         [2] number of language codes  +  1
    --                         [3] first language code
    --                         [4] second language code
    --                         ... list of further language codes
    -- Uses:
    --     >  LuaModuleDoc.nsDocs
    --      < LuaModuleDoc.transl
    --     fetch()
    --     navLang()
    --     mw.title.makeTitle()
    local e, i, s, t
    local specified = fetch( "langsRequest", false )
    local super     = start .. "/" .. script .. "/"
    LuaModuleDoc.transl = { }
    if type( specified ) == "string" then
        if specified:match( "^%s*$" ) then
            specified = false
        end
    end
    navLang( fetch( "langsDefault" ),  LuaModuleDoc.transl,  specified )
    navLang( fetch( "langsMore" ),  LuaModuleDoc.transl,  true  )
    navLang( specified, LuaModuleDoc.transl, false )
    if #LuaModuleDoc.transl < 1 then
        LuaModuleDoc.transl = { { "en", false } }
    end
    for i = #LuaModuleDoc.transl, 1, -1 do
        e = LuaModuleDoc.transl[ i ]
        s = e[ 1 ]
        if e[ 2 ] then
            t = mw.title.makeTitle( LuaModuleDoc.nsDocs,  super .. s )
            if not t.exists then
                s = false
            end
        end
        if s then
            LuaModuleDoc.transl[ i ] = s
        else
            table.remove( LuaModuleDoc.transl, i )
        end
    end -- for i -1
    table.insert( LuaModuleDoc.transl,
                  1,
                  script )
    table.insert( LuaModuleDoc.transl,
                  2,
                  tostring( #LuaModuleDoc.transl ) )
end -- navLangs()



local function navMerge( start, swift, script, sub, lead )
    -- Include various external content into page
    -- Precondition:
    --     start   -- string; defined pageDocRoot argument
    --     swift   -- string; defined pageNav argument
    --     script  -- string; module name (main)
    --     sub     -- string or false; possible sub-module name
    --     lead    -- true: Module: namespace;   false: text namespace
    -- Uses:
    --     >  LuaModuleDoc.transl
    --     >  LuaModuleDoc.ns
    --     >  LuaModuleDoc.nsDocs
    --     >  LuaModuleDoc.title
    --     >  LuaModuleDoc.frame
    --     navError()
    --     mw.title.makeTitle()
    --     createPage()
    --     fetch()
    local server = mw.site.server
    local super  = false
    local t      = navDevelop( start, script )
    local collect, low, r, s
    collect = LuaModuleDoc.transl
    if t then
        collect.Test = t
    end
    if LuaModuleDoc.ns == LuaModuleDoc.nsDocs then
        s = string.format( "%s/%s", start, script )
        if LuaModuleDoc.title.text == s then
            super = LuaModuleDoc.title.text .. "/"
        elseif sub then
            collect.subDoc = sub
            collect.subModule = sub
            s = string.format( "%s/%s/%s", start, script, sub )
            if LuaModuleDoc.title.text == s then
                s = string.format( "%s/%s", s, collect[ 3 ] )
                t = mw.title.makeTitle( LuaModuleDoc.nsDocs, s )
                if t.exists then
                    super = LuaModuleDoc.title.text .. "/"
                end
            end
        end
    elseif lead and sub then
        s = string.format( "%s/%s/%s", start, script, sub )
        t = mw.title.makeTitle( LuaModuleDoc.nsDocs, s )
        if t.exists then
            collect.subDoc = sub
        end
    end
    if server:match( "%.beta%.wmflabs%.org$" ) then
        local slang, series = server:match( "//(%l+)%.(%l+)%." )
        low = true
        if series == "wikipedia" then
            if slang == "de" then
                collect.BETA = "w:de:"   --Talk
            end
        end
    end
    r = LuaModuleDoc.frame:expandTemplate{ title = swift,
                                           args = collect }
    if not low then
        t = LuaModuleDoc.title.talkPageTitle
        if LuaModuleDoc.ns == mw.site.namespaces.Module.id then
            local doc
            s   = string.format( "%s/%s", start, script )
            doc = mw.title.makeTitle( LuaModuleDoc.nsDocs, s )
            if not doc.exists then
                r = r .. createPage( "NoPageCentral",
                                     doc.prefixedText,
                                     start,
                                     LuaModuleDoc.nsDocs,
                                     script )
                t = false
            end
        end
        if t  and  not t.exists then
            if super then
                s = "NoTalkCentral"
            elseif LuaModuleDoc.ns == LuaModuleDoc.nsDocs + 1 then
                s = false
            else
                s = "NoTalkRedir"
            end
            if s then
                r = string.format( "%s%s%s",
                                   r,
                                   navError( s ),
                                   createPage( s,
                                               t.prefixedText,
                                               start,
                                               LuaModuleDoc.nsDocs + 1,
                                               script ) )
            end
        end
    end
    if super then
        local d  = "{{%s*[lL]uaModuleDoc[^}]*}}%s*"
        local p1 = "^%s*" .. d .. "<onlyinclude>"
        local p2 = "%s*<noinclude>" .. d .. "</noinclude>"
        local space, sub, support
        for i = 3, #collect do
            t = mw.title.makeTitle( LuaModuleDoc.nsDocs,
                                    super .. collect[ i ] )
            s = t:getContent()
            if s then
                s = s:gsub( p1, "" ):gsub( p2, "" )
                if s:match( d ) then
                    r = string.format( "%s<br />%s<br />",
                                       r,
                                       navError( "BadInclude",
                                                 t.prefixedText ) )
                else
                    r = r ..
                        LuaModuleDoc.frame:expandTemplate{
                                                 title = t.prefixedText }
                    break    -- for i
                end
            end
        end -- for i
        s = fetch( "pageTemplateInsert", "" )
        space, support = s:match( "^([^:]+):(.+)$" )
        if space  and  mw.title.makeTitle( space, support ).exists then
            local suppress = fetch( "noHint", "" )
            if #suppress == 0 then
                local swift = collect[ 1 ]
                if sub then
                    swift = string.format( "%s/%s", swift, sub )
                end
                r = r ..
                    LuaModuleDoc.frame:expandTemplate{ title = s,
                                                       args = { swift } }
            end
        end
        s = fetch( "categoryDocs", "" )
        if #s > 0 then
            t = mw.title.makeTitle( "Category", s )
            if t.exists then
                r = string.format( "%s[[%s|%s]]",
                                   r, t.prefixedText, collect[ 1 ] )
            end
        end
        r = r .. "__NOEDITSECTION__"
    end
    if lead then
        r = r .. globalRepos( script )
    end
    return r
end -- navMerge()



local function navPage( lead )
    -- Return navigation text; analyze page location
    -- Precondition:
    --     current namespace will support LuaModuleDoc
    --     lead    -- true: Module: namespace;   false: text namespace
    -- Uses:
    --     >  LuaModuleDoc.title
    --     >  LuaModuleDoc.transl
    --     fetch()
    --     navLangs()
    --     navMerge()
    --     navError()
    local r
    local start = fetch( "pageDocRoot" )
    if type( start ) == "string" then
        local s      = "^"
        local script
        if not lead then
            s = "^" .. start .. "/"
        end
        s = s .. "([^/]+)/(.*/?)$"
        script, s = string.match( LuaModuleDoc.title.text .. "/",  s )
        if type( script ) == "string" then
            local sub   = false
            local swift = fetch( "pageNav" )
            navLangs( start, script )
            if type( s ) == "string" then
                if #s > 1 then
                    local q
                    s = s:match( "^([^/]+)/.*/?$" )
                    q = mw.title.makeTitle( "Module",
                                            script .. "/" .. s )
                    if q.exists and q.contentModel == "Scribunto" then
                        sub = s
                        for i = 1, #LuaModuleDoc.transl do
                            if LuaModuleDoc.transl[ i ] == s then
                                sub = false
                                break    -- for i
                            end
                        end -- for i
                    end
                end
            end
            if type( swift ) == "string" then
                r = navMerge( start,
                              swift,
                              script,
                              sub,
                              lead )
            else
                r = navError( "configMissing", "pageNav" )
            end
        else
            r = navError( "BadPage" ) .. LuaModuleDoc.title.text
        end
    else
        r = navError( "configMissing", "pageDocRoot" )
    end
    return r
end -- navPage()



local function navigation()
    -- Start execution; return navigation text; analyze namespace
    -- Uses:
    --      < LuaModuleDoc.title
    --      < LuaModuleDoc.ns
    --      < LuaModuleDoc.nsDocs
    --     fetch()
    --     mw.title.getCurrentTitle()
    --     navPage()
    --     navError()
    local r
    local nsDocs = fetch( "nsDocs" )
    if nsDocs then
        local lead
        LuaModuleDoc.title  = mw.title.getCurrentTitle()
        LuaModuleDoc.ns     = LuaModuleDoc.title.namespace
        lead                = ( LuaModuleDoc.ns ==
                                mw.site.namespaces.Module.id )
        LuaModuleDoc.nsDocs = tonumber( nsDocs )
        if lead  or
           LuaModuleDoc.ns == LuaModuleDoc.nsDocs  or
           LuaModuleDoc.ns == LuaModuleDoc.nsDocs + 1 then
            r = navPage( lead )
        else
            r = navError( "BadNamespace" )
        end
    else
        r = navError( "configMissing", "nsDocs" )
    end
    return  r
end -- navigation()



Failsafe.failsafe = function ( atleast )
    -- Retrieve versioning and check for compliance
    -- Precondition:
    --     atleast  -- string, with required version
    --                         or wikidata|item|~|@ or false
    -- Postcondition:
    --     Returns  string  -- with queried version/item, also if problem
    --              false   -- if appropriate
    -- 2025-08-07
    local since  = atleast
    local last   = ( since == "~" )
    local linked = ( since == "@" )
    local link   = ( since == "item" )
    local r
    if last  or  link  or  linked  or  since == "wikidata" then
        local item = Failsafe.item
        since = false
        if type( item ) == "number"  and  item > 0 then
            local suited = string.format( "Q%d", item )
            if link then
                r = suited
            else
                local entity = mw.wikibase.getEntity( suited )
                if type( entity ) == "table" then
                    local seek = Failsafe.serialProperty or "P348"
                    local vsn  = entity:formatPropertyValues( seek )
                    if type( vsn ) == "table"  and
                       type( vsn.value ) == "string"  and
                       vsn.value ~= "" then
                        if last  and  vsn.value == Failsafe.serial then
                            r = false
                        elseif linked then
                            if mw.title.getCurrentTitle().prefixedText
                               ==  mw.wikibase.getSitelink( suited ) then
                                r = false
                            else
                                r = suited
                            end
                        else
                            r = vsn.value
                        end
                    end
                end
            end
        elseif link then
            r = false
        end
    end
    if type( r ) == "nil" then
        if not since  or  since <= Failsafe.serial then
            r = Failsafe.serial
        else
            r = false
        end
    end
    return r
end -- Failsafe.failsafe()



-- Provide template access
local p = {}

function p.nav( frame )
    -- Uses:
    --      < LuaModuleDoc.frame
    --     navigation()
    local lucky, r
    LuaModuleDoc.frame = frame
    lucky, r = pcall( navigation )
    if not lucky then
        local e = mw.html.create( "span" )
                         :attr( "class", "error" )
                         :wikitext( r )
        r = tostring( e )
    end
    return r or ""
end



p.failsafe = function ( frame )
    -- Check or retrieve version information
    -- Precondition:
    --     frame  -- object; #invoke environment
    -- Postcondition:
    --     Return string with error message or ""
    -- Uses:
    --     LuaModuleDoc.failsafe()
    local s = type( frame )
    local since
    if s == "table" then
        since = frame.args[ 1 ]
    elseif s == "string" then
        since = frame
    end
    if since then
        since = mw.text.trim( since )
        if since == "" then
            since = false
        end
    end
    return Failsafe.failsafe( since )  or  ""
end -- p.failsafe()



setmetatable( p,  { __call = function ( func, ... )
                                 setmetatable( p, nil )
                                 return Failsafe
                             end } )

return p
为什么要做肠镜检查 喷塑工是干什么的 菊花茶泡了为什么会变绿 血糖高了会有什么危害 牙齿酸痛吃什么药
nsa是什么意思 全身发冷是什么原因 海参什么人不能吃 广州有什么玩的 杏花什么颜色
strange是什么意思 睡觉出汗多是什么原因 坦诚相待下一句是什么 睡眠不好用什么药调理 四季春茶属于什么茶
大土土什么字 肺门不大是什么意思 伤官代表什么 下联是什么 sweat是什么意思
二月出生是什么星座hcv8jop0ns1r.cn 脸上有癣用什么药膏好hcv8jop6ns4r.cn 脚酸疼是什么原因引起的吗hcv9jop5ns0r.cn 9月份什么星座hcv9jop5ns1r.cn 什么是幂dajiketang.com
人瘦是什么原因造成的zhiyanzhang.com 虚不受补是什么意思hcv9jop0ns3r.cn 测尿酸挂什么科hcv7jop6ns2r.cn 宫寒是什么hcv9jop1ns4r.cn 什么不动dayuxmw.com
尿频尿急吃什么药hcv7jop9ns2r.cn 西京医院什么科室最强hcv8jop8ns4r.cn 1月14日什么星座hcv8jop9ns2r.cn 为什么尿会很黄hcv9jop5ns5r.cn 果断是什么意思hcv8jop7ns5r.cn
阑尾炎是什么引起的hcv8jop5ns5r.cn 坐月子不能吃什么hcv8jop2ns1r.cn 姜枣茶什么季节喝最好hcv8jop4ns0r.cn 肝胃不和吃什么药hcv7jop6ns1r.cn 熊猫血是什么hcv9jop3ns4r.cn
百度