Module:Fallback: Difference between revisions

Content added Content deleted
mNo edit summary
mNo edit summary
Line 32: Line 32:
-- Get the list of acceptable language (lang + those in lang's fallback chain) and check their content.
-- Get the list of acceptable language (lang + those in lang's fallback chain) and check their content.
for _, code in ipairs(p.fblist(lang)) do
for _, code in ipairs(p.fblist(lang)) do
local msg = args[code]
local msg = tostring(args[code])
if msg then
if msg then
-- Trim the assigned message value before testing it.
-- Trim the assigned message value before testing it.
msg = mw.ustring:gsub(msg, '^%s*(.-)%s*$')
msg = mw.ustring.gsub(msg, '^%s*(.-)%s*$')
if msg ~= '' then
if msg ~= '' then
if code == 'message' then
if code == 'message' then