Modul:Temp: Porovnání verzí

Smazaný obsah Přidaný obsah
optimalizace kódu
+ monitoring jazykových kódů a shody parametru s názvem stránky
Řádek 166:
local fileName
local fileExtension
local lang
local country
local entry
local value
local parentheses
Řádek 172 ⟶ 175:
if file ~= "" then
fileName, fileExtension = mw.ustringstring.match( file, "^(.+)%.([^%.]+)$" )
if fileExtensionfileName then
lang, country, entry = string.match( fileName, "^(%a%a%a?)%-(%a%a)%-(.+)$" )
if not lang then
lang, entry = string.match( fileName, "^(%a%a%a?)%-(.+)$" )
end
if entry == title then
equalityType = "≡"
elseif mw.ustring.lower( entry ) == mw.ustring.lower( title ) then
equalityType = "≋"
else
equalityType = "≢"
end
output = output .. string.format( "[[Kategorie:Monitoring:Audio/1/*.%s]]", fileExtension )
output = output .. string.format( "[[Kategorie:Monitoring:Audio/1/%s]]", lang .. ( country and ( "-" .. country ) or "" ) )
output = output .. string.format( "[[Kategorie:Monitoring:Audio/1/%s]]", equalityType )
if equalityType == "≢" then
output = output .. string.format( "[[Kategorie:Monitoring:Audio/1/≢ */%s]]", entry )
end
else
output = output .. string.format( "[[Kategorie:Monitoring:Audio/1/?/%s]]", file )
end
else
output = output .. "[[Kategorie:Monitoring:Audio/1/]]"
end