This is the current revision of this page, as edited by imported>Nardog at 21:19, 25 May 2017(Undid revision 782268759 by Nardog (talk)). The present address (URL) is a permanent link to this version.Revision as of 21:19, 25 May 2017 by imported>Nardog(Undid revision 782268759 by Nardog (talk))
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()