Modul:Vorlage:LuaModuleDoc: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
+ subTest I18N
wp>PerfektesChaos (update) |
wp>PerfektesChaos (+ subTest I18N) |
||
Zeile 1: | Zeile 1: | ||
--[=[ 2013-05- | --[=[ 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 .. | 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 .. | local low = false | ||
local subLow = mw.ustring.lower( sub ) | |||
if not | 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 .. "/ | 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 .. | 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 "" |