MediaWiki:Newentrywiz.js

Hello, you have come here looking for the meaning of the word MediaWiki:Newentrywiz.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word MediaWiki:Newentrywiz.js, but we will also tell you about its etymology, its characteristics and you will know how to say MediaWiki:Newentrywiz.js in singular and plural. Everything you need to know about the word MediaWiki:Newentrywiz.js you have here. The definition of the word MediaWiki:Newentrywiz.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofMediaWiki:Newentrywiz.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
// todo: clean, jQuerize, use langmetadata, let users extend this
/* jshint sub:true, shadow:true, undef:true, unused:true, strict:true, forin:true, latedef:true */
/* global jQuery */
// <nowiki>

var necdata = {
	pos: "noun",
	pos2: "Noun"
};
var necdefs = [
	,
		
	]
];
var necpost = ;

for (var i = 5; i <= 19; ++i) {
	necpost = ;
}

var neccode = 'en';
var necpostlangtext = ;

var title = mw.config.get('wgTitle');

var necinfls = {
	cmn: {
		noun: ['{{cmn-noun', '}}', ['Type', '', [
				='Traditional';necinfls='|tra='"],
				='Simplified';necinfls='|sim='"],
				=''"]
			]],
			['Pinyin', '', [
				
			]],
			['Pinyin (tone marks as numbers)', '', [
				
			]],
			['Traditional', '', [
				
			]]
		]
	},

	ca: {
		noun: ['{{ca-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: ,
		adverb: 
	},

	en: {
		noun: ['{{en-noun', '}}', ['Plural', '', [
			,
			,
			,
			
		]], ],
		verb: ['{{en-verb', '}}', ['Third-person singular present tense', '', [
				,
				
			]],
			['Present participle', '', [
				,
				
			]],
			['Past tense', '', [
				,
				
			]],
			['Past participle', '', [
				,
				
			]]
		],
		adjective: ['{{en-adj', '}}', ['Comparative', '', [
				='most '+title"],
				=title+'est'"],
				='(not comparable)'"],
				
			]],
			['Superlative', '', [
				='more '+title"],
				=title+'er'"],
				='(not comparable)'"],
				
			]]
		],
		adverb: ['{{en-adv', '}}', ['Comparative', '', [
				='most '+title"],
				=title+'est'"],
				='(not comparable)'"],
				
			]],
			['Superlative', '', [
				='more '+title"],
				=title+'er'"],
				='(not comparable)'"],
				
			]]
		],
		pronoun: ,
		conjunction: ,
		interjection: ,
		preposition: ,
		propernoun: ['{{en-proper noun', '}}', ['Plural', '', [
			,
			,
			
		]]],
		contraction: ,
		prefix: ,
		suffix: 
	},

	eo: {
		noun: ,
		verb: ,
		adjective: ,
		adverb: ,
		propernoun: 
	},

	es: {
		noun: ,
		adjective: ,
		adverb: ,
		propernoun: 
	},

	fr: {
		noun: ['{{fr-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: ,
		verb: ,
		adverb: 
	},

	enm: {
		noun: 
	},

	frm: {
		noun: ['{{frm-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: 
	},

	fro: {
		noun: ['{{fro-noun', '}}', ['Gender', '', [
			,
			,
			
		]]]
	},

	he: {
		noun: ['{{he-noun', '}}', ['Transliteration', '', [
				
			]],
			['With vowels', '', [
				,
				
			]],
			['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				,
				,
				
			]],
			['Plural with vowels', '', [
				,
				
			]],
			['Construct', '', [
				,
				,
				
			]],
			['Construct with vowels', '', [
				,
				
			]]
		],
		verb: ['{{he-verb', '}}', ['Transliteration', '', [
				
			]],
			['With vowels', '', [
				,
				
			]],
			['Binyan', '', [
				,
				,
				,
				,
				,
				,
				,
				,
				
			]]
		],
		adverb: ['{{he-adv', '}}', ['Transliteration', '', [
				
			]],
			['With vowels', '', [
				,
				
			]]
		]
	},

	hi: {
		noun: ['{{hi-noun', '}}', ['Gender', '', [
				,
				,
				,
				,
				,
				,
				
			]],
			['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		propernoun: ['{{hi-proper noun', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		adjective: ['{{hi-adj', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		verb: ['{{hi-verb', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		adverb: ['{{hi-adv', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		verbform: ['{{hi-verb-form', '}}', ['Gender', '', [
				,
				,
				,
				,
				
			]],
			['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		pronoun: ['{{hi-pron', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		interjection: ['{{hi-interj', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		preposition: ['{{hi-prep', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
		postposition: ['{{hi-post', '}}', ['Urdu form', '', [
				,
				
			]],
			['Transliteration', '', [
				,
				
			]]
		],
	},

	hil: {
		noun: 
	},

	io: {
		noun: ,
		verb: ,
		adjective: ,
		adverb: 
	},

	lb: {
		noun: ['{{lb-noun', '}}', ['Gender', '', [
				,
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: 
	},

	my: {
		noun: 
	},

	nmn: {
		noun: ['{{nmn-noun', '}}', ['Plural', '', [
				
			]],
			['Diminutive', '', [
				
			]],
			['Diminutive plural', '', [
				
			]],
			['Tone class', '', [
				
			]],
			['Noun class', '', [
				
			]]
		]
	},

	oc: {
		noun: ['{{oc-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: ,
		verb: 
	},

	pl: {
		noun: ['{{pl-noun', '}}', ['Gender', '', [
				,
				,
				,
				,
				,
				,
				
			]],
			['Diminutive', '', [
				,
				
			]],
			['Augmentative', '', [
				,
				
			]],
			['Female equivalent', '', [
				,
				
			]],
			['Male equivalent', '', [
				,
				
			]],
			['Abbreviation', '', [
				,
				
			]]
		],
		propernoun: ['{{pl-proper noun', '}}', ['Gender', '', [
				,
				,
				,
				,
				,
				,
				
			]],
			['Female equivalent', '', [
				,
				
			]],
			['Male equivalent', '', [
				,
				
			]],
			['Abbreviation', '', [
				,
				
			]]
		],
		adjective: ['{{pl-adj', '}}', ['Gender', '', [
				,
				,
				,
				
			]],
			['Comparative', '', [
				,
				,
				,
				
			]]
		],
		adverb: ['{{pl-adv', '}}', ['Comparative', '', [
			,
			,
			,
			,
			
		]]],
		verb: ['{{pl-verb', '}}', ['Aspect', '', [
				,
				,
				
			]],
			['Imperfective counterpart', '', [
				,
				
			]],
			['Perfective counterpart', '', [
				,
				
			]]
		],
	},

	pro: {
		noun: ['{{pro-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: 
	},

	pt: {
		noun: ['{{pt-noun', '}}', ['Gender', '', [
				,
				,
				
			]],
			['Plural', '', [
				,
				,
				
			]]
		],
		adjective: 
	},

	ru: {
		noun: ['{{ru-noun|', '}}', ['Gender', '', [
			,
			,
			,
			,
			,
			,
			,
			,
			,
			,
			,
			,
			,
			
		]]],
		propernoun: ['{{ru-proper noun', '}}', ['Gender', '', [
				,
				,
				,
				,
				,
				
			]],
			['Female equivalent', '', [
				,
				
			]],
			['Male equivalent', '', [
				,
				
			]]
		],
		adjective: ,
		verb: ['{{ru-verb', '}}', ['Stress-marked form', '', [
				
			]],
			['Aspect', '', [
				,
				,
				
			]],
			['Imperfective counterpart', '', [
				,
				
			]],
			['Perfective counterpart', '', [
				,
				
			]]
		],
		adverb: ['{{ru-adv', '}}', ['Stress-marked form', '', [
				
			]],
			['Comparative', '', [
				,
				,
				
			]]
		],
	},

	wym: {
		noun: ['{{head|wym|noun', '}}', ['Gender', '', [
			,
			,
			
		]]]
	}
};

/*

Notes:
necfunction fills in the edit box
necfunction2 creates the main menu stuff inside the span id'd necplaceholder
necfunction3 doesn't exist
necfunction4 goes to necfunction5 (don't remember what this was for)
necfunction5 creates the inflections options by filling in necinfls
necfunction6 does some extra junk for the infl options input boxes
necdefupdate makes the definitions/example sentence options
necpostbox makes the extra junk ("More details") work (i think)

More recent note: I knew next to nothing about javascript when I originally wrote this, so the code is an utter mess. 
It's also probably never going to be fixed up because really, I'd rather work on making WT:EDIT stuff the primary easy-editing method instead of tools like this.

The necinfls object works like this:
Each language is its own object, containing an object for each pos, which contains the information for that pos.
The first part is the stuff that comes at the beginning of the template, the second is the stuff at the end, the third onward are the available parameters of the template and what stuff they produce.
Each template parameter is an array, which contains the word that shows up at the beginning of the section, then a blank value, and then subarrays of each option.
Each subarray contains the text that shows up in the editor, followed by the text that shows up in the textbox (the wikimarkup). Some onclick javascript can be added to an option as the third parameter in the array.
If the option is an input box, the first parameter should be "input", followed by the editor text (DON'T leave this blank or the whole thing will blow up), followed by the pre-inputbox-value wikimarkup, followed by post-inputbox-value wikimarkup, followed by any extra js. 

Does this make any sense to anyone? :)

Things to do:
1 Get quotations to work right
2 Fix up pronunciation section
3 Add little help thingies
4 Inflection tables
5 Get the example sentence auto-bolding to not stink
6 Build add-section stuff

There are little href=javascript: things littered all over the place because I don't know any other way to make things look like unvisited links without having to actually put anything in the href.

eh, sploot

*/


var necetym;
var necpron;
var necheadingorder = ;
var necinputadvanced = "";
var necposlist = ;


function necfunction2() {
	/* CREATE OPTIONS */
	var x = "Language code: <input type=text value='en' id='necinput' onKeyUp='neccode=this.value;necfunction();necfunction4();necfunction()' onblur=if (necCleanLangCode(this.value)){this.value=necCleanLangCode(this.value)};neccode=this.value;document.getElementById('nectransspan').style.display=((this.value=='en')?'':'none');if (/^{2,3}(-{1,7})?$/.test(this.value)){document.getElementById('neclangerror').style.display='none'}else{document.getElementById('neclangerror').style.display=''};necfunction();necfunction4();necfunction();necdefupdate() title='The two or three letter ISO-639 language code'></input><span id=neclangerror style=display:none;color:red> ERROR: INVALID LANGUAGE CODE</span><br>Part of speech: ";

	for (var i = 0; i < 4; ++i) {
		x += "<a id='necinputpos" + necposlist + "' href=javascript: onclick=document.getElementById('necinputpos'+necdata).style.fontWeight='';necdata='" + necposlist + "';necdata='" + necposlist.toLowerCase() + "';this.style.fontWeight='bold';necfunction4();necfunction()";

		if (!i) {
			x += " style='font-weight:bold'";
		}

		x += ">" + necposlist + "</a>, ";
	}

	x += "<span id='necinputpos'>Other: <input type=text onKeyUp=\"document.getElementById('necinputpos'+necdata).style.fontWeight='';necdata=this.value;necdata=this.value.toLowerCase().replace(/ /g,'');this.parentNode.setAttribute('ID','necinputpos'+this.value);document.getElementById('necinputpos'+necdata).style.fontWeight='bold';necfunction();necfunction4()\" /><select onchange=\"document.getElementById('necinputpos'+necdata).style.fontWeight='';necdata=this.value;necdata=this.value.toLowerCase().replace(/ /g,'');this.parentNode.setAttribute('ID','necinputpos'+this.value);document.getElementById('necinputpos'+necdata).style.fontWeight='bold';necfunction();necfunction4()\"><option value=''>Select</option>";

	for (var i = 0; i < necposlist.length; ++i) {
		if (i > 3) {
			x += "<option>" + necposlist + "</option>";
		}
	}

	x += "</select></span><span id=necinfls></span><br>More details: <a id=necquotbutton href=javascript: onclick=necpostbox(0);necfunction();this.style.fontWeight='bold' title='Add Usage Notes section'>Usage notes</a>, <a href=javascript: id=necSynonymsbutton onclick=necpost.length]=;necpostbox();necfunction();this.style.fontWeight='bold' title='Add Synonyms section'>Synonyms</a>, <span id=nectransspan><a href=javascript: id=nectransbutton onclick=necpost.push('');necpostbox();necfunction();this.style.fontWeight='bold' title='Add Translations section'>Translations</a>, </span>More: <select onchange=necpostbox(this.value);this.selectedIndex=0;necfunction()><option select='selected'>Select</option>";

	for (var i = 0; i < necheadingorder.length; ++i) {
		if (i != 0 && i != 5 && i != 15) {
			x += "<option value=" + i + ">" + necheadingorder + "</option>";
		}
	}

	x += "</select><br><span id=necpostbox></span><span id='necdefs'>Definition: <input type=text id='necinput3' onKeyUp=necdefs=this.value;necfunction() /><br></span>Further information: <a href=javascript:necdefs.push(,]);necdefupdate();necfunction() title='Add new definition'>Another definition</a>,  <a href=javascript: id=necetymbutton onclick=document.getElementById('necetymspan').style.display='';necetym=document.getElementById('necetyminput').value;necfunction();this.style.fontWeight='bold' title='Add etymology section'>Etymology</a>, <a href=javascript: id=necpronbutton onclick=document.getElementById('necpronspan').style.display='';necpron=document.getElementById('necproninput').value;necfunction();this.style.fontWeight='bold' title='Add pronunciation section'>Pronunciation</a>. <span id='necetymspan' style='display:none'><br>Etymology: <a href=javascript: onclick=necetym=undefined;document.getElementById('necetymspan').style.display='none';necfunction();document.getElementById('necetymbutton').style.fontWeight='' title='Delete etymology section'>(delete)</a><br><textarea id=necetyminput onKeyUp=necetym=this.value;necfunction()></textarea></span><span id=necpronspan style='display:none'><br>Pronunciation: <a href=javascript: onclick=necpron=undefined;document.getElementById('necpronspan').style.display='none';necfunction();document.getElementById('necpronbutton').style.fontWeight='' title='Delete pronunciation section'>(delete)</a><br><textarea id=necproninput onKeyUp=necpron=this.value;necfunction()></textarea></span><div style='float:right;'><a href=https://en.wiktionary.org/w/index.php?title=User_talk:Yair_rand/newentrywiz.js&action=edit&section=new title='Give feedback'>Give feedback</a></div>";

	document.getElementById("editform").insertBefore(document.getElementById("necplaceholder"), document.getElementById("editform").firstChild);
	document.getElementById("necplaceholder").innerHTML = x;

	if (document.URL.match("&section=new")) {
		document.getElementById("wpSummaryLabel").parentNode.removeChild(document.getElementById("wpSummaryLabel"));
		document.getElementById("wpSummary").parentNode.removeChild(document.getElementById("wpSummary"));
	}
}


// Fill in the edit box.
function necfunction() {
	var k = "";

	if (document.URL.match("&section=new")) {
		k += "----\n{{rfc-auto}}\n";
	} else {
		var neceditsummary = "(]) +" + neccode + ":" + necdata + ": "; //edit summary

		for (var i = 0; i < necdefs.length; ++i) {
			neceditsummary += ((i != 0) ? ', ' : '') + necdefs;
		}

		document.getElementById("wpSummary").value = neceditsummary;
	}

	k += "=={{subst:#invoke:languages/templates|getByCode|" + document.getElementById('necinput').value + "|getCanonicalName}}==";

	for (var i = 0; i < necpost.length; ++i) {
		k += "\n + "|thumb|" + necpost + "]]";
	}

	k += "\n\n";

	if (necetym != undefined) {
		k += "===Etymology===\n" + necetym + "\n\n";
	}

	if (necpron != undefined) {
		k += "===Pronunciation===\n" + necpron + "\n\n";
	}

	k += "===" + necdata + "===\n";

	if (!neccode) {
		neccode = '';
	}

	if (neccode != '' && necinfls && necinfls] && necinfls]) {
		if (necdata + "2"] != "Advanced") {
			if (necinfls] != undefined) {
				k += necinfls];
			}

			var x = necinfls];

			for (var z = 0; z < x.length; ++z) {
				if (z <= 1) {
					continue;
				}

				var zz = neccode + "-" + necdata + z;

				for (var y = 0; y < x.length; ++y) // search for inflections
				{
					if (x != "input" && necdata == x) // is selected option, not input box
					{
						k += x;
						break;
					}

					if (x == "input" && necfunction7(x, necdata) == false) {
						k += x + necdata;
					}
				}
			}

			if (necinfls] != undefined) {
				k += necinfls];
			}
		} else {
			k += necinputadvanced;
		}
	} else {
		if (necinputadvanced) {
			k += necinputadvanced;
		} else {
			if (neccode != '' && necinfls && necinfls]) {
				k += necinfls];

				k += necinfls];
			} else {
				k += '{{head|' + neccode + '|' + necdata.toLowerCase();

				k += '}}';
			}
		}
	}

	k += "\n";

	for (var i = 0; i < necdefs.length; ++i) {
		k += "\n# " + necdefs;

		for (var l = 0; l < necdefs.length; ++l) {
			k += "\n#:''" + necdefs.replace(new RegExp("(" + title + ")", "ig"), "'''$1'''") + "''";

			if (neccode != "en" && necdefs && (new LangMetadata()).guessScript(neccode) != 'Latn') {
				k += "\n#::''" + necdefs + "''";
			}

			if (neccode != "en") {
				k += "\n#::''" + necdefs + "''";
			}
		}

		for (var l = 0; l < necdefs.length; ++l) {
			k += "\n#*'''" + necdefs + "''', " + necdefs + ", ''" + necdefs + "''";

			if (necdefs) {
				k += ", " + necdefs;
			}

			if (necdefs) {
				k += ", page";

				if (necdefs.match(/(-|–)/)) {
					k += "s";
				}

				k += " " + necdefs;
			}

			k += "\n#*:";
			k += necdefs.replace(new RegExp("(" + title + ")", "ig"), "'''$1'''");

			if (neccode != "en") {
				k += "\n#*::" + necdefs;
			}
		}
	}

	/* SUBHEADERS */
	for (var o = 0; o <= 3; ++o) {
		if (necpost != undefined) {
			k += "\n\n====" + necheadingorder + "====\n" + necpost;
		}
	}

	if (necpost != undefined) {
		k += "\n\n====Quotations====\n" + necpost;
	}

	for (var o = 5; o <= 17; ++o) {
		if (necpost != undefined) {
			k += "\n\n====" + necheadingorder + "===="
		}

		if (o < 11 || o == 13) {
			for (var i = 0; i < necpost.length; ++i) {
				k += "\n* {{sense|" + necpost + "}} ";

				for (var u = 0; u < necpost.length; ++u) {
					if (u != 0) {
						if (u != 1) {
							k += ", ";
						}

						k += "{{l|" + neccode + "|" + necpost + "}}";
					}
				}
			}
		} else if (o == 14) {
			for (var i = 0; i < necpost.length; ++i) {
				k += "\n* {{subst:#invoke:languages/templates|getByCode|" + necpost + "|getCanonicalName}}: {{l|" + necpost;
				k += "|" + necpost + "}}";
			}
		} else if (o == 15) {
			for (var i = 0; i < necpost.length; ++i) {
				k += "\n{{trans-top|" + necpost + "}}\n{{trans-bottom}}";
			}
		} else if (o == 16 || o == 17) {
			for (var i = 0; i < necpost.length; ++i) {
				k += "\n* " + necpost;
			}
		} else {
			for (var i = 0; i < necpost.length; ++i) {
				k += "\n* {{l|" + neccode + "|" + necpost + "}}";
			}
		}
	}

	for (var i = 0; i < necpost.length; ++i) {
		k += "\n + "]]";
	}

	$(document.editform.wpTextbox1).val(k);
}


function necCleanLangCode(lang) // taken from wt:edit
{
	var key = lang.toLowerCase().replace(' ', '');

	var dict = {
		aar: "aa",
		afar: "aa",
		abk: "ab",
		abkhazian: "ab",
		afr: "af",
		afrikaans: "af",
		aka: "ak",
		akan: "ak",
		amh: "am",
		amharic: "am",
		ara: "ar",
		arabic: "ar",
		arg: "an",
		aragonese: "an",
		asm: "as",
		assamese: "as",
		ava: "av",
		avaric: "av",
		ave: "ae",
		avestan: "ae",
		aym: "ay",
		aymara: "ay",
		aze: "az",
		azerbaijani: "az",
		bak: "ba",
		bashkir: "ba",
		bam: "bm",
		bambara: "bm",
		bel: "be",
		belarusian: "be",
		ben: "bn",
		bengali: "bn",
		bis: "bi",
		bislama: "bi",
		bod: "bo",
		tibetan: "bo",
		bos: "bs",
		bosnian: "bs",
		bre: "br",
		breton: "br",
		bul: "bg",
		bulgarian: "bg",
		cat: "ca",
		catalan: "ca",
		ces: "cs",
		czech: "cs",
		cha: "ch",
		chamorro: "ch",
		che: "ce",
		chechen: "ce",
		chu: "cu",
		churchslavic: "cu",
		chv: "cv",
		chuvash: "cv",
		cor: "kw",
		cornish: "kw",
		cos: "co",
		corsican: "co",
		cre: "cr",
		cree: "cr",
		cym: "cy",
		welsh: "cy",
		dan: "da",
		danish: "da",
		deu: "de",
		german: "de",
		div: "dv",
		dhivehi: "dv",
		dzo: "dz",
		dzongkha: "dz",
		ell: "el",
		greek: "el",
		eng: "en",
		english: "en",
		epo: "eo",
		esperanto: "eo",
		est: "et",
		estonian: "et",
		eus: "eu",
		basque: "eu",
		ewe: "ee",
		fao: "fo",
		faroese: "fo",
		fas: "fa",
		persian: "fa",
		fij: "fj",
		fijian: "fj",
		fin: "fi",
		finnish: "fi",
		fra: "fr",
		french: "fr",
		fry: "fy",
		westernfrisian: "fy",
		ful: "ff",
		fulah: "ff",
		gla: "gd",
		scottishgaelic: "gd",
		gle: "ga",
		irish: "ga",
		glg: "gl",
		galician: "gl",
		glv: "gv",
		manx: "gv",
		grn: "gn",
		guarani: "gn",
		guj: "gu",
		gujarati: "gu",
		hat: "ht",
		haitian: "ht",
		hau: "ha",
		hausa: "ha",
		heb: "he",
		hebrew: "he",
		her: "hz",
		herero: "hz",
		hin: "hi",
		hindi: "hi",
		hmo: "ho",
		hirimotu: "ho",
		hrv: "hr",
		croatian: "hr",
		hun: "hu",
		hungarian: "hu",
		hye: "hy",
		armenian: "hy",
		ibo: "ig",
		igbo: "ig",
		ido: "io",
		iii: "ii",
		sichuanyi: "ii",
		iku: "iu",
		inuktitut: "iu",
		ile: "ie",
		interlingue: "ie",
		ina: "ia",
		interlingua: "ia",
		ind: "id",
		indonesian: "id",
		ipk: "ik",
		inupiaq: "ik",
		isl: "is",
		icelandic: "is",
		ita: "it",
		italian: "it",
		jav: "jv",
		javanese: "jv",
		jpn: "ja",
		japanese: "ja",
		kal: "kl",
		kalaallisut: "kl",
		kan: "kn",
		kannada: "kn",
		kas: "ks",
		kashmiri: "ks",
		kat: "ka",
		georgian: "ka",
		kau: "kr",
		kanuri: "kr",
		kaz: "kk",
		kazakh: "kk",
		khm: "km",
		centralkhmer: "km",
		kik: "ki",
		kikuyu: "ki",
		kin: "rw",
		kinyarwanda: "rw",
		kir: "ky",
		kirghiz: "ky",
		kom: "kv",
		komi: "kv",
		kon: "kg",
		kongo: "kg",
		kor: "ko",
		korean: "ko",
		kua: "kj",
		kuanyama: "kj",
		kur: "ku",
		kurdish: "ku",
		lao: "lo",
		lat: "la",
		latin: "la",
		lav: "lv",
		latvian: "lv",
		lim: "li",
		limburgan: "li",
		lin: "ln",
		lingala: "ln",
		lit: "lt",
		lithuanian: "lt",
		ltz: "lb",
		luxembourgish: "lb",
		lub: "lu",
		lubakatanga: "lu",
		lug: "lg",
		ganda: "lg",
		mah: "mh",
		marshallese: "mh",
		mal: "ml",
		malayalam: "ml",
		mar: "mr",
		marathi: "mr",
		mkd: "mk",
		macedonian: "mk",
		mlg: "mg",
		malagasy: "mg",
		mlt: "mt",
		maltese: "mt",
		mon: "mn",
		mongolian: "mn",
		mri: "mi",
		maori: "mi",
		msa: "ms",
		malay: "ms",
		mya: "my",
		burmese: "my",
		nau: "na",
		nauru: "na",
		nav: "nv",
		navajo: "nv",
		nbl: "nr",
		southndebele: "nr",
		nde: "nd",
		northndebele: "nd",
		ndo: "ng",
		ndonga: "ng",
		nep: "ne",
		nepali: "ne",
		nld: "nl",
		dutch: "nl",
		nno: "nn",
		norwegiannynorsk: "nn",
		nob: "nb",
		norwegianbokmal: "nb",
		nor: "no",
		norwegian: "no",
		nya: "ny",
		nyanja: "ny",
		oci: "oc",
		occitan: "oc",
		oji: "oj",
		ojibwa: "oj",
		ori: "or",
		oriya: "or",
		orm: "om",
		oromo: "om",
		oss: "os",
		ossetian: "os",
		pan: "pa",
		panjabi: "pa",
		pli: "pi",
		pali: "pi",
		pol: "pl",
		polish: "pl",
		por: "pt",
		portuguese: "pt",
		pus: "ps",
		pushto: "ps",
		que: "qu",
		quechua: "qu",
		roh: "rm",
		romansh: "rm",
		ron: "ro",
		romanian: "ro",
		run: "rn",
		rundi: "rn",
		rus: "ru",
		russian: "ru",
		sag: "sg",
		sango: "sg",
		san: "sa",
		sanskrit: "sa",
		sin: "si",
		sinhala: "si",
		slk: "sk",
		slovak: "sk",
		slv: "sl",
		slovenian: "sl",
		sme: "se",
		northernsami: "se",
		smo: "sm",
		samoan: "sm",
		sna: "sn",
		shona: "sn",
		snd: "sd",
		sindhi: "sd",
		som: "so",
		somali: "so",
		sot: "st",
		southernsotho: "st",
		spa: "es",
		spanish: "es",
		sqi: "sq",
		albanian: "sq",
		srd: "sc",
		sardinian: "sc",
		srp: "sr",
		serbian: "sr",
		ssw: "ss",
		swati: "ss",
		sun: "su",
		sundanese: "su",
		swa: "sw",
		swahili: "sw",
		swe: "sv",
		swedish: "sv",
		tah: "ty",
		tahitian: "ty",
		tam: "ta",
		tamil: "ta",
		tat: "tt",
		tatar: "tt",
		tel: "te",
		telugu: "te",
		tgk: "tg",
		tajik: "tg",
		tgl: "tl",
		tagalog: "tl",
		tha: "th",
		thai: "th",
		tir: "ti",
		tigrinya: "ti",
		ton: "to",
		tonga: "to",
		tsn: "tn",
		tswana: "tn",
		tso: "ts",
		tsonga: "ts",
		tuk: "tk",
		turkmen: "tk",
		tur: "tr",
		turkish: "tr",
		twi: "tw",
		uig: "ug",
		uighur: "ug",
		ukr: "uk",
		ukrainian: "uk",
		urd: "ur",
		urdu: "ur",
		uzb: "uz",
		uzbek: "uz",
		ven: "ve",
		venda: "ve",
		vie: "vi",
		vietnamese: "vi",
		vol: "vo",
		volapuk: "vo",
		wln: "wa",
		walloon: "wa",
		wol: "wo",
		wolof: "wo",
		xho: "xh",
		xhosa: "xh",
		yid: "yi",
		yiddish: "yi",
		yor: "yo",
		yoruba: "yo",
		zha: "za",
		zhuang: "za",
		zho: "zh",
		chinese: "zh",
		zul: "zu",
		zulu: "zu"
	};

	return dict;
}


function necfunction4() {
	if (!neccode) {
		neccode = '';
	}

	if (neccode && necinfls && necinfls] != undefined && necinfls] != undefined) {
		necfunction5(necinfls]);
	} else {
		var qq = neccode + "-" + necdata + '2';
		var xx = "<span class=msgfornonnewbies ";

		if (necinputadvanced) {
			xx += "style='font-weight:bold' ";
		}

		xx += "><br>Wikicode: <input type=text value='" + necinputadvanced + "' onKeyUp=\"necinputadvanced=this.value;if (this.value){this.parentNode.style.fontWeight='bold'}else{this.parentNode.style.fontWeight=''};necfunction()\" /></span>";
		document.getElementById("necinfls").innerHTML = xx;
		necfunction();
	}
}


function necfunction5(a) {
	/* INFLECTION OPTIONS */

	var q = "";
	for (var r = 0; r < a.length; ++r) {
		if (r <= 1) {
			continue;
		}
		var qq = neccode + "-" + necdata + r;
		if (necdata == undefined) {
			if (a == 'input') {
				necdata = ''
			} else {
				necdata = a
			}
		}
		q += "<br>" + a + ": ";

		for (var i = 0; i < a.length; ++i) {
			if (a != 'input') {
				q += "<a href=javascript: id='necinput" + qq + a + "' onclick=\"";
				if (a) {
					q += a + ";"
				}
				q += "necdata=\'" + a + "\';necfunction4();necfunction()\">" + a + "</a>";
				if (i != a.length - 1) {
					q += ", "
				}
			} else {
				q += "<span id='necinput" + qq;
				if (necdata != "Advanced" && necfunction7(a, necdata) == false) {
					q += necdata
				}
				q += "'>" + a + "<input type=text value='' id='";
				q += neccode + "-" + necdata + "-" + r + "-" + i;
				q += "' onKeyUp=";
				if (a) {
					q += a + ";"
				}

				q += "necfunction6('" + qq + "','" + neccode + "-" + necdata + "-" + r + "-" + i + "');";

				q += "necfunction() /></span>";
				if (i != a.length - 1) {
					q += ", "
				}
			}
		}


		/* ADVANCED OPTIONS */
		if (r == 2) {
			q += "<span id='necinput" + qq + "Advanced' class=msgfornonnewbies><span style=font-weight:normal>, </span>Wikicode: <input type=text value='" + necinputadvanced + "' onKeyUp=necinputadvanced=this.value;document.getElementById('necinput" + qq + "'+necdata).style.fontWeight='';necdata='Advanced';document.getElementById('necinput" + qq + "'+necdata).style.fontWeight='bold';necfunction() /></span>";
		}
	}

	document.getElementById("necinfls").innerHTML = q;


	for (var r = 0; r < a.length; ++r) {
		if (r <= 1) {
			continue;
		}

		var qq = neccode + "-" + necdata + r;
		document.getElementById('necinput' + qq + necdata).style.fontWeight = 'bold';

		if (document.getElementById('necinput' + qq + necdata).childNodes && necdata != 'Advanced' && necfunction7(a, necdata) == false) {
			document.getElementById('necinput' + qq + necdata).childNodes.value = necdata;
		}
	}
}


function necdefupdate() {
	/* DEFINITIONS */
	var def = "";
	for (var i = 0; i < necdefs.length; ++i) {
		def += "Definition: <input size=50 type=text value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() />";
		if (i > 0) {
			def += "<a href=javascript:necdefs.splice(" + i + ",1);necdefupdate();necfunction() title='Delete this definition'>(–)</a>";
		}
		def += "<a href=javascript:necdefs.push();necdefupdate();necfunction() title='Add example sentence'>(+example sentence)</a><a href=javascript:necdefs.push();necdefupdate();necfunction() title='Add quotation'>(+quotation)</a>";
		for (var l = 0; l < necdefs.length; ++l) // Example sentences
		{
			def += "<br><span style='padding-left:30px;'>Example sentence: </span><input type=text size=40 value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() /><a href=javascript:necdefs.splice(" + l + ",1);necdefupdate();necfunction() title='Delete this example sentence'>(–)</a>";
			if (neccode != "en") {
				if ((new LangMetadata()).guessScript(neccode) != 'Latn') {
					def += "<br><span style='padding-left:60px;'>Transliteration: </span><input type=text size=40 value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() />";
				}
				def += "<br><span style='padding-left:60px;'>Translation: </span><input type=text size=40 value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() />";
			}
		}
		for (var l = 0; l < necdefs.length; ++l) // Quotations
		{
			var x = ;
			var z = ; //sizes
			def += "<br><span style='padding-left:30px;'>";
			for (var y = 0; y < x.length; ++y) {
				def += x + ": <input type=text size=" + z + " value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() /> "
			}
			def += "</span><br><span style='padding-left:30px;'>Quotation: <input type=text size=40 value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() /><a href=javascript:necdefs.splice(" + l + ",1);necdefupdate();necfunction() title='Delete this quotation'>(–)</a>";
			if (neccode != "en") {
				def += "<br><span style='padding-left:60px;'>Translation: </span><input type=text size=40 value='" + necdefs + "' onKeyUp=necdefs=this.value;necfunction() />"
			}
		}
		def += "<br>";
	}
	document.getElementById('necdefs').innerHTML = def;
}


function necpostbox(q) {
	if (q != undefined) {
		if ((q > 5 && q <= 10) || q == 13 || q == 14 || q == 19) {
			necpost.length] = 
		} else if ((q > 10 && q < 13) || q > 15) {
			necpost.length] = ''
		} else {
			necpost = ''
		}
	}
	var m = "";

	/* USAGE NOTES, INFLECTION TABLES */
	for (var o = 0; o <= 4; o++) {
		if (necpost != undefined) {
			m += "<span style='padding-left:30px;'>" + necheadingorder + ": <a href=javascript:necpost=undefined;";
			if (!o) {
				m += "document.getElementById('necquotbutton').style.fontWeight='';";
			}
			m += "necpostbox();necfunction() title='Delete section'>(delete)</a></span><br><span style='padding-left:60px;'><textarea onKeyUp=necpost=this.value;necfunction()>" + necpost + "</textarea></span><br>";
		}
	}
	/* NYMS */
	for (o = 5; o < 14; o++) {
		if (necpost != undefined) {
			m += "<span style='padding-left:30px;'>" + necheadingorder + ": <a id=nec" + necheadingorder + "button  href=javascript:necpost.length]=;necpostbox();necfunction() title='add section'>(add section)</a></span><br>"
		} else if (o == 5) {
			document.getElementById('necSynonymsbutton').style.fontWeight = ''
		}

		for (var i = 0; i < necpost.length; ++i) {
			m += "<span style='padding-left:60px;'>Gloss: <input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /> " + necheadingorder + ": ";
			for (var u = 0; u < necpost.length; ++u) {
				if (u != 0) {
					if (u != 1) {
						m += ", ";
					}
					m += "<input type=text size=5 value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() />";
				}
			}
			m += "<a href=javascript:necpost.push('');necpostbox();necfunction() title='Add " + necheadingorder.substr(0, necheadingorder.length - 1).toLowerCase() + "'>(+)</a>";
			if (necpost.length > 2) {
				m += "<a href=javascript:necpost.splice(" + (necpost.length - 1) + ",1);necpostbox();necfunction() title='Delete " + necheadingorder.substr(0, necheadingorder.length - 1).toLowerCase() + "'>(–)</a>"
			}
			m += "<a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Remove section'>(remove section)</a><br>";
		}
		if (o == 10) {
			o = 12
		}
	}

	/* DERIVED TERMS, RELATED TERMS, SEE ALSO, EXTERNAL LINKS */
	for (o = 11; o <= 17; o++) {
		if (necpost != undefined) {
			m += "<span style='padding-left:30px;'>" + necheadingorder + ": <a href=javascript:necpost.push('');necpostbox();necfunction()>(new)</a></span><br>";
		}

		for (var i = 0; i < necpost.length; ++i) {
			m += "<span style='padding-left:60px;'><input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /><a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Delete'>(–)</a><br>"
		}
		if (o == 12) {
			o = 15
		}
	}

	/* DESCENDANTS */

	if (necpost != undefined) {
		m += "<span style='padding-left:30px;'>" + necheadingorder + ": <a href=javascript:necpost.push();necpostbox();necfunction() title='Add new descendant'>(new)</a></span><br>";
	}

	for (var i = 0; i < necpost.length; ++i) {
		m += "<span style='padding-left:60px;'>Language: <input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() onblur=if (necCleanLangCode(this.value)){this.value=necCleanLangCode(this.value)};necpost=this.value;necfunction() /> Word: <input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /><a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Delete'>(–)</a><br>"
	}


	/* TRANSLATIONS */
	if (necpost != undefined) {
		m += "<span style='padding-left:30px;'>Translations section: <a href=javascript:necpost.push('');necpostbox();necfunction() title='Add translations section'>(add section)</a></span><br>"
	} else {
		document.getElementById('nectransbutton').style.fontWeight = ''
	}
	for (var i = 0; i < necpost.length; ++i) {
		m += "<span style='padding-left:60px;'>Gloss: <input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /><a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Delete'>(–)</a><br>"
	}

	if (necpost != undefined) {
		for (var i = 0; i < necpost.length; ++i) {
			m += "<span style='padding-left:30px;'>Category:<input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /><a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Remove category'>(–)</a>";
			if (i == 0) {
				m += "<a href=javascript:necpost.push('');necpostbox();necfunction() title='Add new category'>(+new category)</a>"
			}
			m += "</span><br>"
		}
	}

	if (necpost != undefined) {
		for (var i = 0; i < necpost.length; ++i) {
			m += "<span style='padding-left:30px;'>File name:<input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() />  Caption:<input type=text value='" + necpost + "' onKeyUp=necpost=this.value;necfunction() /><a href=javascript:necpost.splice(" + i + ",1);necpostbox();necfunction() title='Remove image'>(–)</a>";
			if (i == 0) {
				m += "<a href=javascript:necpost.push();necpostbox();necfunction() title='Add new image'>(+new image)</a>"
			}
			m += "</span><br>"
		}
	}

	document.getElementById('necpostbox').innerHTML = m;
}


function necfunction6(cc, dd) {
	document.getElementById('necinput' + cc + necdata).style.fontWeight = '';
	necdata = document.getElementById(dd).value;
	document.getElementById(dd).parentNode.setAttribute('ID', 'necinput' + cc + document.getElementById(dd).value);
	document.getElementById('necinput' + cc + necdata).style.fontWeight = 'bold';
}


function necfunction7(qw, er) {
	var qwe = false;

	for (var ty in qw) {
		if (er == qw) {
			qwe = true;
		}
	}

	return qwe;
}

jQuery(document).ready(function necload() {
	if (document.getElementById('necplaceholder')) {
		necfunction2();
		necdefupdate();
		necfunction();
		necfunction4();
		necfunction();
	}
});

// </nowiki>