This module issubject to page protection.It is ahighly visible modulein use by a very large number of pages, or issubstitutedvery frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it isprotectedfrom editing.
-- This module processes data for [[Module:IPAc-en]]. It is intended to be-- loaded with mw.loadData.localPRONUNCIATION_MODULE='Module:IPAc-en/pronunciation'localPHONEME_MODULE='Module:IPAc-en/phonemes'localfunctionmakeData(oldData)localnewData={}fori,oldinipairs(oldData)dolocalnew={}fork,vinpairs(old)doifk~='aliases'andk~='code'thennew[k]=vendendnewData[old.code]=newifold.aliasesthenfori,aliasinipairs(old.aliases)donewData[alias]=newendendendreturnnewDataendlocalfunctionmain()localpronunciation=makeData(require(PRONUNCIATION_MODULE))localphonemes=makeData(require(PHONEME_MODULE))-- Check that no pronunciation keys are also contained in the phonemes-- data. This would cause silent, hard-to-debug errors if it went-- unchecked, so make it cause a big red error message instead.foridinpairs(pronunciation)doifphonemes[id]thenerror(string.format("duplicate ID '%s' found in %s and %s",id,PRONUNCIATION_MODULE,PHONEME_MODULE))endendreturn{pronunciation=pronunciation,phonemes=phonemes,}endreturnmain()