This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing.
-- This module processes data for [[Module:IPAc-en]]. It is intended to be-- loaded with mw.loadData.localPRONUNCIATION_MODULE='Module:IPAc-en/pronunciation/sandbox'localPHONEME_MODULE='Module:IPAc-en/phonemes/sandbox'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()