Anonymous user
Module:Lang: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 142:
local title;
local tout = {};
local title_table = mw.loadData ('Module:Lang/data').translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards
table.insert (tout, "''<span title=\"");
Line 150:
table.insert (tout, ' transliteration');
elseif is_set (std) and is_set (script) then -- when both are specified
if title_table
table.insert (tout, title_table
else
return ''; -- one or both invalid, set up for an error message
end
elseif is_set (std) then -- script not set, use language code
if not title_table
if title_table
table.insert (tout, title_table
else -- code doesn't match
table.insert (tout, title_table
end
else -- here if script set but std not set
if title_table['NO_STD']
table.insert (tout, title_table['NO_STD']
elseif title_table['NO_STD']
table.insert (tout, title_table['NO_STD']
else
table.insert (tout, language_name); -- write a generic tool tip
Line 286:
table.insert (out, translit);
else
table.insert (out, '<span style="font-size:100%" class="error">error: invalid translit std or script</span>');
end
end
|