Modul:Vorlage:LuaModuleDoc: Unterschied zwischen den Versionen

(update)
(+ subTest I18N)
Zeile 1: Zeile 1:
--[=[ 2013-05-19
--[=[ 2013-05-29
Support {{LuaModuleDoc}}
Support {{LuaModuleDoc}}
* nav()
* nav()
Zeile 23: Zeile 23:
     -- Uses:
     -- Uses:
     --    mw.title.makeTitle()
     --    mw.title.makeTitle()
     local n = nsDocs
     local n   = nsDocs
     local r = false
     local r   = false
     local s = start .. "/" .. script .. "/Test"
    local sub = "/" .. LuaWiki.getArg( "subTest", "Test" )
     local t = mw.title.makeTitle( n, s )
     local s   = start .. "/" .. script .. sub
     local t   = mw.title.makeTitle( n, s )
     if not t.exists then
     if not t.exists then
         s = start .. "/" .. script .. "/test"
         local low    = false
        t = mw.title.makeTitle( n, s )
        local subLow = mw.ustring.lower( sub )
         if not t.exists then
        if subLow ~= sub then
            s   = start .. "/" .. script .. subLow
            t   = mw.title.makeTitle( n, s )
            low = t.exists
        end
         if not low then
             n = mw.site.namespaces.Module.id
             n = mw.site.namespaces.Module.id
             s = script .. "/Test"
             s = script .. "/" .. sub
             t = mw.title.makeTitle( n, s )
             t = mw.title.makeTitle( n, s )
             if not t.exists then
             if not t.exists and  subLow ~= sub then
                 s = script .. "/test"
                 s = script .. subLow
                 t = mw.title.makeTitle( n, s )
                 t = mw.title.makeTitle( n, s )
                 t = t.exists
                 t = t.exists
Zeile 337: Zeile 343:
     local r
     local r
     if type( LuaWiki ) == "table" then
     if type( LuaWiki ) == "table" then
        local lucky
         lucky, r = pcall( navigation )
         lucky, r = pcall( navigation )
         r = r or ""
         r = r or ""