Module:IPAc-en/data
< Module:IPAc-en
Jump to navigation
Jump to search
Revision as of 06:28, 17 June 2015 by blackwiki>Mr. Stradivarius (process pronunciation data as well)
| 40x40px | This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
-- This module processes data for [[Module:IPAc-en]]. It is intended to be
-- loaded with mw.loadData.
local function makeData(oldData)
local newData = {}
for id, old in pairs(oldData) do
local new = {}
for k, v in pairs(old) do
if k ~= 'aliases' then
new[k] = v
end
end
newData[id] = new
if old.aliases then
for i, alias in ipairs(old.aliases) do
newData[alias] = new
end
end
end
return newData
end
return {
pronunciation = makeData(require('Module:IPAc-en/pronunciation')),
tooltips = makeData(require('Module:IPAc-en/tooltips'))
}