Modul:Multilingual: Unterschied zwischen den Versionen
2017-11-24
w>PerfektesChaos (2016-11-29) |
w>PerfektesChaos (2017-11-24) |
||
| Zeile 1: | Zeile 1: | ||
local Multilingual = { suite = "Multilingual", | local Multilingual = { suite = "Multilingual", | ||
serial = " | serial = "2017-11-24" } | ||
| Zeile 501: | Zeile 501: | ||
-- Precondition: | -- Precondition: | ||
-- ask -- language name | -- ask -- language name | ||
-- Postcondition: | |||
-- Returns boolean | |||
local cnf = fetch( "Multilingual/config", true ) | local cnf = fetch( "Multilingual/config", true ) | ||
local r = true | local r = true | ||
if cnf | if cnf then | ||
local s = string.format( " %s ", ask:lower() ) | local s = string.format( " %s ", ask:lower() ) | ||
if cnf.stopMinusculization:find( s, 1, true ) then | if type( cnf.stopMinusculization ) == "string" | ||
and cnf.stopMinusculization:find( s, 1, true ) then | |||
r = false | r = false | ||
end | |||
if r and type( cnf.seekMinusculization ) == "string" | |||
and cnf.seekMinusculization:find( s, 1, true ) | |||
and type( cnf.scanMinusculization ) == "string" then | |||
local scan = ask:gsub( "[%(%)]", " " ) .. " " | |||
if not cnf.scanMinusculization:find( scan ) then | |||
r = false | |||
end | |||
end | end | ||
end | end | ||
| Zeile 636: | Zeile 647: | ||
-- scream -- category title in case of error | -- scream -- category title in case of error | ||
-- split -- split pattern, if list expected | -- split -- split pattern, if list expected | ||
-- separator -- list separator, else | -- separator -- list separator, else split | ||
-- start -- prepend first element, if any | -- start -- prepend first element, if any | ||
local r | local r | ||