Module:Lang: Difference between revisions

Sur (talk | contribs)
m _search_string now returns label instead of error if not found in english data
Sur (talk | contribs)
m revert previous and instead return label if label is found in english but key does not exist for that lang; Undo revision 10494 by Sur (talk)
Line 117: Line 117:


if (key == nil) then
if (key == nil) then
return label
return string.format("English label '%s' not found", label)
end
end
if (data_lang[key] == nil) then
if (data_lang[key] == nil) then
return string.format("Key '%s' not found in for lang code '%s'", key, lang_code)
return label
end
end