https://archive.guildofarchivists.org/w/api.php?action=feedcontributions&user=76.104.212.162&feedformat=atomGuild of Archivists - User contributions [en]2024-03-19T11:11:01ZUser contributionsMediaWiki 1.33.1https://archive.guildofarchivists.org/w/index.php?title=Reference:The_Rules_of_Gehn&diff=2995Reference:The Rules of Gehn2016-09-12T19:53:54Z<p>76.104.212.162: Created page with "'''The Rules of Gehn''' appear on the classroom chalkboard in Riven. ==Transcription== :{{Parsed D'ni|re-|lesh|-tee|-okh||Gen}} :The Rules of Gehn :{{Parsed D'ni|Gen||ke..."</p>
<hr />
<div>'''The Rules of Gehn''' appear on the classroom chalkboard in [[Riven]].<br />
<br />
==Transcription==<br />
:{{Parsed D'ni|re-|lesh|-tee|-okh||Gen}}<br />
:The Rules of Gehn<br />
<br />
:{{Parsed D'ni|Gen||ken|-en||nahvah|-ot}}<br />
:Gehn is our master<br />
<br />
:{{Parsed D'ni|Gen||ko-|mahrn|-en||set}}<br />
:Gehn created us<br />
<br />
:{{Parsed D'ni|Gen||ko-|dormahdh|-en||Aytruhs}}<br />
:Gehn defeated Atrus<br />
<br />
[[Category:D'ni texts]]</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:R-&diff=2685Dictionary:R-2016-07-24T08:32:41Z<p>76.104.212.162: Created page with "{{Dict Entry D'ni |dnifont=r }} ===Pronunciation=== {{IPA|r}} {{Dict D'ni Prefix}} #A rare variation of {{de|r'-}} ===Related Words=== * {{de|r'-}} * {{de|re}}"</p>
<hr />
<div>{{Dict Entry D'ni<br />
|dnifont=r<br />
}}<br />
<br />
===Pronunciation===<br />
{{IPA|r}} <br />
<br />
{{Dict D'ni Prefix}}<br />
#A rare variation of {{de|r'-}}<br />
<br />
===Related Words===<br />
* {{de|r'-}}<br />
* {{de|re}}</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:R%27-&diff=2684Dictionary:R'-2016-07-24T08:10:34Z<p>76.104.212.162: </p>
<hr />
<div>{{Dict Entry D'ni<br />
|dnifont=r'<br />
}}<br />
<br />
===Pronunciation===<br />
{{IPA|ɾə}} (or /rʔ/ between vowels)<br />
<br />
{{Dict D'ni Prefix}}<br />
#marks the noun to which it is attached as definite<br />
<br />
===Usage Notes===<br />
* ''re-'' is prefixed to words beginning with a consonant. For words beginning with a vowel, ''r'-'' is often used, especially if the word begins with /e/.<br />
* Sometimes, the prefix is realized as simply ''r-''.<br />
<br />
===Related Words===<br />
* {{de|r-}}<br />
* {{de|re}}</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Re&diff=2683Dictionary:Re2016-07-24T07:51:22Z<p>76.104.212.162: Created page with "{{Dict Entry D'ni |dnifont=re }} ===Pronunciation=== {{IPA|ɾɛ}} {{Dict D'ni Particle}} #marks the following noun as definite {{Dict D'ni Prefix}} #marks the noun to which..."</p>
<hr />
<div>{{Dict Entry D'ni<br />
|dnifont=re<br />
}}<br />
<br />
===Pronunciation===<br />
{{IPA|ɾɛ}}<br />
<br />
{{Dict D'ni Particle}}<br />
#marks the following noun as definite<br />
<br />
{{Dict D'ni Prefix}}<br />
#marks the noun to which it is attached as definite<br />
<br />
===Usage Notes===<br />
* While ''re'' can be used as an independent particle, it is most used as a prefix. <br />
* ''re-'' is prefixed to words beginning with a consonant. For words beginning with a vowel, ''r'-'' is often used, especially if the word begins with /e/.<br />
* Sometimes, the prefix is realized as simply ''r-''.<br />
<br />
===Related Words===<br />
* {{de|r-}}<br />
* {{de|r'-}}</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Particle&diff=2682Template:Dict D'ni Particle2016-07-24T07:48:22Z<p>76.104.212.162: Created page with "===Particle=== '''{{lc:{{PAGENAME}}}}'''<includeonly>Category:D'ni particles</includeonly><noinclude> Category:Dictionary Templates </noinclude>"</p>
<hr />
<div>===Particle===<br />
'''{{lc:{{PAGENAME}}}}'''<includeonly>[[Category:D'ni particles]]</includeonly><noinclude><br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Re-&diff=2681Dictionary:Re-2016-07-24T06:48:03Z<p>76.104.212.162: Redirected page to Dictionary:Re</p>
<hr />
<div>#REDIRECT [[Dictionary:Re]]</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Re-&diff=2680Dictionary:Re-2016-07-24T06:47:45Z<p>76.104.212.162: Redirected page to Dictionary:Reh</p>
<hr />
<div>#REDIRECT [[Dictionary:Reh]]</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:R%27-&diff=2679Dictionary:R'-2016-07-24T06:46:30Z<p>76.104.212.162: Redirected page to Dictionary:Re</p>
<hr />
<div>#REDIRECT [[Dictionary:Re]]</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Re-&diff=2678Dictionary:Re-2016-07-24T06:22:28Z<p>76.104.212.162: Created page with "{{Dict Entry D'ni |dnifont=re }} ''Variant(s):'' * ''{{de|r'-}}'' ===Pronunciation=== {{IPA|ɾɛ}} {{Dict D'ni Prefix}} #marks the noun attached to as definite ===Usage=== '..."</p>
<hr />
<div>{{Dict Entry D'ni<br />
|dnifont=re<br />
}}<br />
''Variant(s):'' <br />
* ''{{de|r'-}}''<br />
===Pronunciation===<br />
{{IPA|ɾɛ}}<br />
<br />
{{Dict D'ni Prefix}}<br />
#marks the noun attached to as definite<br />
===Usage===<br />
''re-'' is prefixed to words beginning with a consonant. For words beginning with a vowel, ''{{de|r'-}}'' is used.</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Prefix&diff=2677Template:Dict D'ni Prefix2016-07-24T06:17:55Z<p>76.104.212.162: /* Prefix */</p>
<hr />
<div>===Prefix===<br />
'''{{lc:{{PAGENAME}}}}'''<includeonly>[[Category:D'ni prefixes]]</includeonly><noinclude><br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Prefix&diff=2676Template:Dict D'ni Prefix2016-07-24T06:16:10Z<p>76.104.212.162: /* Prefix */</p>
<hr />
<div>===Prefix===<br />
'''{{lc:{{PAGENAME}}}}''' [[Category:D'ni prefixes]]<noinclude><br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Prefix&diff=2675Template:Dict D'ni Prefix2016-07-24T06:15:23Z<p>76.104.212.162: Created page with "===Prefix=== '''{{lc:{{PAGENAME}}}}'''<noinclude> Category:Dictionary Templates </noinclude>"</p>
<hr />
<div>===Prefix===<br />
'''{{lc:{{PAGENAME}}}}'''<noinclude><br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Tel&diff=2602Dictionary:Tel2016-07-20T22:03:05Z<p>76.104.212.162: Added new header template</p>
<hr />
<div>{{Stub}}<br />
{{Dict Entry D'ni<br />
| dnifont=tel<br />
| ipa=tɛl<br />
| ots=tel<br />
| nts=tel<br />
}}<br />
===Noun===<br />
#guild, especially one of the D'ni Guilds</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Category:D%27ni_words&diff=2601Category:D'ni words2016-07-20T21:45:49Z<p>76.104.212.162: Created page with "&nbsp;"</p>
<hr />
<div>&nbsp;</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2600Module:Dict D'ni2016-07-20T21:43:27Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function strCategories()<br />
<br />
local output = ''<br />
<br />
-- Determine 'sort' based off of first character in Dnifont<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
output = output..'[[Category:D\'ni words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni words|'..sort..']]\n'<br />
<br />
return output<br />
<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output = ''<br />
<br />
output = output..'==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..' '<br />
output = output..strCategories()<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Shorah&diff=2599Dictionary:Shorah2016-07-20T21:42:24Z<p>76.104.212.162: </p>
<hr />
<div>{{Dict Entry D'ni<br />
| dnifont=anonA<br />
| ipa=ʃorɑ<br />
| ots=shorah<br />
| nts=šora<br />
}}<br />
===Noun===<br />
#peace<br />
#hello<br />
#goodbye<br />
<br />
===Usage Notes===<br />
Used as an all-purpose greeting and parting phrase, much like ''Aloha'' in Hawaiian. <br />
<br />
===Sources===<br />
* [[Yeesha]]'s First Cleft Speech: '''.shorah''' .[[re-|re]][[kooahn]] [[tre-|tre]][[kleft]] [[preniv]] [[le-|le]][[glo]][[-en|en]] [[b'-|b']][[rem]] (''Hello. The stream in the [[Cleft]] has begun to flow again.'')</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2598Module:Dict D'ni2016-07-20T21:40:25Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function strCategories()<br />
<br />
local output = ''<br />
<br />
-- Determine 'sort' based off of first character in Dnifont<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output = ''<br />
<br />
output = output..'==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..' '<br />
output = output..strCategories()<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2597Module:Dict D'ni2016-07-20T21:36:23Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function strCategories()<br />
<br />
local output = ''<br />
<br />
-- Determine 'sort' based off of first character in Dnifont<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output = ''<br />
<br />
output = output..'==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..strCategories()<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2596Module:Dict D'ni2016-07-20T21:35:55Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function strCategories()<br />
<br />
local output = ''<br />
<br />
-- Determine 'sort' based off of first character in Dnifont<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output = ''<br />
<br />
output = output..'==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = outout..strCategories()<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2595Module:Dict D'ni2016-07-20T21:34:56Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function strCategories()<br />
<br />
local output<br />
<br />
-- Determine 'sort' based off of first character in Dnifont<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = outout..strCategories()<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2594Module:Dict D'ni2016-07-20T21:21:44Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
local sort = mw.ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2593Module:Dict D'ni2016-07-20T21:20:47Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
local sort = ustring.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2592Module:Dict D'ni2016-07-20T21:18:26Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
local sort = string.sub(args['dnifont'],1,1)<br />
sort = sort:gsub("%S+", {["S"] = "sh", <br />
["T"] = "th", <br />
["O"] = "oy", <br />
["c"] = "ch", <br />
["a"] = "ah", <br />
["E"] = "ee", <br />
["A"] = "ay", <br />
["u"] = "uh",<br />
["U"] = "oo",<br />
["x"] = "ts",<br />
["d"] = "dh",<br />
["D"] = "d",<br />
["k"] = "kh",<br />
["K"] = "k",<br />
["I"] = "ai",<br />
["k"] = "kh",<br />
["å"] = "a",<br />
})<br />
<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2591Module:Dict D'ni2016-07-20T20:51:58Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
local sort = string.sub(args['dnifont'],1,1)<br />
<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2590Module:Dict D'ni2016-07-20T20:49:54Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
local sort = args['dnifont'].sub(1,1)<br />
<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
output = output..'[[Category:D\'ni Words beginning with '..sort..']]\n'<br />
output = output..'[[Category:D\'ni Words|'..sort..']]\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2589Module:Dict D'ni2016-07-20T20:37:17Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
<br />
output = '==D\'ni==\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2588Module:Dict D'ni2016-07-20T20:36:33Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
<br />
local output<br />
<br />
output = '===D\'ni===\n'<br />
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n'<br />
output = output..'* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n'<br />
output = output..'* [[Dnifont]]: '..args['dnifont']..'\n'<br />
output = output..'* [[OTS]]: '..args['ots']..'\n'<br />
output = output..'* [[NTS]]: '..args['nts']..'\n'<br />
<br />
return output<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2587Module:Dict D'ni2016-07-20T20:29:09Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
-- Specify the overall layout of the infobox, with special settings<br />
-- if the infobox is used as a 'child' inside another infobox.<br />
<br />
root = mw.html.create()<br />
<br />
root<br />
:wikitext('===D\'ni===\n')<br />
:wikitext('{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n')<br />
:wikitext('* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n')<br />
:wikitext('* [[Dnifont]]: '..args['dnifont']..'\n')<br />
:wikitext('* [[OTS]]: '..args['ots']..'\n')<br />
:wikitext('* [[NTS]]: '..args['nts']..'\n')<br />
<br />
return tostring(root)<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2586Module:Dict D'ni2016-07-20T20:27:44Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
-- Specify the overall layout of the infobox, with special settings<br />
-- if the infobox is used as a 'child' inside another infobox.<br />
<br />
root = mw.html.create()<br />
<br />
root<br />
:wikitext('===D\'ni===')<br />
:wikitext('{{huge| <d\'ni>'..args['dnifont']..'</d\'ni> \n}}')<br />
:wikitext('* [[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']\n')<br />
:wikitext('* [[Dnifont]]: '..args['dnifont']..'\n')<br />
:wikitext('* [[OTS]]: '..args['ots']..'\n')<br />
:wikitext('* [[NTS]]: '..args['nts']..'\n')<br />
<br />
return tostring(root)<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2585Module:Dict D'ni2016-07-20T20:25:01Z<p>76.104.212.162: </p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
-- Specify the overall layout of the infobox, with special settings<br />
-- if the infobox is used as a 'child' inside another infobox.<br />
<br />
root = mw.html.create()<br />
<br />
root<br />
:wikitext('===D\'ni===')<br />
:wikitext('{{huge| <d\'ni>'..args['dnifont']..'</d\'ni> }}')<br />
:wikitext('*[[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']')<br />
:wikitext('*[[Dnifont]]: '..args['dnifont'])<br />
:wikitext('*[[OTS]]: '..args['ots'])<br />
:wikitext('*[[NTS]]: '..args['nts'])<br />
<br />
return tostring(root)<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return frame:preprocess(_dni_word_entry())<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_Entry_D%27ni&diff=2584Template:Dict Entry D'ni2016-07-20T20:08:24Z<p>76.104.212.162: Created page with "{{#invoke:Dict Entry D'ni|dict_word_entry}}"</p>
<hr />
<div>{{#invoke:Dict Entry D'ni|dict_word_entry}}</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Module:Dict_D%27ni&diff=2583Module:Dict D'ni2016-07-20T20:06:05Z<p>76.104.212.162: Created page with "-- -- This module implements {{D'ni Word Entry}} -- local p = {} local args = {} local origArgs local root local function getArgNums(prefix) -- Returns a table contain..."</p>
<hr />
<div>--<br />
-- This module implements {{D'ni Word Entry}}<br />
--<br />
<br />
local p = {}<br />
<br />
local args = {}<br />
local origArgs<br />
local root<br />
<br />
local function getArgNums(prefix)<br />
-- Returns a table containing the numbers of the arguments that exist<br />
-- for the specified prefix. For example, if the prefix was 'data', and<br />
-- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.<br />
local nums = {}<br />
for k, v in pairs(args) do<br />
local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')<br />
if num then table.insert(nums, tonumber(num)) end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
<br />
local function renderTrackingCategories()<br />
if args.decat ~= 'yes' then<br />
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then<br />
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')<br />
end<br />
if args.child == 'yes' and args.title then<br />
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')<br />
end<br />
end<br />
end<br />
<br />
local function _dni_word_entry()<br />
-- Specify the overall layout of the infobox, with special settings<br />
-- if the infobox is used as a 'child' inside another infobox.<br />
<br />
root = mw.html.create()<br />
<br />
root<br />
:wikitext('===D\'ni===')<br />
:wikitext('{{huge| <d\'ni>'..args['dnifont']..'</d\'ni> }}')<br />
:wikitext('*[[wikipedia:International Phonetic Alphabet|IPA]]: ['..args['ipa']..']')<br />
:wikitext('*[[Dnifont]]: '..args['dnifont'])<br />
:wikitext('*[[OTS]]: '..args['ots'])<br />
:wikitext('*[[NTS]]: '..args['nts'])<br />
<br />
return tostring(root)<br />
end<br />
<br />
local function preprocessSingleArg(argName)<br />
-- If the argument exists and isn't blank, add it to the argument table.<br />
-- Blank arguments are treated as nil to match the behaviour of ParserFunctions.<br />
if origArgs[argName] and origArgs[argName] ~= '' then<br />
args[argName] = origArgs[argName]<br />
end<br />
end<br />
<br />
local function preprocessArgs(prefixTable, step)<br />
-- Assign the parameters with the given prefixes to the args table, in order, in batches<br />
-- of the step size specified. This is to prevent references etc. from appearing in the<br />
-- wrong order. The prefixTable should be an array containing tables, each of which has<br />
-- two possible fields, a "prefix" string and a "depend" table. The function always parses<br />
-- parameters containing the "prefix" string, but only parses parameters in the "depend"<br />
-- table if the prefix parameter is present and non-blank.<br />
if type(prefixTable) ~= 'table' then<br />
error("Non-table value detected for the prefix table", 2)<br />
end<br />
if type(step) ~= 'number' then<br />
error("Invalid step value detected", 2)<br />
end<br />
<br />
-- Get arguments without a number suffix, and check for bad input.<br />
for i,v in ipairs(prefixTable) do<br />
if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then<br />
error('Invalid input detected to preprocessArgs prefix table', 2)<br />
end<br />
preprocessSingleArg(v.prefix)<br />
-- Only parse the depend parameter if the prefix parameter is present and not blank.<br />
if args[v.prefix] and v.depend then<br />
for j, dependValue in ipairs(v.depend) do<br />
if type(dependValue) ~= 'string' then<br />
error('Invalid "depend" parameter value detected in preprocessArgs')<br />
end<br />
preprocessSingleArg(dependValue)<br />
end<br />
end<br />
end<br />
<br />
-- Get arguments with number suffixes.<br />
local a = 1 -- Counter variable.<br />
local moreArgumentsExist = true<br />
while moreArgumentsExist == true do<br />
moreArgumentsExist = false<br />
for i = a, a + step - 1 do<br />
for j,v in ipairs(prefixTable) do<br />
local prefixArgName = v.prefix .. tostring(i)<br />
if origArgs[prefixArgName] then<br />
moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.<br />
preprocessSingleArg(prefixArgName)<br />
end<br />
-- Process the depend table if the prefix argument is present and not blank, or<br />
-- we are processing "prefix1" and "prefix" is present and not blank, and<br />
-- if the depend table is present.<br />
if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then<br />
for j,dependValue in ipairs(v.depend) do<br />
local dependArgName = dependValue .. tostring(i)<br />
preprocessSingleArg(dependArgName)<br />
end<br />
end<br />
end<br />
end<br />
a = a + step<br />
end<br />
end<br />
<br />
function p.dict_word_entry(frame)<br />
-- If called via #invoke, use the args passed into the invoking template.<br />
-- Otherwise, for testing purposes, assume args are being passed directly in.<br />
if frame == mw.getCurrentFrame() then<br />
origArgs = frame:getParent().args<br />
else<br />
origArgs = frame<br />
end<br />
<br />
-- Parse the data parameters<br />
preprocessSingleArg('type')<br />
preprocessSingleArg('dnifont')<br />
preprocessSingleArg('ipa')<br />
preprocessSingleArg('ots')<br />
preprocessSingleArg('nts')<br />
<br />
return _dni_word_entry()<br />
end<br />
<br />
return p</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Category:Dictionary_Templates&diff=2582Category:Dictionary Templates2016-07-20T19:38:35Z<p>76.104.212.162: Added brief description</p>
<hr />
<div>Templates in this category are used in the [[Dictionary:Main_Page|Dictionary:]] Namespace of the wiki.</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dde&diff=2581Template:Dde2016-07-20T19:36:18Z<p>76.104.212.162: </p>
<hr />
<div><includeonly><d'ni>[[Dictionary:{{{1}}}|{{{2}}}]]</d'ni></includeonly><noinclude><br/><br />
===Usage===<br />
'''''<nowiki>{{dde|pagename|linktext}}</nowiki>'''''<br />
<br />
Short for 'Dni-text dictionary entry' - creates a link to the dictionary entry for the word with D'ni letters. <br />
<br />
Because the Dictionary pagenames are in [[OTS]] but the <nowiki><d'ni></nowiki> uses [[Dnifont]], using the normal DE template will display incorrect D'ni letters. Use this instead.<br />
<br />
The first parameter is the name of the pagename (sans 'Dictionary:' tag), while the second is the Dnifont transliteration. Both are required.<br />
<br />
Example:<br />
* ''<nowiki>{{dde|shorah|Sora}}</nowiki>'' shows as: {{dde|shorah|Sora}}<br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dde&diff=2580Template:Dde2016-07-20T19:35:24Z<p>76.104.212.162: Created page with "<includeonly><d'ni>{{{2}}}</d'ni></includeonly><noinclude><br/> ===Usage=== '''''<nowiki>{{dde|pagename|linktext}}</nowiki>''''' Short for 'Dni-text di..."</p>
<hr />
<div><includeonly><d'ni>[[Dictionary:{{{1}}}|{{{2}}}]]</d'ni></includeonly><noinclude><br/><br />
===Usage===<br />
'''''<nowiki>{{dde|pagename|linktext}}</nowiki>'''''<br />
<br />
Short for 'Dni-text dictionary entry' - creates a link to the dictionary entry for the word with D'ni letters. <br />
<br />
Because the Dictionary pagenames are in [[OTS]] but the <nowiki><d'ni></nowiki> uses [[Dnifont]], using the normal DE template will display incorrect D'ni letters. Use this instead.<br />
<br />
The first parameter is the name of the pagename (sans 'Dictionary:' tag), while the second is the Dnifont transliteration. Both are required.<br />
<br />
Example:<br />
* ''<nowiki>{{de|shorah|Sora}}</nowiki>'' shows as: {{dde|shorah|Sora}}<br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2579Template:De2016-07-20T19:29:22Z<p>76.104.212.162: </p>
<hr />
<div><includeonly>[[Dictionary:{{{1}}}|{{#if: {{{2|}}} | {{{2}}} | {{{1}}} }}]]</includeonly><noinclude><br/><br />
===Usage===<br />
'''''<nowiki>{{de|pagename|linktext}}</nowiki>'''''<br />
<br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the pagename (sans 'Dictionary:' tag), while the second is what the link will appear as in the text. If no second parameter is specified, it displays the name as the link.<br />
<br />
Example:<br />
* ''<nowiki>{{de|shorah}}</nowiki>'' shows as: {{de|shorah}}<br />
* ''<nowiki>{{de|shorah|SHORAH}}</nowiki>'' shows as: {{de|shorah|SHORAH}}<br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2576Template:De2016-07-20T19:15:38Z<p>76.104.212.162: </p>
<hr />
<div><includeonly>[[Dictionary:{{{1}}}|{{#if: {{{2|}}} | {{{2}}} | {{{1}}} }}]]</includeonly><noinclude><br/><br />
===Usage===<br />
<pre>{{de|pagename|linktext}}</pre><br />
<br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the pagename (sans 'Dictionary:' tag), while the second is what the link will appear as in the text. If no second parameter is specified, it displays the name as the link.<br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2575Template:De2016-07-20T19:14:07Z<p>76.104.212.162: Added usage info and category</p>
<hr />
<div><includeonly>[[Dictionary:{{{1}}}{{#if: {{{2|}}} | {{!}}{{{2}}} }}]]</includeonly><noinclude><br/><br />
===Usage===<br />
<pre>{{de|pagename|linktext}}</pre><br />
<br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the pagename (sans 'Dictionary:' tag), while the second is what the link will appear as in the text. If no second parameter is specified, it displays the name as the link.<br />
<br />
[[Category:Dictionary Templates]]<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2574Template:De2016-07-20T19:07:54Z<p>76.104.212.162: </p>
<hr />
<div>[[Dictionary:{{{1}}}{{#if: {{{2|}}} | {{!}}{{{2}}} }}]]<noinclude><br/><br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the entry itself (sans namespace tag), while the second is what the link will appear as. If no second parameter is specified, it displays the name as the link.<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2573Template:De2016-07-20T19:06:08Z<p>76.104.212.162: </p>
<hr />
<div>[[Dictionary:{{{1}}}{{#if: {{{2}}} | {{!}}{{{2}}} }}]]<noinclude><br/><br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the entry itself (sans namespace tag), while the second is what the link will appear as. If no second parameter is specified, it displays the name as the link.<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2572Template:De2016-07-20T19:01:00Z<p>76.104.212.162: </p>
<hr />
<div>[[Dictionary:{{{1}}}|{{{2}}}]]<noinclude><br/><br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the entry itself (sans namespace tag), while the second is what the link will appear as. If no second parameter is specified, it displays the name as the link.<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2571Template:De2016-07-20T19:00:16Z<p>76.104.212.162: </p>
<hr />
<div>[[Dictionary:{{{1}}}]]<noinclude><br/><br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the entry itself (sans namespace tag), while the second is what the link will appear as. If no second parameter is specified, it displays the name as the link.<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:De&diff=2570Template:De2016-07-20T18:58:30Z<p>76.104.212.162: Create (let's see if this works.</p>
<hr />
<div>[[Dictionary:{{{1}}}|{{{2|}}}]]<noinclude><br/><br />
Short for 'dictionary entry' - creates a link to the dictionary entry for the word.<br />
The first parameter is the name of the entry itself (sans namespace tag), while the second is what the link will appear as. If no second parameter is specified, it displays the name as the link.<br />
</noinclude></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Word&diff=2559Template:Dict D'ni Word2016-07-20T03:27:22Z<p>76.104.212.162: Added interwiki link for IPA</p>
<hr />
<div>==D'ni==<br />
{{huge| <d'ni>{{{dnifont}}}</d'ni> }}<br />
<br />
*[[wikipedia:International Phonetic Alphabet|IPA]]: [{{{ipa}}}]<br />
*[[Dnifont]]: {{{dnifont}}}<br />
*[[OTS]]: {{{ots}}}<br />
*[[NTS]]: {{{nts}}}<br />
<includeonly><br />
[[Category:D'ni words|{{{sort}}}]]<br />
[[Category:D'ni words beginning with {{{sort}}}]]<br />
</includeonly></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Word&diff=2551Template:Dict D'ni Word2016-07-20T02:57:31Z<p>76.104.212.162: Made the Dni word HUGE!!!</p>
<hr />
<div>==D'ni==<br />
{{huge| <d'ni>{{{dnifont}}}</d'ni> }}<br />
<br />
*IPA: [{{{ipa}}}]<br />
*[[Dnifont]]: {{{dnifont}}}<br />
*[[OTS]]: {{{ots}}}<br />
*[[NTS]]: {{{nts}}}<br />
<includeonly>[[Category:D'ni words]]</includeonly></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Tel&diff=2550Dictionary:Tel2016-07-20T02:53:42Z<p>76.104.212.162: Created!</p>
<hr />
<div>{{Dict D'ni Word<br />
|dnifont=tel<br />
|ipa=tɛl<br />
|ots=tel<br />
|nts=tel<br />
}}<br />
<br />
===Noun===<br />
#guild, especially one of the D'ni Guilds<br />
<br />
<br />
<br />
<br />
{{Stub}}</div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Word&diff=2549Template:Dict D'ni Word2016-07-20T02:48:40Z<p>76.104.212.162: /* D'ni */</p>
<hr />
<div>==D'ni==<br />
<big><d'ni>{{{dnifont}}}</d'ni></big><br />
<br />
*IPA: [{{{ipa}}}]<br />
*[[Dnifont]]: {{{dnifont}}}<br />
*[[OTS]]: {{{ots}}}<br />
*[[NTS]]: {{{nts}}}<br />
<includeonly>[[Category:D'ni words]]</includeonly></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Word&diff=2547Template:Dict D'ni Word2016-07-19T07:13:26Z<p>76.104.212.162: /* D'ni */</p>
<hr />
<div>==D'ni==<br />
<d'ni> <br />
{{{dnifont}}}<br />
</d'ni><br />
<br />
*IPA: [{{{ipa}}}]<br />
*[[Dnifont]]: {{{dnifont}}}<br />
*[[OTS]]: {{{ots}}}<br />
*[[NTS]]: {{{nts}}}<br />
<includeonly>[[Category:D'ni words]]</includeonly></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Template:Dict_D%27ni_Word&diff=2546Template:Dict D'ni Word2016-07-19T07:12:38Z<p>76.104.212.162: Added category</p>
<hr />
<div>==D'ni==<br />
<d'ni> <br />
{{{dnifont}}}<br />
</d'ni><br />
<br />
*IPA: [{{{ipa}}}]<br />
*[[Dnifont]]: {{{dnifont}}}<br />
*[[OTS]]: {{{ots}}}<br />
*[[NTS]]: {{{nts}}}<br />
<includeonly>[[Category: D'ni words]]</includeonly></div>76.104.212.162https://archive.guildofarchivists.org/w/index.php?title=Dictionary:Shorah&diff=2545Dictionary:Shorah2016-07-19T07:05:56Z<p>76.104.212.162: Created. Has Template issue...</p>
<hr />
<div>{{Dict D'ni Word<br />
| dnifont=Sora<br />
| ipa=ʃorɑ<br />
| ots=shorah<br />
| nts=šora}}<br />
<br />
===Noun===<br />
#peace<br />
#hello<br />
#goodbye<br />
<br />
===Usage Notes===<br />
Used as an all-purpose greeting and parting phrase, much like ''Aloha'' in Hawaiian. <br />
<br />
===Sources===<br />
* [[Yeesha]]'s First Cleft Speech: '''.shorah''' .[[re-|re]][[kooahn]] [[tre-|tre]][[kleft]] [[preniv]] [[le-|le]][[glo]][[-en|en]] [[b'-|b']][[rem]] (''Hello. The stream in the [[Cleft]] has begun to flow again.'')</div>76.104.212.162