Module:Lang/data/iana languages/make: Difference between revisions

Content deleted Content added
+iso 639-1;
No edit summary
Line 226:
for script, code_tbl in pairs (suppress_table) do
local LIMIT = 11; -- max number of subtags on a line before a line break
table.insert (pretty_suppressed,
local fragment_tbl = {}; -- groups of LIMIT number of subtags collected here
table.concat ({'[\"', script, '\"] = {', table.concat (code_tbl, ', '), '}'})
for i=1, #code_tbl, LIMIT do
local stop = ((i+LIMIT-1) > #code_tbl) and #code_tbl or i+LIMIT-1; -- calculate a table.concat stop position
table.insert (fragment_tbl, table.concat (code_tbl, ', ', i, stop)); -- get the fragment and save it
end
table.insert (pretty_suppressed, -- and make all pretty
table.concat ({'[\"', script, '\"] = {', table.concat (code_tblfragment_tbl, ', \n\t\t\t\t'), '}'})
);
end
table.sort (pretty_suppressed);
 
------------------------------< I S O 6 3 9 - 1 >------------------------------------------------------------
-- make prettyfinal output pretty
return '<br /><pre>------------------------------< I A N A L A N G U A G E S >--------------------------------------------------<br />--' ..
file_date .. "<br />return {<br />&#9;" .. table.concat (lang_table, ',<br />&#9;') .. "<br />&#9;}<br /><br />" ..