text:
User:Koavf/monobook.js

// to prevent interpretation of template syntax

window.hotcat_translations_from_commons = true; /* This imports the latest version of HotCat from Commons. HotCat is a gadget to make changes to categories much easier. Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );

// See http://en.wikipedia.org/wiki/User:Cameltrader/Advisor.js/Description // for details and installation instructions. // // The script consists of three major parts: // * some helper functions // * the core of the user interface, including code that collects suggestions from a set of rules // * the rule implementations // // All functions, variables, and constants belonging to the script are // encapsulated in a private namespace object---``ct for ``Cameltrader: var ct = ct || {}; // == Helpers == // === DOM manipulation === // Browsers offer means to highlight text between two given offsets (``start // and ``end) in a textarea, but some of them do not automatically scroll to it. // This function is an attempt to simulate cross-browser selection and scrolling. ct.setSelectionRange = function (ta, start, end) { // Initialise static variables used within this function var _static = arguments.callee; // this is the Function we are in. It will be used as a poor man's function-local static scope. if (ta.setSelectionRange) { // Guess the vertical scroll offset by creating a		// separate hidden clone of the original textarea, filling it with the text // before ``start'' and computing its height. if (_static.NEWLINES == null) { _static.NEWLINES = '\n'; // 64 of them should be enough. for (var i = 0; i < 6; i++) { _static.NEWLINES += _static.NEWLINES; }		}		if (_static.helperTextarea == null) { _static.helperTextarea = document.createElement('TEXTAREA'); _static.helperTextarea.style.display = 'none'; document.body.appendChild(_static.helperTextarea); }		var hta = _static.helperTextarea; hta.style.display = ''; hta.style.width = ta.clientWidth + 'px'; hta.style.height = ta.clientHeight + 'px'; hta.value = _static.NEWLINES.substring(0, ta.rows) + ta.value.substring(0, start); var yOffset = hta.scrollHeight; hta.style.display = 'none'; ta.focus; ta.setSelectionRange(start, end); if (yOffset > ta.clientHeight) { yOffset -= Math.floor(ta.clientHeight / 2); ta.scrollTop = yOffset; // Opera does not support setting the scrollTop property if (ta.scrollTop != yOffset) { // todo: Warn the user or apply a workaround }		} else { ta.scrollTop = 0; }	} else { // IE incorrectly counts '\r\n' as a signle character start -= ta.value.substring(0, start).split('\r').length - 1; end -= ta.value.substring(0, end).split('\r').length - 1; var range = ta.createTextRange; range.collapse(true); range.moveStart('character', start); range.moveEnd('character', end - start); range.select; } }; // getPosition(e), observe(e, x, f), stopObserving(e, x, f), // and stopEvent(event) are inspired by the prototype.js framework // http://prototypejs.org/ ct.getPosition = function (e) { var x = 0; var y = 0; do { x += e.offsetLeft || 0; y += e.offsetTop || 0; e = e.offsetParent; } while (e); return {x: x, y: y}; }; ct.observe = function (e, eventName, f) { if (e.addEventListener) { e.addEventListener(eventName, f, false); } else { e.attachEvent('on' + eventName, f); } }; ct.stopObserving = function (e, eventName, f) { if (e.removeEventListener) { e.removeEventListener(eventName, f, false); } else { e.detachEvent('on' + eventName, f); } }; ct.stopEvent = function (event) { if (event.preventDefault) { event.preventDefault; event.stopPropagation; } else { event.returnValue = false; event.cancelBubble = true; } }; // ct.anchor is a shortcut to creating a link as a DOM node: ct.anchor = function (text, href, title) { var e = document.createElement('A'); e.href = href; e.appendChild(document.createTextNode(text)); e.title = title || ''; return e; }; // ct.link produces the HTML for a link to a Wikipedia article as a string. // It is convenient to embed in a help popup. ct.hlink = function (toWhat, text) { var wgServer = window.wgServer || 'http://en.wikipedia.org'; var wgArticlePath = window.wgArticlePath || '/wiki/$1'; var url = (wgServer + wgArticlePath).replace('$1', toWhat); return '' + (text || toWhat) + ''; }; // === Helpers a la functional programming === // A higher-order function---produces a cached version of a one-arg function. ct.makeCached = function (f) { var cache = {}; // a closure; the cache is private for f	return function (x) { return (cache[x] != null) ? cache[x] : (cache[x] = f(x)); }; }; // === Regular expressions === // Regular expressions can sometimes become inconveniently large. // In order to make complex ones easier to read, we introduce // a set of macros. Tokens enclosed with ``{ and ``} will be // replaced according to the hashtable below. // // To do the replacements, one must pass the RegExp object // through fixRegExp and use the result instead, like this: // //	var re = ct.fixRegExp(/It happened in {month}/); // // Also, for the sake of convenience, we add the "getAllMatches(re, s)" // method, which is a quick means to find all occurrences of a // regex in some text. It returns an array containing the results // of applying RegExp.exec(..). ct.REG_EXP_REPLACEMENTS = { '{letter}': // all Unicode letters // http://www.codeproject.com/dotnet/UnicodeCharCatHelper.asp '\\u0041-\\u005a\\u0061-\\u007a\\u00aa' + '\\u00b5\\u00ba\\u00c0-\\u00d6' + '\\u00d8-\\u00f6\\u00f8-\\u01ba\\u01bc-\\u01bf' + '\\u01c4-\\u02ad\\u0386\\u0388-\\u0481\\u048c-\\u0556' + '\\u0561-\\u0587\\u10a0-\\u10c5\\u1e00-\\u1fbc\\u1fbe' + '\\u1fc2-\\u1fcc\\u1fd0-\\u1fdb\\u1fe0-\\u1fec' + '\\u1ff2-\\u1ffc\\u207f\\u2102\\u2107\\u210a-\\u2113' + '\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128' + '\\u212a-\\u212d\\u212f-\\u2131\\u2133\\u2134\\u2139' + '\\ufb00-\\ufb17\\uff21-\\uff3a\\uff41-\\uff5a', '{month}': // English only '(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|'			+ 'January|February|March|April|June|July|August|September|'			+ 'October|November|December)', '{year}': '[12][0-9]{3}' }; ct.fixRegExp = function (re) { // : RegExp if (re.__fixedRE != null) { return re.__fixedRE; }	var s = re.source; for (var alias in ct.REG_EXP_REPLACEMENTS) { s = s.replace(				new RegExp(ct.escapeRegExp(alias), 'g'),				ct.REG_EXP_REPLACEMENTS[alias]		); }	re.__fixedRE = new RegExp(s); // the fixed copy is cached re.__fixedRE.global = re.global; re.__fixedRE.ignoreCase = re.ignoreCase; re.__fixedRE.multiline = re.multiline; return re.__fixedRE; }; ct.escapeRegExp = ct.makeCached(function (s) { // : RegExp	var r = '';	for (var i = 0; i < s.length; i++) {		var code = s.charCodeAt(i).toString(16);		r += '\\u' + '0000'.substring(code.length) + code;	}	return r; }); ct.getAllMatches = function (re, s) { // : Match[] var p = 0; var a = []; while (true) { re.lastIndex = 0; var m = re.exec(s.substring(p)); if (m == null) { return a;		} m.start = p + m.index; m.end = p + m.index + m[0].length; a.push(m); p = m.end; } }; // == Advisor core == // This is the basic functionality of showing and fixing suggestions. // === Global constants and variables === ct.DEFAULT_MAX_SUGGESTIONS = 8; ct.maxSuggestions = ct.DEFAULT_MAX_SUGGESTIONS; ct.suggestions; // : Suggestion[] ct.eSuggestions; // : Element; that's where suggestions are rendered ct.eAddToSummary; // : Element; the proposed edit summary appears there ct.eTextarea; // : Element; the one with id="wpTextbox1" ct.appliedSuggestions = {}; // : Map ct.scannedText = null; // remember what we scan, to check if it is                      // still the same when we try to fix it ct.BIG_THRESHOLD = 100 * 1024; ct.isBigScanConfirmed = false; // is the warning about a big article confirmed ct.isTalkPageScanConfirmed = false; ct.scanTimeoutId = null; // a timeout is set after a keystroke and before // a scan, this variable tracks its id // === int main === // This is the entry point ct.observe(window, 'load', function {	ct.eTextarea = document.getElementById('wpTextbox1');	if (ct.eTextarea == null) {		// This is not an ``?action=edit'' page		return;	}	ct.eSuggestions = document.createElement('DIV');	ct.eSuggestions.style.border = 'dashed #ccc 1px';	ct.eSuggestions.style.color = '#888';	var e = document.getElementById('editform');	while (true) {		var p = e.previousSibling;		if ( (p == null) || ((p.nodeType == 1) && (p.id != 'toolbar')) ) {			break;		}		e = p;	}	e.parentNode.insertBefore(ct.eSuggestions, e);	ct.eAddToSummary = document.createElement('DIV');	ct.eAddToSummary.style.border = 'dashed #ccc 1px';	ct.eAddToSummary.style.color = '#888';	ct.eAddToSummary.style.display = 'none';	var wpSummaryLabel = document.getElementById('wpSummaryLabel');	wpSummaryLabel.parentNode.insertBefore(ct.eAddToSummary, wpSummaryLabel);	ct.scan; // do a scan now ...	ct.observeWikiText(ct.delayScan); // ... and every time the user pauses typing }); // === Internationalisation === // ct._ is a gettext-style internationalisation helper // (http://en.wikipedia.org/wiki/gettext) // If no translation is found for the parameter, it is returned as is. // Additionally, subsequent parameters are substituted for $1, $2, and so on. ct._ = function (s) {	if (ct.translation && ct.translation[s]) {		s = ct.translation[s];	}	var index = 1;	while (arguments[index]) {		s = s.replace('$' + index, arguments[index]); // todo: replace all?		index++;	}	return s; }; // === Editor compatibility layer === // Controlling access to wpTextbox1 helps abstract out compatibility // with editors like wikEd (http://en.wikipedia.org/wiki/User:Cacycle/wikEd) ct.getWikiText = function {	if (window.wikEdUseWikEd) {		var obj = {sel: WikEdGetSelection};		WikEdParseDOM(obj, wikEdFrameBody);		return obj.plain;	}	return ct.eTextarea.value; }; ct.setWikiText = function (s) { if (window.wikEdUseWikEd) { // todo: wikEd compatibility alert(ct._('Changing text in wikEd is not yet supported.')); return; };	ct.eTextarea.value = s; }; ct.focusWikiText = function { if (window.wikEdUseWikEd) { wikEdFrameWindow.focus; return; }	ct.eTextarea.focus; }; ct.selectWikiText = function (start, end) { if (window.wikEdUseWikEd) { var obj = x = {sel: WikEdGetSelection, changed: {}}; WikEdParseDOM(obj, wikEdFrameBody); var i = 0; while ((obj.plainStart[i + 1] != null) && (obj.plainStart[i + 1] <= start)) { i++; }		var j = i;		while ((obj.plainStart[j + 1] != null) && (obj.plainStart[j + 1] <= end)) { j++; }		obj.changed.range = document.createRange; obj.changed.range.setStart(obj.plainNode[i], start - obj.plainStart[i]); obj.changed.range.setEnd(obj.plainNode[j], end - obj.plainStart[j]); WikEdRemoveAllRanges(obj.sel); obj.sel.addRange(obj.changed.range); return; }	ct.setSelectionRange(ct.eTextarea, start, end); }; ct.observeWikiText = function (callback) { // todo: wikEd compatibility ct.observe(ct.eTextarea, 'keyup', ct.delayScan); }; // === Interaction with the user === // ct.scan analyses the text and handles how the proposals are reflected in the UI. ct.scan = function (force) { ct.scanTimeoutId = null; var s = ct.getWikiText; if ((s === ct.scannedText) && !force) { return; // Nothing to do, we've already scanned the very same text }	ct.scannedText = s;	while (ct.eSuggestions.firstChild != null) { ct.eSuggestions.removeChild(ct.eSuggestions.firstChild); }	// Warn about scanning a big article if ((s.length > ct.BIG_THRESHOLD) && !ct.isBigScanConfirmed) { ct.eSuggestions.appendChild(document.createTextNode( ct._('This article is rather long. Advisor.js may consume a lot of '				+ 'RAM and CPU resources while trying to parse the text.  You could limit '				+ 'your edit to a single section, or ') ));		ct.eSuggestions.appendChild(ct.anchor( ct._('scan the text anyway.'), 'javascript: ct.isBigScanConfirmed = true; ct.scan(true); void(0);', ct._('Ignore this warning.') ));		return; }	// Warn about scanning a talk page if ((window.wgCanonicalNamespace != null)				&& /(\b|_)talk$/i.test(window.wgCanonicalNamespace)				&& !ct.isTalkPageScanConfirmed) { ct.eSuggestions.appendChild(document.createTextNode( ct._('Advisor.js is disabled on talk pages, because ' +				'it might suggest changing other users\' comments. That would be ' +				'something against talk page conventions.  If you promise to be ' +				'careful, you can ') ));		ct.eSuggestions.appendChild(ct.anchor( ct._('scan the text anyway.'), 'javascript: ct.isTalkPageScanConfirmed = true; ct.scan(true); void(0);', ct._('Ignore this warning.') ));		return; }	ct.suggestions = ct.getSuggestions(s); if (ct.suggestions.length == 0) { ct.eSuggestions.appendChild(document.createTextNode( ct._('OK \u2014 Advisor.js found no issues with the text.') // U+2014 is an mdash ));		return; }	var nSuggestions = Math.min(ct.maxSuggestions, ct.suggestions.length); ct.eSuggestions.appendChild(document.createTextNode( (ct.suggestions.length == 1) ? ct._('1 suggestion: ') : ct._('$1 suggestions: ', ct.suggestions.length) ));	for (var i = 0; i < nSuggestions; i++) { var suggestion = ct.suggestions[i]; var eA = ct.anchor(				suggestion.name,				'javascript:ct.showSuggestion(' + i + '); void(0);',				suggestion.description		); suggestion.element = eA; ct.eSuggestions.appendChild(eA); if (suggestion.replacement != null) { var eSup = document.createElement('SUP'); ct.eSuggestions.appendChild(eSup); eSup.appendChild(ct.anchor( ct._('fix'), 'javascript:ct.fixSuggestion(' + i + '); void(0);' ));		}		ct.eSuggestions.appendChild(document.createTextNode(' ')); }	if (ct.suggestions.length > ct.maxSuggestions) { ct.eSuggestions.appendChild(ct.anchor( '...', 'javascript: ct.maxSuggestions = 1000; ct.scan(true); void(0);', ct._('Show All') ));	} }; // getSuggestions returns the raw data used by scan. // It is convenient for unit testing. ct.getSuggestions = function (s) { var suggestions = []; for (var i = 0; i < ct.rules.length; i++) { var a = ct.rules[i](s); for (var j = 0; j < a.length; j++) { suggestions.push(a[j]); }	}	suggestions.sort(function (x, y) {		return (x.start < y.start) ? -1 :		      (x.start > y.start) ? 1 :		       (x.end < y.end) ? -1 :		       (x.end > y.end) ? 1 : 0;	}); return suggestions; }; // delayScan postpones the invocation of scan with a certain timeout. // If delayScan is invoked once again during that time, the original // timeout is cancelled, and another, clean timeout is started from zero. // // delayScan will normally be invoked when a key is pressed---this // prevents frequent re-scans while the user is typing. ct.delayScan = function { if (ct.scanTimeoutId != null) { clearTimeout(ct.scanTimeoutId); ct.scanTimeoutId = null; }	ct.scanTimeoutId = setTimeout(ct.scan, 500); }; // showSuggestion handles clicks on the suggestions above the edit area // This does one of two things: // * on first click---highlight the corresponding text in the textarea // * on a second click, no later than a fixed number milliseconds after the // 		first one---show the help popup ct.showSuggestion = function (k) { if (ct.getWikiText != ct.scannedText) { // The text has changed - just do another scan and don't change selection ct.scan; return; }	var suggestion = ct.suggestions[k]; var now = new Date.getTime; if ((suggestion.help != null) && (ct.lastShownSuggestionIndex === k) && (now - ct.lastShownSuggestionTime < 1000)) { // Show help var p = ct.getPosition(suggestion.element); var POPUP_WIDTH = 300; var eDiv = document.createElement('DIV'); eDiv.innerHTML = suggestion.help; eDiv.style.position = 'absolute'; eDiv.style.left = Math.max(0, Math.min(p.x, document.body.clientWidth - POPUP_WIDTH)) + 'px'; eDiv.style.top = (p.y + suggestion.element.offsetHeight) + 'px'; eDiv.style.border = 'solid ThreeDShadow 1px'; eDiv.style.backgroundColor = 'InfoBackground'; eDiv.style.fontSize = '12px'; eDiv.style.color = 'InfoText'; eDiv.style.width = POPUP_WIDTH + 'px'; eDiv.style.padding = '0.3em'; eDiv.style.zIndex = 10; document.body.appendChild(eDiv); ct.observe(document.body, 'click', function (event) {			event = event || window.event;			var target = event.target || event.srcElement;			var e = target;			while (e != null) {				if (e == eDiv) {					return;				}				e = e.parentNode;			}			document.body.removeChild(eDiv);			ct.stopObserving(document.body, 'click', arguments.callee);		}); ct.focusWikiText; return; }	ct.lastShownSuggestionIndex = k;	ct.lastShownSuggestionTime = now; ct.selectWikiText(suggestion.start, suggestion.end); }; // Usually, there is a ``fix'' link next to each suggestion. It is handled by: ct.fixSuggestion = function (k) { var s = ct.getWikiText; if (s != ct.scannedText) { ct.scan; return; }	var suggestion = ct.suggestions[k]; if (suggestion.replacement == null) { // the issue is not automatically fixable return; }	ct.setWikiText(			s.substring(0, suggestion.start)			+ suggestion.replacement			+ s.substring(suggestion.end)	); ct.selectWikiText(			suggestion.start,			suggestion.start + suggestion.replacement.length	); // Propose an edit summary unless it's a new section var editform = document.getElementById('editform'); if (!editform['wpSection'] || (editform['wpSection'].value != 'new')) { if (ct.appliedSuggestions[suggestion.name] == null) { ct.appliedSuggestions[suggestion.name] = 1; } else { ct.appliedSuggestions[suggestion.name]++; }		var a = []; for (var i in ct.appliedSuggestions) { a.push(i); }		a.sort(function (x, y) {			return (ct.appliedSuggestions[x] > ct.appliedSuggestions[y]) ? -1 :				  (ct.appliedSuggestions[x] < ct.appliedSuggestions[y]) ? 1 :				   (x < y) ? -1 : (x > y) ? 1 : 0;		}); var s = ''; for (var i = 0; i < a.length; i++) { var count = ct.appliedSuggestions[a[i]]; s += ', ' + ((count == 1) ? a[i] : (count + 'x ' + a[i])); }		// Cut off the leading ``,  and add ``formatting:  and ``using Advisor.js'' s = ct._(				'formatting: $1 (using Advisor.js)',				s.substring(2)		); // Render in DOM while (ct.eAddToSummary.firstChild != null) { ct.eAddToSummary.removeChild(ct.eAddToSummary.firstChild); }		ct.eAddToSummary.style.display = ''; ct.eAddToSummary.appendChild(ct.anchor( ct._('Add to summary'), 'javascript:ct.addToSummary(unescape("' + escape(s) + '"));', ct._('Append the proposed summary to the input field below') ));		ct.eAddToSummary.appendChild(document.createTextNode(': "' + s + '"')); }	// Re-scan immediately ct.scan; }; // The mnemonics of the accepted suggestions are accumulated in ct.appliedSuggestions // and the user is presented with a sample edit summary. If she accepts it, // addToSummary gets called. ct.addToSummary = function (summary) { var wpSummary = document.getElementById('wpSummary'); if (wpSummary.value != '') { summary = wpSummary.value + '; ' + summary; }	if ((wpSummary.maxLength > 0) && (summary.length > wpSummary.maxLength)) { alert(ct._( 'Error: If the proposed text is added to the summary, ' + 'its length will exceed the $1-character maximum by $2 characters.', /* $1 = */ wpSummary.maxLength, /* $2 = */ summary.length - wpSummary.maxLength ));		return; }	wpSummary.value = summary; ct.eAddToSummary.style.display = 'none'; }; // == Rules == // This chapter contains the ``rules'' that produce suggestions---this is where // most of the load resides. Each rule is a javascript function that accepts a // string as a parameter (the wikitext of the page being edited) and returns an // array of ``suggestion'' objects. A suggestion object must have the following // properties: // * start---the 0-based inclusive index of the first character to be replaced // * end---analogous to start, but exclusive // * replacement---the proposed wikitext // * name---this is what appears at the top of the page // * description---used as a tooltip for the name of the suggestion // The set of rules to apply depends on the content language. Different // languages have different formatting conventions, therefore this is not // a matter of internationalisation like the UI core, but of unrelated // implementations. What follows is the implementation for the English-language // Wikipedia. if (!window.wgContentLanguage || (window.wgContentLanguage === 'en')) { // from this line on, a level of indent is spared // The rules are stored in an array: ct.rules = []; // : Function[] // and are grouped into categories. // === Linking rules === ct.rules.push(function (s) {	var re = /\[\[([{letter} ,\(\)\-]+)\|\1\]\]/g;	re = ct.fixRegExp(re);	var a = ct.getAllMatches(re, s);	for (var i = 0; i < a.length; i++) {		var m = a[i];		a[i] = {				start: m.start,				end: m.end,				replacement:  + m[1] + ,				name: 'A|A',				description: '"A|A" can be simplified to A.',				help: ct.hlink('WP:Syntax#Wiki_markup', 'MediaWiki syntax')					+ ' allows links of the form A|A to be abbreviated as A. '		};	}	return a; }); ct.rules.push(function (s) {	var re = /\[\[([{letter} ,\(\)\-]+)\|\1([{letter}]+)\]\]/g;	re = ct.fixRegExp(re);	var a = ct.getAllMatches(re, s);	for (var i = 0; i < a.length; i++) {		var m = a[i];		a[i] = {				start: m.start,				end: m.end,				replacement:  + m[1] +  + m[2],				name: 'A|AB',				description: '"A|AB" can be simplified to AB.',				help: ct.hlink('WP:Syntax#Wiki_markup', 'MediaWiki syntax')					+ ' allows links of the form A|AB to be abbreviated as AB.'		};	}	return a; }); ct.rules.push(function (s) {	// Initialise statics	var _static = arguments.callee;	if (_static.MONTH_MAP == null) {		_static.MONTH_MAP = {				Jan: 'January', Feb: 'February', Mar: 'March', Apr: 'April', May: 'May',				Jun: 'June', Jul: 'July', Aug: 'August', Sep: 'September', Oct: 'October',				Nov: 'November', Dec: 'December', January: 'January', February: 'February',				March: 'March', April: 'April', June: 'June', July: 'July',				August: 'August', September: 'September', October: 'October',				November: 'November', December: 'December'		};	}	// This will match either a date+year or just a year, and will not match solitary dates.	// If the year is part of an ISO date of the form yyyy-mm-dd, the remainder is included.	// The rule only controls the transition from linked to unlinked, as practice has shown	// that improper linking is significantly more common than leaving linkable dates as plain text. var re = /(?:\[\[((?:(\d\d?) +({month}))|(?:({month}) +(\d\d?)))\]\],?? *)?\[\[({year})\]\](-\[\[\d\d-\d\d\]\])?/; re = ct.fixRegExp(re); var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; var date = m[1] || null; var year = m[7] || null; if (date == null) { if (!m[8]) { // protect ISO dates---m[8] is the ISO remainder b.push({						start: m.start,						end: m.end,						replacement: year,						name: 'year link',						description: 'Convert link to normal text',						help: 'It is useless to link a year unless it is preceded by a day and month.'							+ ' Years with a day and month are normally linked so that the user '							+ 'preferences for date format can be applied, but linking a year alone '							+ 'has no effect.'				}); }		} else { var isAmerican = !m[2]; var day = (isAmerican) ? m[5] : m[2]; var month = _static.MONTH_MAP[(isAmerican) ? m[4] : m[3]]; var ws = m[6] || ''; // whitespace between date and year var replacement = (isAmerican) ? ( + month + ' ' + day + ',' + ws +  + year + '') : ( + day + ' ' + month +  + ws +  + year + ); if (replacement != m[0]) { b.push({						start: m.start,						end: m.end,						replacement: replacement,						name: 'date format',						description: 'Fix date format',						help: 'Commas in dates should follow one of these styles: '								+ '1 January 1970 '								+ 'January 1, 1970 '								+ 'and month names should not be abbreviated.'				}); }		}	}	return b; }); ct.rules.push(function (s) { // Matches decades in the range 1000s ... 2990s, // linked either as xxx0s or as xxx0s var re = /\[\[([12][0-9][0-9]0)(\]\]s\b|'?s\]\])/g; var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start, end: m.end, replacement: m[1] + 's', name: 'decade link', description: 'Convert link to normal text', help: 'Decades should not be linked, unless they deepen the ' + 'readers\' understanding of the topic.' };	}	return a; }); ct.rules.push(function (s) { // Matches decades in the range 1000s ... 2990s var re = /\bthe +([12][0-9][0-9]0)'s\b/g; var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start, end: m.end, replacement: m[1] + 's', name: 'decade format', description: 'Remove the apostrophe from the decade', help: 'The preferred decade format is without an apostrophe, per ' + ct.hlink('WP:DATE#Longer_periods') + '.' };	}	return a; }); ct.rules.push(function (s) { var re = /\[\[([0-9]{1,2}(st|nd|rd|th) century)\]\]/g var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start, end: m.end, replacement: m[1], name: 'century link', description: 'Convert link to normal text', help: 'Centuries should not be linked, unless they deepen the ' + 'readers\' understanding of the topic.' };	}	return a; }); // === Character formatting rules === ct.rules.push(function (s) { var a = ct.getAllMatches(/ +$/gm, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; if (/^[=\|]$/.test(s[m.start - 1])) { // this can be tolerated, it happens too often in templates continue; }		b.push({				start: m.start,				end: m.end,				replacement: '',				name: 'whitespace',				description: 'Delete trailing whitespace',				help: 'Trailing whitespace at the end of a line is unnecessary.'		}); }	return b; }); ct.rules.push(function (s) { var re = /[{letter}]( +- +)[{letter}]/g; re = ct.fixRegExp(re); var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; // Be careful not to break wikilinks. If we find a ']' before we find an '['---drop the suggestion. var rightContext = s.substring(m.end); var indexOfOpening = rightContext.indexOf('['); var indexOfClosing = rightContext.indexOf(']'); if ((indexOfClosing != -1)				&& ((indexOfOpening == -1) || (indexOfOpening > indexOfClosing))) { continue; }		b.push({				start: m.start + 1,				end: m.end - 1,				replacement: ' \u2014 ', // U+2014 is an mdash				name: 'mdash',				description: 'In a sentence, a hyphen surrounded by spaces means almost certainly an mdash.'		}); }	return b; }); ct.rules.push(function (s) { var re = /[^0-9]({year}) *(?:-|\u2014|—|--) *({year})[^0-9]/g; // U+2014 is an mdash var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start + 1, end: m.end - 1, replacement: m[1] + '\u2013' + m[2], // U+2013 is an ndash name: 'ndash', description: 'Year ranges look better with an n-dash.' };	}	return a; }); ct.rules.push(function (s) { var re = / (\u2014|\u2013|—|–)/g; // an m/ndash surrounded by normal spaces var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start, end: m.end, replacement: ' ' + m[1], // a non-breaking space and the dash name: 'nbsp-dash', description: 'Put a non-breaking space before the dash', help: 'Putting a ' + ct.hlink('non-breaking space') + ' (&nbsp;</tt>) before a dash would ' + 'prevent the user agent from wrapping it at the beginning of the next line.' };	}	return a; }); ct.rules.push(function (s) { var a = ct.getAllMatches(		/(\{\{\s*(?:IPA[0-3]?|IPAAusE|IPAEng|IPAHe|[Pp]ronAusE|[Pp]ronEng|[Pp]ronounced)\s*\|\s*)([^\|\}]+)/gi, s	); var b = []; var ipaSubstitions = { ':': {					replacement: '\u02d0', // U+02D0 is a ``Modifier letter triangular colon'' (used to denote vowel lengthening in IPA) additionalHelp: " In this case the triangular colon (``\u02d0'', <tt>U+02D0</tt>), " + "used to denote vowel lengthening, looks like a regular colon (``:'', <tt>U+003A</tt>)." },			'\: {					replacement: '\u02c8', // U+02C8 is a ``Modifier letter vertical line (put before a stresses syllable) additionalHelp: " In this case the vertical line (``\u02c8'', <tt>U+02c8</tt>), " + " which is put before a stressed syllable, looks like an apostrophe (`` ' '', <tt>U+0027</tt>)." }	};	for (var i = 0; i < a.length; i++) { var m = a[i]; var ipaText = m[2]; for (var j = 0; j < ipaText.length; j++) { var ch = ipaText[j]; if (ipaSubstitions[ch] != null) { b.push({						start: m.start + m[1].length + j,						end: m.start + m[1].length + j + 1,						replacement: ipaSubstitions[ch].replacement,						name: 'IPA character',						description: "Replace ``false friend with the correct IPA character",						help: 'The correct IPA character '							+ ct.hlink('WP:IPA#Entering_IPA_characters', 'should be used')							+ " instead of its ``false friend."							+ ' Unicode contains a reserved range of characters for '							+ ct.hlink('International Phonetic Alphabet', 'IPA')							+ ' transcription. Some of them look very similar to other, '							+ 'more commonly used, alphabetic or punctuation characters (' + ct.hlink('False friend', 'false friends') + ').' + (ipaSubstitions[ch].additionalHelp || '')				}); }		}	}	return b; }); ct.rules.push(function (s) { var re = /&#(([1-9][0-9]{0,4})|x([a-fA-F0-9]{1,4}));/g; var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; var charCode = (m[2]) ? parseInt(m[2]) : parseInt(m[3], 16); if ((charCode < 128) || (charCode > 0xffff)) { continue; }		var ch = String.fromCharCode(charCode); var chHex = charCode.toString(16).toUpperCase; chHex = '0000'.substring(chHex.length) + chHex; b.push({				start: m.start,				end: m.end,				replacement: ch,				name: 'unicode-escape',				description: 'Replace with an inline Unicode character',				help: ct.hlink('WP:EDIT#Character_formatting', 'HTML-style escapes')					+ " like ``<tt>&#" + m[1]					+ ";</tt> can be written inline using a Unicode character—in this case ``"					+ ch + " (<tt>U+" + chHex + "</tt>)."		}); }	return b; }); ct.rules.push(function (s) { var re = /&([A-Za-z]+);/g; var a = ct.getAllMatches(re, s); var b = []; // Use a DOM element and its innerHTML property to do // the unescaping, let the browser do the dirty job. var e = document.createElement('DIV'); for (var i = 0; i < a.length; i++) { var m = a[i]; if (m[1] == 'nbsp') { // Opera incorrectly replaces nbsp-s with regular spaces: // http://en.wikipedia.org/w/index.php?title=User_talk%3ACameltrader&diff=179233698&oldid=175946199 continue; }		e.innerHTML = m[0]; var ch = e.innerHTML; if (ch.length != 1) { // The entity is not a single Unicode character---ignore it			continue; }		var chHex = ch.charCodeAt(0).toString(16).toUpperCase; chHex = '0000'.substring(chHex.length) + chHex; b.push({				start: m.start,				end: m.end,				replacement: e.innerHTML, // the entity, unescaped				name: 'HTML entity',				description: 'Replace with an inline Unicode character',				help: ct.hlink('WP:EDIT#Character_formatting', 'HTML-style escapes')					+ " like ``<tt>&" + m[1]					+ ";</tt> can be written inline using a Unicode character—in this case ``"					+ ch + " (<tt>U+" + chHex + "</tt>)."		}); }	return b; }); ct.rules.push(function (s) { var a = ct.getAllMatches(/\u2026/g, s); // ellipsis var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; b.push({				start: m.start,				end: m.end,				replacement: '...',				name: 'ellipsis',				description: 'Replace ellipsis with three periods/full stops',				help: "The ellipsis character (``\u2026'', U+2026) should be replaced with "					+ "three periods/full stops per "					+ ct.hlink('WP:MOS#Ellipses')		}); }	return b; }); ct.rules.push(function (s) { var a = ct.getAllMatches(/\b(NOT)\b/g, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; if ((s.substring(m.start - 2, m.start) == "")				&& (s.substring(m.end, m.end + 2) == "")) { continue; }		var noMoreLinksRemainder = ' A COLLECTION OF LINKS NOR SHOULD IT BE USED FOR'; if (s.substring(m.end, m.end + noMoreLinksRemainder.length) === noMoreLinksRemainder) { // Tolerate subst'ed Template:NoMoreLinks continue; }		b.push({				start: m.start,				end: m.end,				replacement: "not",				name: 'all-caps',				description: 'Change to lowercase',				help: 'According to the ' + ct.hlink('WP:MOS#Capital_letters', 'Manual of Style')					+ ', the word  + m[1].toLowerCase +  should be italicised instead '					+ 'of being written in all caps.'		}); }	return b; }); // === Template usage rules === ct.rules.push(function (s) { // Initialise statics var _static = arguments.callee; if (_static.LANGUAGE_MAP == null) { _static.LANGUAGE_MAP = { // : Hashtable<String, String> // From http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes // Note, that not all of these have a lang-xx template, but finding a reference // to such a language is a good reason to create the template. aa: 'Afar', ab: 'Abkhazian', ae: 'Avestan', af: 'Afrikaans', ak: 'Akan', am: 'Amharic', an: 'Aragonese', ar: 'Arabic', as: 'Assamese', av: 'Avaric', ay: 'Aymara', az: 'Azerbaijani', ba: 'Bashkir', be: 'Belarusian', bg: 'Bulgarian', bh: 'Bihari', bi: 'Bislama', bm: 'Bambara', bn: 'Bengali', bo: 'Tibetan', br: 'Breton', bs: 'Bosnian', ca: 'Catalan', ce: 'Chechen', ch: 'Chamorro', co: 'Corsican', cr: 'Cree', cs: 'Czech', cu: 'Church Slavic', cv: 'Chuvash', cy: 'Welsh', da: 'Danish', de: 'German', dv: 'Divehi', dz: 'Dzongkha', ee: 'Ewe', el: 'Greek', en: 'English', eo: 'Esperanto', es: 'Spanish', et: 'Estonian', eu: 'Basque', fa: 'Persian', ff: 'Fulah', fi: 'Finnish', fj: 'Fijian', fo: 'Faroese', fr: 'French', fy: 'Western Frisian', ga: 'Irish', gd: 'Gaelic', gl: 'Galician', gn: 'Guaran\u00ed', gu: 'Gujarati', gv: 'Manx', ha: 'Hausa', he: 'Hebrew', hi: 'Hindi', ho: 'Hiri Motu', hr: 'Croatian', ht: 'Haitian', hu: 'Hungarian', hy: 'Armenian', hz: 'Herero', ia: 'Interlingua (International Auxiliary Language Association)', id: 'Indonesian', ie: 'Interlingue', ig: 'Igbo', ii: 'Sichuan Yi', ik: 'Inupiaq', io: 'Ido', is: 'Icelandic', it: 'Italian', iu: 'Inuktitut', ja: 'Japanese', jv: 'Javanese', ka: 'Georgian', kg: 'Kongo', ki: 'Kikuyu', kj: 'Kuanyama', kk: 'Kazakh', kl: 'Kalaallisut', km: 'Khmer', kn: 'Kannada', ko: 'Korean', kr: 'Kanuri', ks: 'Kashmiri', ku: 'Kurdish', kv: 'Komi', kw: 'Cornish', ky: 'Kirghiz', la: 'Latin', lb: 'Luxembourgish', lg: 'Ganda', li: 'Limburgish', ln: 'Lingala', lo: 'Lao', lt: 'Lithuanian', lu: 'Luba-Katanga', lv: 'Latvian', mg: 'Malagasy', mh: 'Marshallese', mi: 'M\u0101ori', mk: 'Macedonian', ml: 'Malayalam', mn: 'Mongolian', mo: 'Moldavian', mr: 'Marathi', ms: 'Malay', mt: 'Maltese', my: 'Burmese', na: 'Nauru', nb: 'Norwegian Bokm\u00e5l', nd: 'North Ndebele', ne: 'Nepali', ng: 'Ndonga', nl: 'Dutch', nn: 'Norwegian Nynorsk', no: 'Norwegian', nr: 'South Ndebele', nv: 'Navajo', ny: 'Chichewa', oc: 'Occitan', oj: 'Ojibwa', om: 'Oromo', or: 'Oriya', os: 'Ossetian', pa: 'Panjabi', pi: 'P\u0101li', pl: 'Polish', ps: 'Pashto', pt: 'Portuguese', qu: 'Quechua', rm: 'Raeto-Romance', rn: 'Kirundi', ro: 'Romanian', ru: 'Russian', rw: 'Kinyarwanda', sa: 'Sanskrit', sc: 'Sardinian', sd: 'Sindhi', se: 'Northern Sami', sg: 'Sango', sh: 'Serbo-Croatian', si: 'Sinhala', sk: 'Slovak', sl: 'Slovenian', sm: 'Samoan', sn: 'Shona', so: 'Somali', sq: 'Albanian', sr: 'Serbian', ss: 'Swati', st: 'Southern Sotho', su: 'Sundanese', sv: 'Swedish', sw: 'Swahili', ta: 'Tamil', te: 'Telugu', tg: 'Tajik', th: 'Thai', ti: 'Tigrinya', tk: 'Turkmen', tl: 'Tagalog', tn: 'Tswana', to: 'Tonga', tr: 'Turkish', ts: 'Tsonga', tt: 'Tatar', tw: 'Twi', ty: 'Tahitian', ug: 'Uighur', uk: 'Ukrainian', ur: 'Urdu', uz: 'Uzbek', ve: 'Venda', vi: 'Vietnamese', vo: 'Volap\u00fck', wa: 'Walloon', wo: 'Wolof', xh: 'Xhosa', yi: 'Yiddish', yo: 'Yoruba', za: 'Zhuang', zh: 'Chinese', zu: 'Zulu' };		_static.REVERSE_LANGUAGE_MAP = {}; // : Hashtable<String, String> for (var i in _static.LANGUAGE_MAP) { _static.REVERSE_LANGUAGE_MAP[_static.LANGUAGE_MAP[i]] = i;		} }	// U+201e and U+201c are opening and closing double quotes // U+2013 and U+2014 are an ndash and an mdash var re = /\[\[(\w+) language\|\1\]\] *: (\'+)*([{letter} \"\'\u201e\u201c\/\u2014\u2013\-]+)(?:\2)/g;	re = ct.fixRegExp(re);	var a = ct.getAllMatches(re, s);	var b = [];	for (var i = 0; i < a.length; i++) {		var m = a[i];		if (_static.REVERSE_LANGUAGE_MAP[m[1]] == null) {			continue;		}		var code = _static.REVERSE_LANGUAGE_MAP[m[1]];		// Markers for italics and bold are stripped off		b.push({				start: m.start,				end: m.end,				replacement: ,				name: 'lang-' + code,				description: 'Apply the template',				help: 'The <tt>' + ct.hlink('Template:lang-' + code, )					+ '</tt> template can be applied for this text.'					+ ' Similar templates are available in the '					+ ct.hlink('Category:Multilingual_support_templates', 'multilingual support templates category')					+ '.'		});	}	return b; }); ct.rules.push(function (s) {	var re = /^[ ':]*(?:Main +article)[ ']*:[ ']*\[\[([^\]]+)\]\][ ']*$/mig; var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; if ((m[1] != null) && (m[1] != "")) { b.push({					start: m.start,					end: m.end,					replacement: ,					name: 'template-main',					description: 'Use the template',					help: 'Template <tt>' + ct.hlink('Template:Main', )						+ '</tt> can be used in this place.'			}); }	}	return b; }); ct.rules.push(function (s) { var re = /^[ ':]*(?:(?:Further|More) +info(?:rmation)?)[ ']*:[ ']*\[\[([^\]]+)\]\][ ']*$/mig; var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; if ((m[1] != null) && (m[1] != '')) { b.push({					start: m.start,					end: m.end,					replacement: ,					name: 'template-further',					description: 'Use the template',					help: 'Template <tt>' + ct.hlink('Template:Further', )						+ '</tt> can be used in this place.'			}); }	}	return b; }); ct.rules.push(function (s) { var exceptions = {}; var wgTitle = window.wgTitle || ''; if (exceptions[wgTitle]) { return []; }	var re0 = /^([{letter}\-]+(?: [{letter}\-]+\.?)?) ([{letter}\-]+(?:ov|ev|ski))$/; re0 = ct.fixRegExp(re0); var m0 = re0.exec(wgTitle); if (m0 == null) { return []; }	if (s.indexOf('DEFAULTSORT:') != -1) { return []; }	var firstNames = m0[1]; var lastName = m0[2]; var re1 = new RegExp(			'\\[\\[(Category:[\\w _\\(\\),\\-]+)\\| *'			+ ct.escapeRegExp(lastName) + ', *'			+ ct.escapeRegExp(firstNames)			+ ' *\\]\\]', 'gi'	); var a = ct.getAllMatches(re1, s); if (a.length == 0) { return []; }	var aStart = a[0].start; var aEnd = a[a.length - 1].end; var original = s.substring(aStart, aEnd); var replacement = '\n' + original.replace(re1, '$1'); return [{ start: aStart, end: aEnd, replacement: replacement, name: 'default-sort', description: 'Use DEFAULTSORT to specify the common sort key', help: 'The <tt>' + ct.hlink('Help:Categories#Default_sort_key', 'DEFAULTSORT') + '</tt> magic word can be used to specify sort keys for categories. It was ' + ct.hlink('Wikipedia:Wikipedia_Signpost/2007-01-02/Technology_report',							'announced in January 2007') + '.'	}]; }); ct.rules.push(function (s) { var wgTitle = window.wgTitle || ''; var reTitle = /^(a|the) (.*)$/i; if (!reTitle.test(wgTitle) || (s.indexOf('DEFAULTSORT') !== -1)) { return []; }	var a = ct.getAllMatches(/(\[\[)[Cc]ategory:[^\]]+\]\]/g, s); if (a.length === 0) { return []; }	var mTitle = ct.getAllMatches(reTitle, wgTitle)[0]; // the match object for the title var article = mTitle[1]; var nounPhrase = mTitle[2]; var highlightStart = a[0].start; var highlightEnd = a[a.length - 1].end; return [{ start: highlightStart, end: highlightEnd, replacement: '\n' + s.substring(highlightStart, highlightEnd), name: 'defaultsort-' + article.toLowerCase, description: 'Add DEFAULTSORT', help: "Articles starting with ``a or ``the should participate in categories without the first word." }]; }); ct.rules.push(function (s) { var re = /(\{\{\s*)DEFAULTSORT\s*\|/g; var a = ct.getAllMatches(re, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; b.push({				start: m.start,				end: m.end,				replacement: m[1] + 'DEFAULTSORT:',				name: 'default-sort-magic-word',				description: 'Replace the template with a magic word',				help: 'Usage of the <tt></tt> template is discouraged. The magic word with the same name should be used instead.'		}); }	return b; }); ct.rules.push(function (s) { var _static = arguments.callee; if (_static.DEPRECATED_TEMPLATES_ARRAY == null) { _static.DEPRECATED_TEMPLATES_ARRAY = [ 'ArB', 'ArTranslit', 'ArabDIN', 'BridgeType', 'CFB Coaching Record End', 'CFB Coaching Record Entry', 'CFB Coaching Record Start', 'CFB Coaching Record Team', 'CFB Coaching Record Team End', 'CURRENTWEEKDAY', 'Canada CP 2001', 'CelsiusToKelvin', 'Chembox', 'Chembox simple inorganic', 'Chembox simple organic', 'Chinesename', 'ConvertVolume', 'ConvertWeight', 'Country', 'Cultivar hybrid', 'Dated episode notability', 'Doctl', 'Dynamic navigation box', 'Dynamic navigation box with image', 'Dynamic navigation small', 'Episode-unreferenced', 'Extra album cover', 'Extra chronology', 'Fa', 'Factor', 'Fn', 'Fnb', 'Football stadium', 'Footnote', 'GUE', 'Geolinks-US-loc', 'Getamap', 'Harvard reference', 'Hiddenkey', 'IAST-hi', 'IAST1', 'ISOtranslit', 'Iftrue', 'Illinois Area Codes', 'Infobox Minor Planet', 'Infobox Ship', 'Infobox music venue', 'Ivrit', 'JER', 'Lang-yi2', 'Lang2iso', 'LangWithNameNoItals', 'Latinx', 'Military-Insignia', 'Mmuk mapdet', 'Mmuk mapho25', 'Mmuk maphot', 'Mmuknr map', 'Mmuknr photo', 'Mmukpc prim', 'Navbox generic', 'Navigation', 'Navigation box with image', 'Navigation no hide', 'Navigation with columns', 'Navigation with image', 'NavigationBox', 'Novelinfoboxincomp', 'Novelinfoboxneeded', 'OldVGpeerreview', 'Ordinal date', 'PD-LOC', 'PIqaD', 'Pekinensis tail familia Amaranthaceae', 'Pekinensis tail genus Chenopodium', 'Pekinensis tail regnum Plantae', 'PerB', 'PerTranslit', 'Pound avoirdupois', 'Prettyinfobox', 'Prettytable', 'Qif', 'Rating-10', 'Rating-3', 'Rating-4', 'Rating-5', 'Rating-6', 'Ref num', 'Reqimage', 'Rewrite-section', 'Ruby', 'Sectionrewrite', 'Semxlit', 'Skyscraper', 'Sortdate', 'Source', 'Storm pics', 'Supertribus', 'Switch', 'Tablabonita', 'Taxobox superregnum entry', 'Taxobox supertribus entry', 'IPA fonts', 'Unicode fonts', 'User R-proglang', 'User asm', 'User cobol', 'User css', 'User haskell', 'User html', 'User java', 'User mobile', 'User programming', 'User unicode', 'User xhtml', 'User xml', 'Tfd-kept', 'Timeline infobox finish', 'Timeline infobox start', 'Translit-yi2', 'WAFerry', 'Weight' ];		_static.DEPRECATED_TEMPLATES_SET = {}; for (var i = _static.DEPRECATED_TEMPLATES_ARRAY.length - 1; i >= 0; i--) { _static.DEPRECATED_TEMPLATES_SET[_static.DEPRECATED_TEMPLATES_ARRAY[i]] = true; }	}	var a = ct.getAllMatches(ct.fixRegExp(/(\{\{\s*)([{letter}0-9\s\-]+)(\s*(\||\}\}))/g), s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; var name = m[2].replace(/ /g, '_'); name = name.charAt(0).toUpperCase + name.substring(1); if (_static.DEPRECATED_TEMPLATES_SET[name]) { b.push({					start: m.start,					end: m.end,					name: 'deprecated-template',					description: 'Template has been deprecated',					help: 'Template <tt>' + ct.hlink('Template:' + name, '')						+ ' is ' + ct.hlink('Category:Deprecated templates', 'deprecated')						+ '.  Consider using another one as recommended on the template page.'			}); }	}	return b; }); // === Other rules === ct.rules.push(function (s) { var re = /^(?: *)(==+)( *)([^=]*[^= ])( *)\1/gm; var a = ct.getAllMatches(re, s); if (a.length == 0) { return []; }	var b = []; var level = 0; // == Level 1 ==, === Level 2 ===, ==== Level 3 ====, etc.	var editform = document.getElementById('editform'); // If we are editing a section, we have to be tolerant to the first heading's level var isSection = editform && (editform['wpSection'] != null) && (editform['wpSection'].value != ''); // Count spaced and non-spaced headings to find out the majority var counters = {spaced: 0, nonSpaced: 0, unclear: 0}; for (var i = 0; i < a.length; i++) { var m = a[i]; counters[(!m[2] && !m[4]) ? 'nonSpaced' : (m[2] && m[4]) ? 'spaced' : 'unclear']++; }	var predominantSpacingStyle; if (counters.spaced > counters.nonSpaced) { predominantSpacingStyle = 'spaced'; } else if (counters.spaced < counters.nonSpaced) { predominantSpacingStyle = 'nonSpaced'; } else { predominantSpacingStyle = 'unclear'; // We cannot decide which spacing style is predominant, // so we show a suggestion attached to the first heading, // recommending consistent spacing: b.push({				start: a[0].start,				end: a[0].end,				replacement: null,				name: 'heading',				description: 'Consider using consistent heading spacing',				help: 'Heading style should be either '					+ "``<tt>== Heading ==</tt> or ``<tt>==Heading==</tt>. "					+ "Headings in this article use an equal number of both.  "					+ "Consider choosing a heading style and using it consistently."		}); }	var titleSet = {}; // a set of title names, will be used to detect duplicates for (var i = 0; i < a.length; i++) { var m = a[i]; if (m[2] != m[4]) { var spacer = (predominantSpacingStyle == 'spaced') ? ' ' : (predominantSpacingStyle == 'nonSpaced') ? '' : m[2]; b.push({					start: m.start,					end: m.end,					replacement: m[1] + spacer + m[3] + spacer + m[1],					name: 'heading',					description: 'Fix whitespace',					help: 'Heading style should be either '						+ "``<tt>== Heading ==</tt> or ``<tt>==Heading==</tt>."			}); } else if ((m[2] && (predominantSpacingStyle == 'nonSpaced'))		      || (!m[2] && (predominantSpacingStyle == 'spaced'))) { var spacer = (m[2]) ? '' : ' ';			b.push({					start: m.start,					end: m.end,					replacement: m[1] + spacer + m[3] + spacer + m[1],					name: 'heading-style',					description: 'Conform to the existing majority of '						+ ((m[2]) ? 'non-spaced' : 'spaced') + ' headings',					help: 'There are two styles of writing headings in wikitext:<tt><ul><li>== Spaced ==<li>==Non-spaced==</ul>'						+ 'Most of the headings in this article are '						+ ((m[2]) ? 'non-spaced' : 'spaced')						+ ' (' + counters.spaced + ' vs ' + counters.nonSpaced + ').  '						+ 'It is recommended that you adapt your style to the majority.'			}); }		var oldLevel = level; level = m[1].length - 1; if ( (level - oldLevel > 1) && (!isSection || (oldLevel > 0)) ) { var h = '======='.substring(0, oldLevel + 2); b.push({					start: m.start,					end: m.end,					replacement: h + m[2] + m[3] + m[2] + h,					name: 'heading-nesting',					description: 'Fix improper nesting',					help: 'A heading ' + ct.hlink('WP:MOS#Section_headings', 'should be')						+ ' nested one level deeper than its parent heading.'			}); }		var frequentMistakes = [ { code: 'see-also', wrong: /^see *al+so$/i,          correct: 'See also' }, { code: 'ext-links', wrong: /^external links?$/i,    correct: 'External links' }, { code: 'refs',     wrong: /^ref+e?r+en(c|s)es?$/i,  correct: 'References' } ];		for (var j = 0; j < frequentMistakes.length; j++) { var fm = frequentMistakes[j]; if (fm.wrong.test(m[3]) && (m[3] != fm.correct)) { var r = m[1] + m[2] + fm.correct + m[2] + m[1]; if (r != m[0]) { b.push({							start: m.start,							end: m.end,							replacement: r,							name: fm.code,							description: 'Change to ``' + fm.correct + ".",							help: 'The correct spelling/capitalisation is ``<tt>' + fm.correct + "</tt>."					}); }			}		}		if (titleSet[m[3]] != null) { b.push({					start: m.start + (m[1] || ).length + (m[2] || ).length,					end: m.start + (m[1] || ).length + (m[2] || ).length + m[3].length,					replacement: null, // we cannot propose anything, it's the editor who has to choose a different title					name: 'duplicate-title',					description: 'Avoid duplicate section titles',					help: 'Section names '						+ ct.hlink('WP:MOS#Section_headings', 'should preferably be unique')						+ ' within a page; this applies even for the names of subsections.'			}); }		titleSet[m[3]] = true; }	return b; }); ct.rules.push(function (s) { // U+2013 and U+2014 are an ndash and an mdash var re = /\( *(?:b\.? *)?({year}) *(?:[\-\\u2013\\u2014]|–|—|--) *\)/g; var a = ct.getAllMatches(re, s); for (var i = 0; i < a.length; i++) { var m = a[i]; a[i] = { start: m.start, end: m.end, replacement: '(born ' + m[1] + ')', name: 'born', description: 'The word \'born\' should be fully written.', help: 'According to ' + ct.hlink('WP:DATE#Dates_of_birth_and_death', 'WP:DATE') + ', the word born should be fully written.' };	}	return a; }); ct.rules.push(function (s) { // ISBN: ten or thirteen digits, each digit optionally followed by a hyphen, the last digit can be 'X' or 'x' var a = ct.getAllMatches(/ISBN *=? *(([0-9Xx]-?)+)/gi, s); var b = []; for (var i = 0; i < a.length; i++) { var m = a[i]; var s = m[1].replace(/[^0-9Xx]+/g, '').toUpperCase; // remove all non-digits if ((s.length !== 10) && (s.length !== 13)) { b.push({					start: m.start,					end: m.end,					name: 'ISBN',					description: 'Should be either 10 or 13 digits long',					help: 'ISBN numbers should be either 10 or 13 digits long. '							+ 'This one consists of ' + s.length + ' digits: <tt>' + m[1] + '</tt>'			}); continue; }		var isNew = (s.length === 13); // old (10 digits) or new (13 digits) var xIndex = s.indexOf('X'); if ((xIndex !== -1) && ((xIndex !== 9) || isNew)) { b.push({					start: m.start,					end: m.end,					name: 'ISBN',					description: 'Improper usage of X as a digit',					help: "``<tt>X</tt>'' can only be used in 10-digit ISBN numbers "							+ ' as the last digit: <tt>' + m[1] + '</tt>'			}); continue; }		var computedChecksum = 0; var modulus = (isNew) ? 10 : 11;		for (var j = s.length - 2; j >= 0; j--) { var digit = s.charCodeAt(j) - 48; // 48 is the ASCII code of '0' var quotient = (isNew) ? ((j & 1) ? 3 : 1) // the new way: 1 for even, 3 for odd : (10 - j);        // the old way: 10, 9, 8, etc computedChecksum = (computedChecksum + (quotient * digit)) % modulus; }		computedChecksum = (modulus - computedChecksum) % modulus; var c = s.charCodeAt(s.length - 1) - 48; var actualChecksum = ((c < 0) || (9 < c)) ? 10 : c;		if (computedChecksum === actualChecksum) { continue; }		b.push({				start: m.start,				end: m.end,				name: 'ISBN',				description: 'Bad ISBN checksum',				help: 'Bad ISBN checksum for <tt>' + m[1] + '</tt> '		}); }	return b; }); } // end if (window.wgContentLanguage === 'en') // Search box for Mediawiki // (c) 2006 User:Zocky, released under GPL mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.css&action=raw&ctype=text/css', 'text/css'); var sr$t; var sr$f; var sr$s; var sr$r; var sr$w; var sr$i; var sr$re; var sr$mc; function $e(id) {return document.getElementById(id)} function srBack { if (sr$s.value=='') {sr$t.focus; return }  if (sr$re.checked) {    var searchString = sr$s.value;  } else {    searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1');  }  searchString="("+searchString+")(?![\\s\\S]*"+searchString+")";  if (sr$mc.checked)    var re=new RegExp(searchString);  else    var re=new RegExp(searchString,"i");  var res = re.exec (sr$t.value.substring(0,sr$t.selectionStart));  if (!res) {    var res = re.exec (sr$t.value)  }  if (res)  { sr$t.selectionStart=res.index; sr$t.selectionEnd=res.index+res[1].length; } else sr$t.selectionStart=sr$t.selectionEnd; srSync; } function srNext { if (sr$s.value=='') {sr$t.focus; return } if (sr$re.checked) { var searchString = sr$s.value; } else { searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); } if (sr$mc.checked) var re=new RegExp(searchString,"g"); else var re=new RegExp(searchString,"gi"); re.lastIndex=sr$t.selectionEnd; var res = re.exec (sr$t.value) if (!res) { re.lastIndex=0; var res = re.exec (sr$t.value) } if (res) {   sr$t.selectionStart=res.index; sr$t.selectionEnd=res.index+res[0].length; } else sr$t.selectionStart=sr$t.selectionEnd; srSync; } function srReplace { var sels=sr$t.selectionStart; var sele=sr$t.selectionEnd; var selr=sr$t.value.length-sele; if (sr$s.value=='' || sels==sele) {sr$t.focus; return } if (sr$re.checked) { var searchString = sr$s.value; var replaceString = sr$r.value; } else { searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1'); } if (sr$mc.checked) var re=new RegExp(searchString,"g"); else var re=new RegExp(searchString,"gi"); re.lastIndex=sels; var res = re.exec (sr$t.value); var $$=0; if (res && res.index==sels && res[0].length==sele-sels) {   if (sr$re.checked) { replaceString=replaceString.replace(/\\\\/g,'&backslash;'); var replaceBits=(" "+replaceString).split(/(?=\$\d)/); replaceString=replaceBits[0].substring(1); for (var i=1; i<replaceBits.length; i++) {       $$=replaceBits[i][1]-'0'; if ($$<res.length) replaceString += res[$$] + replaceBits[i].substring(2) else replaceString += replaceBits[i]; }    replaceString=replaceString.replace (/\\n/,"\n").replace (/&backslash;/g,"\\").replace (/$/g,"\$") }    sr$t.value= sr$t.value.substring(0,sels) + replaceString + sr$t.value.substring(sele); } sr$t.selectionStart=sels; sr$t.selectionEnd=sr$t.value.length-selr; srSync; } function srReplaceall { if (!sr$s.value) {sr$t.focus; return } var sels=sr$t.selectionStart; var sele=sr$t.selectionEnd; var selr=sr$t.value.length-sele; var reps; if (sr$re.checked) { var searchString = sr$s.value; var replaceString = sr$r.value.replace(/\\\\/,'&backslash;').replace(/\\n/,'\n').replace(/&backslash;/,"\\"); } else { searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1'); replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1'); } if (sele>sels) reps=sr$t.value.substring(sels,sele); else reps=sr$t.value; if (sr$mc.checked) var re=new RegExp(searchString,"g"); else var re=new RegExp(searchString,"gi"); var replaceCounter=0; var replaceFunc=function{replaceCounter++;return replaceString}; reps=reps.replace(re,replaceString); if (sele>sels) sr$t.value = sr$t.value.substring(0,sels) + reps + sr$t.value.substring(sele); else sr$t.value = reps; sr$t.selectionStart=sels; sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels; window.status = replaceCounter+" ocurrences of " + searchString + " replaced."; srSync; } function srToggleCase { var sels=sr$t.selectionStart; var sele=sr$t.selectionEnd; var selr=sr$t.value.length-sele; var selt=sr$t.value.substring(sels,sele); if (sele>sels) {   if (selt==selt.toUpperCase) selt=selt.toLowerCase else if (selt==selt.toLowerCase && sele-sels>1) selt=selt.substring(0,1).toUpperCase+selt.substring(1).toLowerCase else selt=selt.toUpperCase; sr$t.value = sr$t.value.substring(0,sels) + selt + sr$t.value.substring(sele); sr$t.selectionStart=sels; sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels; } srSync; } function srSync {   var i;    var allLines=0; var lineNo=0; var w=sr$t.cols-5; var dummy=sr$t.value.split("\n"); for (i=0;i<dummy.length;i++){allLines+=Math.ceil(dummy[i].length/w)} var dummy=sr$t.value.substring(0,sr$t.selectionStart).split("\n"); for (i=0;i<dummy.length;i++){lineNo+=Math.ceil(dummy[i].length/w)} //   alert (w+" "+lineNo+"/"+allLines); sr$t.scrollTop=sr$t.scrollHeight*(lineNo-10)/allLines; sr$t.focus; } function srInit { if($e('wpTextbox1')) { var srBoxCode =' ' var ep=$e('searchInput'); if (ep) ep.accessKey='none'; sr$t=document.editform.wpTextbox1; sr$w=sr$t.style.width; var sr=document.createElement('div'); sr.innerHTML=srBoxCode; var im=document.createElement('span'); im.innerHTML='<a id="SearchIcon" href="javascript:srShowHide"><img style="cursor: pointer;" title="Search/Replace" alt="Search/Replace" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_find.png" border="0" height="22" width="23"></a><a href="javascript:srToggleCase"><img style="cursor: pointer;" title="Toggle case" alt="Toggle case" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_case.png" border="0" height="22" width="23"></a>'; var ep=$e('toolbar'); if (ep) {     ep.appendChild(im) }   else {     var ep=$e('editform'); ep.parentNode.insertBefore(im,ep); }    sr$i=$e('SearchIcon'); sr$i.accessKey="F"; sr.firstChild.style.display='none'; var ep=$e('editform'); ep.parentNode.insertBefore(sr,ep); sr$f=$e('srForm'); sr$s=$e('srSearch'); sr$r=$e('srReplace'); sr$re=$e('srRegexp'); sr$mc=$e('srCase'); } } function srShowHide { if (sr$f.style.display=='none') {   sr$f.style.display='block'; sr$i.accessKey="none"; sr$t.style.width='auto'; sr$s.focus; } else {   sr$f.style.display='none'; sr$t.style.width=sr$w; sr$i.accessKey="F"; } } $(srInit);

// // /* Cat-a-lot - changes category of multiple files */ mw.loader.using(['jquery.ui', 'mediawiki.util'], function{	mw.loader.load('//commons.wikimedia.org/w/load.php?modules=ext.gadget.Cat-a-lot'); }); ////////// Cat-a-lot user preferences ////////// window.catALotPrefs = {"watchlist":"preferences","minor":true,"editpages":true,"docleanup":false,"subcatcount":10}; ////////////////////////////////////catALotEnd// //

title: User:Koavf/monobook.js


text: svidaniya

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: svidaniya


text:
หมาบ้าน

Etymology
From 🇰🇲.

Noun

 * 1) domestic dog.

title: หมาบ้าน


text:
เนื้อ

Etymology
From. Cognate with 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬, 🇨🇬 or, 🇨🇬.

Noun

 * 1) flesh.
 * 2) meat.
 * 3)  beef.
 * 4) essence.
 * 5) subject matter.
 * 6)  capital; fund; money.
 * 7)  quality.
 * 8)  lyrics.
 * 9)  deer.
 * 10)  cannabis; marijuana.
 * 1)  cannabis; marijuana.

title: เนื้อ


text:
ค้างคาว

Etymology
Compare 🇨🇬.

Noun

 * 1) bat animal.

title: ค้างคาว


text:
กล้าย

Etymology
Cognate with 🇨🇬 /, 🇨🇬.

Noun

 * 1) plantain.

title: กล้าย


text: ลามา

title: ลามา


text:
อัลปากา

Etymology
From.

Noun

 * 1) alpaca.

title: อัลปากา


text:
วัวทะเล

Etymology

 * from 🇰🇲.

Noun

 * 1) manatee; dugong.

title: วัวทะเล


text:
日氣

Noun

 * 1) heat emanating from sunlight

title: 日氣


text:
สำปะหลัง

Noun

 * 1) (มัน~) cassava.

title: สำปะหลัง


text:
มันเลือดนก

Etymology
From 🇰🇲.

Noun

 * 1) purple yam.

title: มันเลือดนก


text:
มันเสา

Noun

 * 1) purple yam.

Synonyms

 * (man lueat nok)

title: มันเสา


text:
อาร์มาดิลโล

Etymology
From.

Noun

 * 1) armadillo.

title: อาร์มาดิลโล


text:
พังพอน

Noun

 * 1) mongoose.

title: พังพอน


text:
เพียงพอน

Noun

 * 1) weasel.

title: เพียงพอน


text:
Порошенко

Etymology
From.

Declension
The feminine form is indeclinable.

Related terms

 * (slang term for a supporter, derogatory)

title: Порошенко


text:
ลิงซ์

Etymology
From.

Noun

 * 1) (แมวป่า~) lynx.

title: ลิงซ์


text:
随分

Adverb

 * 1) extremely, considerably, very

title: 随分


text:
แมวป่า

Etymology
From 🇰🇲.

Noun

 * 1) jungle cat.

title: แมวป่า


text:
ずいぶん

Adverb

 * 1)  extremely, very

title: ずいぶん


text:
ม้าลาย

Etymology
From 🇰🇲.

Noun

 * 1) zebra.

title: ม้าลาย


text:
แรด

Etymology
Cognate with 🇨🇬, 🇨🇬.

Noun

 * 1) rhinoceros.
 * 2) (ปลา~) giant gourami,.

title: แรด


text: 海市蜃楼

title: 海市蜃楼


text:
海市蜃樓

Noun

 * 1) mirage optical illusion
 * 2)  castles in the air; illusion

title: 海市蜃樓


text:
Template:Talitridae Hypernyms

 * Eumalacostraca - subclass; Peracarida - superorder; Amphipoda - order; - suborder;   ;  - parvorder;  - superfamily;  - epifamily; Talitridae - family

title: Template:Talitridae Hypernyms


text:
Template:Talitridae Hypernyms/documentation

This is a typing shortcut intended for use under the Hypernyms header of taxa under Talitridae. It can also be used with subst:.


text:
กอริลลา

Etymology
From. Cognate with 🇨🇬.

Noun

 * 1) (ลิง~) gorilla.

title: กอริลลา


text:
จากัวร์

Etymology
From.

Noun

 * 1) (เสือ~) jaguar.

title: จากัวร์


text:
ลิงไม่มีหาง

Etymology
From 🇰🇲, literally “monkey without tail”.

Noun

 * 1) ape.

title: ลิงไม่มีหาง


text:
เอป

Etymology
From.

Noun

 * 1) ape.

title: เอป


text:
พัฟฟิน

Etymology
From.

Noun

 * 1) (นก~) puffin.

title: พัฟฟิน


text:
ไก่ฟ้า

Etymology
From 🇰🇲.

Noun

 * 1) pheasant.

title: ไก่ฟ้า


text:
ไก่งวง

Etymology
From 🇰🇲.

Noun

 * 1) turkey the bird

title: ไก่งวง


text:
User:DCDuring/Reviews of online dictionaries

 * Choice review MW, OneLook, etc in list of top 10, not Wiktionary.
 * Refseek Simple listing of 30, include MW and Wikt.
 * Guardian 3 UK sites and OneLook.
 * reviewcentre User-provided reviews [Seems low-quality, few reviews.
 * Really-Learn-English MW+, wikt not mentioned

 * idea.org.blog describes each dictionary briefly, not very evaluatively.

 * Androidrank Wikt vs. MW market share


text:
haa dóoneʼé lá nílį́

Phrase

 * 1) what’s your clan?

title: haa dóoneʼé lá nílį́


text: Template:ga-categoryTOC

title: Template:ga-categoryTOC


text: 贩毒

title: 贩毒


text:
販毒

Verb

 * 1) to traffic in narcotics; to traffic in illicit drugs

title: 販毒


text:
(-)ssRNA

Proper noun

 * 1)  Negative-sense, single-stranded RNA virus.

title: (-)ssRNA


text:
akʼeʼełchí

Etymology
.

Verb

 * 1) he/she/it writes (something unspecified on something unspecified), makes a tattoo, makes a mark

Verbal stems

 * IMPERFECTIVE: -chí
 * PERFECTIVE: -chį́
 * FUTURE: -chííł
 * ITERATIVE: -chííh
 * OPTATIVE: -chííł

title: akʼeʼełchí


text:
Potato virus X

Hypernyms

 * Virus - kingdom; - order;  - family;  - genus

title: Potato virus X


text: 习性

title: 习性


text:
ไคโยตี

Etymology
From.

Noun

 * 1) (หมาป่า~) coyote.

title: ไคโยตี


text:
User:Appologist/Sandbox

APPOLOGIST A person who studies mobile apps (used on mobile devices such as smart phones, tablets, lap tops computers) for the purpose of education and workforce development. Dr. Robbie Kendall Melton, Associate Vice Chancellor of Mobilization and Emerging Technologies for the Tennessee Board of Regents is the first proclaimed appologist. She created and curated an Educational and Workforce Mobile App Resource Center (60,000+ apps) for the purpose of teaching, learning, researching, workforce, professional development, and life-long-learning that includes the full spectrum of education from PreK-Careers; according to one's devices (iOS-Apple, Androids, Windows, Blackberry, Google, eReaders (Kindle Fire, etc.) aligned with other 125 subject areas in education and careers.

title: User:Appologist/Sandbox


text:
遺傳體

Noun

 * 1) genome

title: 遺傳體


text: 遗传型

title: 遗传型


text:
遺傳型

Noun

 * 1) genotype

title: 遺傳型


text: 遗传体

title: 遗传体


text: 基因组

title: 基因组


text:
匯劃

Verb

 * 1) to transfer money; to remit

Noun

 * 1) money transfer; remittance

title: 匯劃


text: 汇划

title: 汇划


text:
缺席

Verb

 * 1) to be absent

title: 缺席


text:
결석

Noun

 * 1) absence

title: 결석


text:
tha an t-àm aig

Adverb

 * 1) about time, high time

title: tha an t-àm aig


text:
uair san ràith

Adverb

 * 1) once in a blue moon

title: uair san ràith


text:
khuyết tịch

Etymology
.

Noun

 * 1) absence
 * 2) default

title: khuyết tịch


text:
rach cùrsa nan slat

Adverb

 * 1) take up the gauntlet

title: rach cùrsa nan slat


text:
sùil airson sùla is fiacaill airson fiacla

Proverb

 * 1) an eye for an eye, a tooth for a tooth


text:
an nì a chuireas duine is e a bhuaineas e

Adverb

 * 1) reap what you sow (lit. what a man sows that he will reap)


text:
Talk:𐼸𐼰𐼲𐼹𐼰

Some sources (e.g. ) cite Chinese gu-zhi 谷紙 ("paper made from mulberry bark") as the origin of this word, but there does not seem to be such a word (in dictionaries, classical text corpora). See 紙. Wyang (talk) 05:22, 10 July 2014 (UTC)

title: Talk:𐼸𐼰𐼲𐼹𐼰


text:
Brachygastra

Etymology
, from and

title: Brachygastra


text:
Παράκλητος

Proper noun

 * 1)  Holy Spirit, Paraclete
 * 2)  one who comforts

title: Παράκλητος


text:
Arctiidae

Hypernyms

 * ; - suborder;  - infraorder;  - division;  - section;  - subsection;  - superfamily

title: Arctiidae


text:
αθλούμαι

Verb

 * 1) to exercise, train

title: αθλούμαι


text:
quiz kid

Noun

 * 1)  A very intelligent or accomplished child or young person, especially one who demonstrated his or her knowledge and quick thinking on radio or television programs in the mid-20th century.

Synonyms

 * See also Thesaurus:child prodigy

title: quiz kid


text: αθλήθηκα

title: αθλήθηκα


text: Quiz Kid

title: Quiz Kid


text:
家傳

Verb

 * 1) to hand down in a family; to pass down from generation to generation

Noun

 * 1) record of the deeds of past family members; family biography

title: 家傳


text: 淡竹葉

title: 淡竹葉


text:
виновный

Etymology
From.

Adjective

 * 1) culpable, guilty

Noun

 * 1) culprit

title: виновный


text: xuèjiāng

title: xuèjiāng


text:
羹匙

Noun

 * 1) spoon

title: 羹匙


text: 汤匙

title: 汤匙


text:
湯匙

Noun

 * 1) tablespoon; soup spoon
 * 2) spoon
 * 3)  ladle for vegetable soup

title: 湯匙


text: 调羹

title: 调羹


text:
調羹

Noun

 * 1) spoon

Verb

 * 1)  to season a soup
 * 2)  to cook; to prepare a meal

title: 調羹


text: tāngchí

title: tāngchí


text: tiáogēng

title: tiáogēng


text: gēngchí

title: gēngchí


text:
Reconstruction:Proto-Indo-European/plew-

Root

 * 1) to fly, flow, run

Extensions

 * *plew-d-
 * *plew-k-
 * *plew-t-
 * *plewt-yom, *plowt-yom

Derived terms

 * *plew-eh₂-h₁en-
 * *pléw-e-ti
 * *plow-éye-ti
 * *pléw-mō
 * *plow-mos
 * *plow-ó-s
 * Attic Greek:
 * *plow-tó-m
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plow-éye-ti
 * *pléw-mō
 * *plow-mos
 * *plow-ó-s
 * Attic Greek:
 * *plow-tó-m
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plow-mos
 * *plow-ó-s
 * Attic Greek:
 * *plow-tó-m
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plow-tó-m
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plow-tós
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plów-yos
 * *plu-tó-s
 * *pléw-ih₂
 * *plu-tó-s
 * *pléw-ih₂
 * *plu-tó-s
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂
 * *pléw-ih₂

 * Innovative formations:


text:
巖邑

Noun

 * 1)  strategically important city

title: 巖邑


text: 嵒邑

title: 嵒邑


text: yányì

title: yányì


text:
tesmoignier

Verb

 * 1) to witness; to bare witness

title: tesmoignier


text:
romstasjon

Etymology
From.

Noun

 * 1)  a space station

Etymology
From.

Noun

 * 1)  a space station

title: romstasjon


text:
resveillier

Etymology
. From the same sources: Italian.

Verb

 * 1)  to wake up

title: resveillier


text:
esveillier

Etymology
From <, from , present active infinitive of.

Verb

 * 1) to wake up after sleep

title: esveillier


text: romstasjonen

title: romstasjonen


text:
veillier

Etymology
From, contraction of , present tense active infinitive of.

Verb

 * 1) to be awake

title: veillier


text:
Reconstruction:Proto-Germanic/flōaną

Etymology
Possibly from a pre-form, the lengthened o-grade form of. Alternatively from.

Kroonen explains the alternation between -w- (in Anglo-Saxon) and -j- (in Low German) as a result of hiatus after the regular loss of *u after *ō.

Verb

 * 1) to flow

title: Reconstruction:Proto-Germanic/flōaną


text:
embracier

Verb

 * 1) to kiss

title: embracier


text:
минти

Pronoun

 * 1) first-person plular inclusive, nominative case: we

title: минти


text:
бу

Etymology
From.

Determiner

 * 1) this

Etymology
From, compare 🇨🇬, 🇨🇬.

Pronoun

 * 1) we

Pronoun

 * 1) we

Etymology
From.

Pronoun

 * 1) this

Noun

 * 1) steam, vapour

Etymology
From.

Pronoun

 * 1) he, she

Pronoun

 * 1) this

Interjection

 * 1) boo

Etymology
From, from.

Noun

 * 1) water

Etymology
From.

Pronoun

 * 1) this

Etymology
From. Cognate with 🇨🇬.

Pronoun

 * 1) this

Etymology
From. Cognate with 🇨🇬.

Pronoun

 * 1) this

Pronoun

 * 1) first-person plular exclusive, nominative case: we

Pronoun

 * 1) we (first-person plural)

Etymology
From, compare 🇨🇬.

Determiner

 * 1) this

Particle
Intensifies the following word.

 * 1)  how ...!
 * 2)  what (a/an) ...!

Pronoun

 * 1) this

title: бу


text: Category:Udihe pronouns

title: Category:Udihe pronouns


text:
наму

Etymology
From, cognate with 🇨🇬 and 🇨🇬.

Noun

 * 1) sea

title: наму


text:
ули

Etymology
From, compare 🇨🇬.

Noun

 * 1) water

title: ули


text:
угда

Etymology
From, compare 🇨🇬.

Noun

 * 1) boat

Noun

 * 1) boat

title: угда


text: Category:Proto-Balto-Slavic lemmas

title: Category:Proto-Balto-Slavic lemmas


text:
IoT

Proper noun

 * 1)   a self-configuring wireless network between objects

title: IoT


text: Category:Udihe nouns

title: Category:Udihe nouns


text:
soliviantar

Verb

 * 1) to rouse, stir up, incite
 * 2) to change (someone's) emotional state (in various different ways)
 * 3) to annoy; to irritate
 * 4) to excite
 * 5) to give false hope to
 * 6) to worry
 * 1) to worry

title: soliviantar


text:
suscripción

Etymology
From.

Noun

 * 1) subscription

title: suscripción


text: suscripciones

title: suscripciones


text:
sustancioso

Etymology
From.

Adjective

 * 1) substantial
 * 2) hearty, substantial

title: sustancioso


text: sustanciosas

title: sustanciosas


text: sustanciosa

title: sustanciosa


text: sustanciosos

title: sustanciosos


text: urbanísticas

title: urbanísticas


text:
urbanística

Noun

 * 1) urban planning

title: urbanística


text: urbanísticos

title: urbanísticos


text: viceministros

title: viceministros


text:
censal

Adjective

 * 1) Relating to a census.

Etymology
From.

Adjective

 * 1) censual

title: censal


text:
correcalles

Etymology
.

Noun

 * 1) leapfrog (game)
 * 2) streetwalker prostitute
 * 1) streetwalker prostitute

title: correcalles


text:
marbellí

Etymology
From.

Adjective

 * 1)  of Marbella

Noun

 * 1) someone from, or connected with, Marbella

title: marbellí


text:
multipremiado

Etymology
From.

Adjective

 * 1) multi-prizewinning

title: multipremiado


text:
pretemporada

Etymology
From.

Noun

 * 1) preseason

title: pretemporada


text: censales

title: censales


text:
domiciliario

Adjective

 * 1)  house, home

title: domiciliario


text:
futbolístico

Etymology
From.

Adjective

 * 1)  football, footballing, footballistic

Etymology
From.

Adjective

 * 1)  football, footballing, footballistic

title: futbolístico


text: domiciliarias

title: domiciliarias


text: domiciliaria

title: domiciliaria


text: domiciliarios

title: domiciliarios


text: futbolísticas

title: futbolísticas


text: futbolísticos

title: futbolísticos


text:
foráneo

Etymology
or from. .

Adjective

 * 1) foreign

title: foráneo


text:
imposición

Etymology
From.

Noun

 * 1) imposition

title: imposición


text: foráneas

title: foráneas


text: foránea

title: foránea


text: foráneos

title: foráneos


text: importaciones

title: importaciones


text: imposiciones

title: imposiciones


text: kioskos

title: kioskos


text: libios

title: libios


text: libias

title: libias


text: llamamientos

title: llamamientos


text: marbellíes

title: marbellíes


text: marbellís

title: marbellís


text: multipremiadas

title: multipremiadas


text: multipremiada

title: multipremiada


text: multipremiados

title: multipremiados


text: pretemporadas

title: pretemporadas


text:
tendencioso

Etymology
From.

Adjective

 * 1) tendentious, biased

Etymology
From.

Adjective

 * 1) tendentious, biased

Etymology
From.

Adjective

 * 1) tendentious, biased

title: tendencioso


text: tendenciosas

title: tendenciosas


text:
valencianista

Adjective

 * 1)  of Valencia CF

Noun

 * 1)  someone associated with Valencia CF, as a player, coach, fan etc.

title: valencianista


text: valencianistas

title: valencianistas


text:
verticalidad

Etymology
From.

Noun

 * 1) verticality

title: verticalidad


text: venezolana

title: venezolana


text: venezolanas

title: venezolanas


text: verticalidades

title: verticalidades


text: yihadistas

title: yihadistas


text: Category:Udihe language

title: Category:Udihe language


text: avalistas

title: avalistas


text:
comarcal

Adjective

 * 1)  district

Etymology
From.

Adjective

 * 1)  district

title: comarcal


text: comarcales

title: comarcales


text:
contabilización

Noun

 * 1) entering into accounts

title: contabilización


text: dcha.

title: dcha.


text: contabilizaciones

title: contabilizaciones


text:
Gzlez

Proper noun

 * , a surname

title: Gzlez


text: Fdez

title: Fdez


text:
descerrajar

Etymology
From.

Verb

 * 1) to break in, break into, break through
 * 2) to let off

title: descerrajar


text:
diferenciable

Adjective

 * 1) differentiable, distinguishable

title: diferenciable


text: diferenciables

title: diferenciables


text:
diputación

Etymology
From.

Noun

 * 1) deputation

title: diputación


text: diputaciones

title: diputaciones


text:
disparidad

Noun

 * 1) disparity

title: disparidad


text: disparidades

title: disparidades


text: laboristas

title: laboristas


text:
reacio

Adjective

 * 1) reluctant

title: reacio


text: reacias

title: reacias


text: reacia

title: reacia


text: reacios

title: reacios


text:
reinstaurar

Etymology
From.

Verb

 * 1)  to reinstate

Etymology
From.

Verb

 * 1)  to reinstate

title: reinstaurar


text:
relanzar

Etymology
From.

Verb

 * 1)  to relaunch

title: relanzar


text:
sedación

Noun

 * 1) sedation

title: sedación


text: sedaciones

title: sedaciones


text:
sosegadamente

Etymology
From.

Adverb

 * 1) calmly, peacefully

title: sosegadamente


text:
teleportación

Etymology
From.

Noun

 * 1) teleportation

title: teleportación


text: teleportaciones

title: teleportaciones


text:
teletransportar

Etymology
From.

Verb

 * 1)  to teleport
 * 2)  to teleport
 * 1)  to teleport

Etymology
From.

Verb

 * 1) to teleport, to teletransport, to beam up

title: teletransportar


text:
teletransporte

Etymology 1
From.

Noun

 * 1)  teleportation

Etymology 1
From.

Noun

 * 1) teleportation

title: teletransporte


text:
teletransportador

Noun

 * 1) teleporter

title: teletransportador


text: teletransportadores

title: teletransportadores


text: teletransportes

title: teletransportes


text: zafia

title: zafia


text: zafios

title: zafios


text: zafias

title: zafias


text: yǎnqián

title: yǎnqián


text:
-topia

Etymology
and other words ultimately deriving from.

Suffix

 * 1) Place; ; ; geographic.
 * 2) Paradise.

title: -topia


text:
Citations:chimpkind

Noun: "the chimpanzee species in its entirety"

 * 2005, Shalom Auslander, Beware of God: Stories, Simon & Schuster (2005), ISBN 0743264568, page 20:
 * Let them sniff and poke and prod, let them debase themselves and all chimpkind.
 * 2007, Max Oelschlaeger, "Boundaries and Darwin: Bridging the Great Divide", in Nature's Edge: Boundary Explorations in Ecological Theory and Practice (eds. Charles S. Brown & Ted Toadvine), State University of New York Press (2007), ISBN 9780791471210, page 7:
 * The one percent of difference between human and chimpkind, as it turns out, makes all the difference.
 * 2008, BBC Wildlife, Volume 26, Issues 1-7, page 83:
 * He achieved great PR for chimpkind and even made the front cover of Life magazine.
 * 2014, Steve Rose, "Dawn of the Planet of the Apes: a primate scream - first look review", The Guardian, 1 July 2014:
 * It's another seamless motion-capture performance by Andy Serkis (though to me Caesar looks more like chimpkind's answer to Sean Bean) and the film's biggest weakness is that homo sapiens offers little to rival it.

title: Citations:chimpkind


text:
kontakta

Verb

 * 1) to contact (establish communication with)

title: kontakta


text: 𠮶个

title: 𠮶个


text:
嗰個

Pronoun

 * 1)  that; that one

title: 嗰個


text: fuggheadedness

title: fuggheadedness


text: fuggheaded

title: fuggheaded


text: fugghead

title: fugghead


text: fuggheads

title: fuggheads


text: Estrangela

title: Estrangela


text:
Dschihadist

Noun

 * 1) jihadist

title: Dschihadist


text:
støpsel

Etymology
From.

Noun

 * 1) a plug (for plugging into an electrical socket)

Etymology
From.

Noun

 * 1) a plug (for plugging into an electrical socket)

title: støpsel


text:
Dschihadistin

Noun

 * : female jihadist

title: Dschihadistin


text: støpselet

title: støpselet


text: støpslet

title: støpslet


text: støpsler

title: støpsler


text: støpsla

title: støpsla


text: Category:Yoga poses

title: Category:Yoga poses


text: støpslene

title: støpslene


text:
辛勞

Adjective

 * 1) laborious; painstaking

Verb

 * 1) to toil

Noun

 * 1) toil; hard work; suffering
 * 2)  shop assistant; employee

title: 辛勞


text:
Talk:failover

failover
I am proposing to delete the first sense. I feel, as someone who's worked in the computing field for more than a decade, that the first sense is really just a specific case of the second, which is more general, and in my opinion, the better dictionary definition. What do you guys think? Jamesjiao → T ◊ C 03:01, 8 August 2013 (UTC)

 * I am puzzled that sense #1 is glossed as uncountable. Is there an uncountable use of this term? Spinning Spark  20:47, 10 August 2013 (UTC)
 * The "capability to perform a failover" (countable) seems to be uncountable. I've added a few cites under the uncountable heading, but intending no endorsement of that wordy, even encyclopedic definition. I don't think there are a vast number of these so the sense should be worded to span all the cites, which probably means lack of specificity. DCDuring TALK 23:00, 10 August 2013 (UTC)

 * Ok, so if you agree that there is an uncountable sense (and you have now just cited it), then you can't delete it. There are still two senses.  Unless you also intend to gloss sense #2 as countable and uncountable.  I would think a cleanup of sense #1 is a more appropriate thing to do than deletion. Spinning Spark  15:46, 11 August 2013 (UTC)
 * I think there's not enough difference between the uncountable and countable versions to warrant two definitions. The second definition can be tweaked slightly to cater to both. My point with this post is the unnecessary degree of specificness that the first definition goes into. Jamesjiao → T ◊ C 00:11, 12 August 2013 (UTC)

 * I agree that one definition ought to be enough. We are talking about the difference between an uncountable ability ("do we support failover?") vs. a countable instance ("how many failovers last year?"). Compare backup, perhaps. Equinox ◑ 00:13, 12 August 2013 (UTC)
 * If it is a requirement for a definition to be substitutable – it is a desideratum – it may not be so easy find suitable wording. DCDuring TALK 04:51, 12 August 2013 (UTC)
 * Merged two definition into one. Feel free to adjust it.--Jusjih (talk) 06:31, 30 June 2014 (UTC)

title: Talk:failover


text: מדינת ישראל

title: מדינת ישראל


text:
ארץ ישראל

Proper noun

 * 1) the Land of Israel

title: ארץ ישראל


text:
敲擊

Verb

 * 1) to rap; to strike; to pound

title: 敲擊


text:
상념

Noun

 * 1) thought (that comes to mind); various thoughts

title: 상념


text:
אימייל

Etymology
Borrowed from.

Noun

 * 1)  e-mail

title: אימייל


text:
그리워하다

Verb

 * 1) to miss, long for, pine for, yearn for

title: 그리워하다


text:
סיסמה

Etymology
From.

Noun

 * 1) password
 * 2) slogan
 * 1) slogan

title: סיסמה


text:
Wiktionary talk:Votes/pl-2014-03/CFI: Removing usage in a well-known work 3

The vote closed a while back. --WikiTiki89 13:45, 10 July 2014 (UTC)
 * Where is the decision? bd2412 T 14:16, 10 July 2014 (UTC)
 * After e/c — it's still listed on the active votes page and no-one has closed it or recorded a decision yet. Actually, we should probably ping a neutral admin like User:Msh210 to do those things... - -sche (discuss) 14:21, 10 July 2014 (UTC)
 * Thanks for the ping. I saw it at 3:1 for a while and didn't want to decide; now it's newly 4:1,a clear pass, but because the last vote is so new I want to allow others time to weigh in also. I'm extending it one more week. —msh210℠ (talk) 20:50, 10 July 2014 (UTC)
 * How do "votes" work here? Are they numerical, or are they decided by the quality of the arguments?Two kinds of pork (talk) 02:21, 8 August 2014 (UTC)
 * Numerical, but there isn’t an exact percentage AFAIK. — Ungoliant (falai) 03:09, 8 August 2014 (UTC)

 * Pinging User:Msh210 again, or any other uninvolved admin who wants to close this... - -sche (discuss) 19:32, 16 August 2014 (UTC)
 * Am I allowed to close if I abstained? --WikiTiki89 13:51, 17 August 2014 (UTC)
 * We do not have any rule against a participant of a vote closing the vote, and I do not remember any common practice thing against it. -sche is the creator of the vote, so he probably does not want to close the vote himself. Of course, having the vote closed by someone who did not participate seems superficially cleanest, yet not participating while being aware of the vote is just a little less explicit form of abstaining. Summed up, I see no hindrance to you (Wikitiki89) closing the vote. --Dan Polansky (talk) 17:50, 17 August 2014 (UTC)
 * Yeah, what Dan said. No objection from me to you closing it. - -sche (discuss) 18:10, 17 August 2014 (UTC)
 * Closed. --WikiTiki89 19:27, 17 August 2014 (UTC)
 * : You should also edit WT:CFI, using the edit summary to link to this vote. --Dan Polansky (talk) 19:49, 17 August 2014 (UTC)
 * Done. --WikiTiki89 14:32, 18 August 2014 (UTC)


text: Template:jbo-cmavo/documentation

title: Template:jbo-cmavo/documentation


text:
התקהל

Verb

 * 1)  congregate, assemble, gather

title: התקהל


text:
הקהיל

Verb

 * 1)  to bring together, assemble, gather

title: הקהיל


text: kontaktene

title: kontaktene


text: kontaktar

title: kontaktar


text:
Thread:User talk:CodeCat/Template:eo-pron

Was there an RFD for this? Or consensus in favor of its deletion anywhere else?


text: kontaktane

title: kontaktane


text: Category:Macedonian verb forms

title: Category:Macedonian verb forms


text: quiz-kid

title: quiz-kid


text:
anthroponomy

Noun

 * 1)  The science of the laws of the development of the human organism in relation to other organisms and the environment.

Translations

 * Finnish: antroponomia
 * Portuguese: antroponomia

title: anthroponomy


text:
penguinarium

Noun

 * 1) A vivarium for penguins.

Translations

 * French:
 * Polish: pingwinarium
 * Russian:

title: penguinarium


text:
Thread:User talk:CodeCat/Template:eo-pron/reply

It was only used in a few entries, and all it did is just call.


text:
User:DCDuring/unassigned virus genera

Virus genera not assigned to families

 * Bacilladnavirus
 * Cilevirus
 * Deltavirus
 * Dinodnavirus
 * Emaravirus
 * Higrevirus
 * Idaeovirus
 * Ourmiavirus
 * Polemovirus
 * Rhizidiovirus
 * Salterprovirus
 * Sobemovirus
 * Tenuivirus
 * Umbravirus
 * Varicosavirus

title: User:DCDuring/unassigned virus genera


text:
bagel head

Etymology
From the bagel shape and the forehead location.

Noun

 * 1) A person who has a temporary circular body modification to the forehead, created by saline injection.

title: bagel head


text:
ssRNA-RT

Noun

 * 1) Single-stranded RNA virus, reverse transcriptase.

title: ssRNA-RT


text:
endoclitic

Etymology
From.

Noun

 * 1)  A mesoclitic; a clitic inserted inside a word.
 * 2) * 2004, Craig Kopris, Rapid MT Experience in an LCTL (Pashto), Robert E. Frederking, Kathryn B. Taylor (editors), Machine Translation: From Real Users to Research: 6th Conference of the Association for Machine Translation in the Americas, Springer, LNAI 3265, page 130,
 * Other syntactic complexities of Pashto include endoclitics and frequent discontinuous constituents.
 * Other syntactic complexities of Pashto include endoclitics and frequent discontinuous constituents.

title: endoclitic


text: endoclitics

title: endoclitics


text:
trekk

Etymology 1
From the verb.

Noun

 * 1)  migration
 * 2) a feature, a trait
 * 3) a move

Etymology
From the verb,.

Noun

 * 1)  migration
 * 2) a feature

title: trekk


text:
dsDNA-RT

Noun

 * 1) Double-stranded DNA reverse transcriptase virus.

Hyponyms

 * ; - families

title: dsDNA-RT


text:
trakk

Etymology
.

Noun

 * 1) truck, lorry

Etymology
From,.

Noun

 * 1) the act of trampling, stomping
 * 2) a track (a path formed by the repeated walking of people and/or animals)

title: trakk


text: trukket

title: trukket


text:
User:Bejnar

I like words. Although my only fluent language is English, I've studied Latin, Greek, German, linguistics and Old English. I don't very often contribute to the Wiktionary.

title: User:Bejnar


text:
rapunzel

Etymology
Borrowed from.

Noun

 * 1)  A plant with leaves and crisp roots which have been used in salads, rampion,.
 * 2)  A plant with leaves which are used in salads, corn salad or mâche,.

Usage notes

 * This term is used mostly in the context of the Grimm's fairy tale of the same name, with other synonyms being much more common, otherwise. Although the fairy tale referred to the rampion, there is considerable confusion: names for rampion and corn salad in various languages overlap, and the rampion is mostly obsolete as a cultivated vegetable.

Synonyms

 * /cornsalad, lamb's lettuce, mâche, fetticus, nut lettuce, field salad, doucette, raiponce.
 * /cornsalad, lamb's lettuce, mâche, fetticus, nut lettuce, field salad, doucette, raiponce.

title: rapunzel


text: aktuelt

title: aktuelt


text:
User talk:Bejnar

 As I am seldom logged on here, If you wish to reach me it is better to do so at the English Wikipedia.

title: User talk:Bejnar


text:
נמנע

Etymology
Mediopassive of, from the root.

Verb

 * 1) To refrain, avoid, abstain (from an action).

title: נמנע


text:
spúnóg bheag

Noun

 * 1) teaspoon small spoon used to stir the contents of a cup or glass

title: spúnóg bheag


text:
spúnóg mhór

Noun

 * 1) tablespoon

title: spúnóg mhór


text: matematiske

title: matematiske


text:
איש קש

Etymology
Literally "straw man" ("man of straw")

Noun

 * 1) straw purchaser, strawperson

title: איש קש


text:
קש

Etymology
Cognate with 🇨🇬, 🇨🇬, 🇨🇬.

Noun

 * 1) straw

title: קש


text: non-stretchable

title: non-stretchable


text:
Module:eo-headword

local export = {} local pos_functions = {}

local PAGENAME = mw.title.getCurrentTitle.text local lang = require("Module:languages").getByCode("eo") local except = require("Module:eo-headword/exceptions")

-- Verb stem must have at least two letters. local participle_pattern = "..([aio]n?t[aeo]j?n?)$"

local function monosyllabic(word) return select(2, mw.ustring.gsub(word, "[AEIOUaeiou]", "")) == 1 end

local function check(data, tracking_categories) local catname = "Esperanto nouns with red links in their headword lines" if data.pos_category == "adjectives" or data.pos_category == "determiners" or data.pos_category == "adjectival participles" then catname = "Esperanto adjectives with red links in their headword lines" end for _, entry in ipairs(data.check) do		local t = mw.title.new(entry) if t and not t.exists then table.insert(tracking_categories, catname) end end end

-- Determines which function in pos_functions should be used for a word in. local function getPOS(word) -- deal with some exceptions if except[word] then return except[word] end -- delete anything after "de" word = mw.ustring.gsub(word, " de .+$", "") if word:find(" ") then if word:find("o%f[%z%s]") and word:find("a%f[%z%s]") then return "nouns" end end -- deal with letters if mw.ustring.match(word,"^[aeiou]$") or mw.ustring.match(word,"^[bcĉdfgĝhĥjĵklmnprsŝtŭvz]o$") then return "nouns" end -- deal with ordinals if mw.ustring.match(word, "^[0-9]+%-?a$") then return "adjectives" elseif mw.ustring.match(word, "^[0-9]+%-?aj?n?$") then return "adjective forms" end -- Words with only one vowel are always irregular if monosyllabic(word) then return nil elseif mw.ustring.find(word, participle_pattern) then -- detect this firstly return "participles" end local ending = word:match("[aeiou][^aeiou]*$") if ending == "a" then return "adjectives" elseif ending == "aj" or ending == "an" or ending == "ajn" then return "adjective forms" elseif ending == "e" or ending == "en" then return "adverbs" elseif ending == "o" then if mw.ustring.find(word, "^%u") then return "proper nouns" else return "nouns" end elseif ending == "oj" or ending == "on" or ending == "ojn" then if mw.ustring.find(word, "^%u") then return "proper noun forms" else return "noun forms" end elseif ending == "i" then return "verbs" elseif ending:find("^[iaou]s$") or ending == "u" then return "verb forms" else return nil end end export.getPOS = getPOS

-- The main entry point function export.show(frame) local tracking_categories = {} local parent_args = frame:getParent.args local poscat = parent_args["pos"] or frame.args["poscat"] or getPOS(PAGENAME) if not poscat then local namespace = mw.title.getCurrentTitle.namespace if namespace == 10 or namespace == 828 then poscat = "nouns" else error("Part of speech of \"" .. PAGENAME .. "\" cannot be automatically determined.") end else if poscat == "plurale tantum" then poscat = "pluralia tantum" elseif not (poscat == "pluralia tantum" or poscat:find("s$")) then poscat = poscat .. "s" -- Pluralize part of speech. end end local params = { ["head"] = {list = true}, ["pos"] = {}, ["suff"] = {type = "boolean"}, }	if pos_functions[poscat] then for key, val in pairs(pos_functions[poscat].params) do			params[key] = val end end local args = require("Module:parameters").process(parent_args, params) local data = {lang = lang, pos_category = poscat, categories = {}, heads = args["head"], genders = {}, inflections = {}, check = {}} if pos_functions[poscat] then pos_functions[poscat].func(args, data) end check(data, tracking_categories) return require("Module:headword").full_headword(data) .. require("Module:utilities").format_categories(tracking_categories, lang) end

pos_functions["adjectives"] = { params = { },	func = function(args, data) table.insert(data.inflections, {label = "accusative singular", accel = {form = "acc|s"}, PAGENAME .. "n"}) table.insert(data.inflections, {label = "plural", accel = {form = "p"}, PAGENAME .. "j"}) table.insert(data.inflections, {label = "accusative plural", accel = {form = "acc|p"}, PAGENAME .. "jn"}) table.insert(data.check, PAGENAME .. "n") table.insert(data.check, PAGENAME .. "j") table.insert(data.check, PAGENAME .. "jn") end }

pos_functions["determiners"] = { params = { },	func = function(args, data) table.insert(data.inflections, {label = "accusative singular", accel = {form = "acc|s"}, PAGENAME .. "n"}) table.insert(data.inflections, {label = "plural", accel = {form = "p"}, PAGENAME .. "j"}) table.insert(data.inflections, {label = "accusative plural", accel = {form = "acc|p"}, PAGENAME .. "jn"}) table.insert(data.check, PAGENAME .. "n") table.insert(data.check, PAGENAME .. "j") table.insert(data.check, PAGENAME .. "jn") end }

pos_functions["nouns"] = { params = { [1] = {list = true, allow_holes = true}, },	func = function(args, data) -- Get the parameters local inflected_words_specified = false local inflected_words = {} for i = 1, args[1].maxindex do			local word = args[1][i] if word == "+" or word == "-" then word = nil end if word then inflected_words[word] = true inflected_words_specified = true end end local pl = {} local acc = {} local acc_pl = {} -- Split multi-word terms for word in mw.text.gsplit(PAGENAME, " ", true) do			local pos = getPOS(word) -- Inflect each word separately if (not inflected_words_specified or inflected_words[word]) and (pos == "adjectives" or pos == "nouns" or pos == "proper nouns") then local is_letter = "" if mw.ustring.match(word,"^[aeiou]$") or mw.ustring.match(word,"^[bcĉdfgĝhĥjĵklmnprsŝtŭvz]o$")then is_letter = "-o" end table.insert(acc, word .. is_letter .. "n") table.insert(pl, word .. is_letter .. "j") table.insert(acc_pl, word .. is_letter .. "jn") else table.insert(acc, word) table.insert(pl, word) table.insert(acc_pl, word) end end -- Merge back together acc = table.concat(acc, " ") pl = table.concat(pl, " ") acc_pl = table.concat(acc_pl, " ") local acc2, pl2, acc_pl2 if PAGENAME == "sozo" then acc2 = "sozo-on" pl2 = "sozo-oj" acc_pl2 = "sozo-ojn" end if args[1][1] == "-" then table.insert(data.inflections, {label = "uncountable"}) table.insert(data.inflections, {label = "accusative", accel = {form = "acc"}, acc}) table.insert(data.categories, lang:getCanonicalName .. " uncountable nouns") table.insert(data.check, acc) else table.insert(data.inflections, {label = "accusative singular", accel = {form = "acc|s"}, acc, acc2}) table.insert(data.inflections, {label = "plural", accel = {form = "p"}, pl, pl2}) table.insert(data.inflections, {label = "accusative plural", accel = {form = "acc|p"}, acc_pl, acc_pl2}) table.insert(data.check, acc) table.insert(data.check, pl) table.insert(data.check, acc_pl) end end }

pos_functions["proper nouns"] = { params = { [1] = {list = true, allow_holes = true}, },	func = function(args, data) -- Get the parameters local inflected_words_specified = false local inflected_words = {} for i = 1, args[1].maxindex do			local word = args[1][i] if word == "+" or word == "-" then word = nil end if word then inflected_words[word] = true inflected_words_specified = true end end local acc = {} local pl = {} local acc_pl = {} local de = false -- Split multi-word terms for word in mw.text.gsplit(PAGENAME, " ", true) do			local pos = getPOS(word) if word == "de" then de = true end -- Inflect each word separately if (not inflected_words_specified or inflected_words[word]) and (pos == "adjectives" or pos == "nouns" or pos == "proper nouns" or mw.ustring.match(word,'[ao]j$') and not monosyllabic(word)) and not de then table.insert(acc, word .. "n") table.insert(pl, word .. "j") table.insert(acc_pl, word .. "jn") else table.insert(acc, word) table.insert(pl, word) table.insert(acc_pl, word) end end -- Merge back together acc = table.concat(acc, " ") pl = table.concat(pl, " ") acc_pl = table.concat(acc_pl, " ") if args[1][1] == "+" then table.insert(data.inflections, {label = "accusative singular", accel = {form = "acc|s"}, acc}) table.insert(data.inflections, {label = "plural", accel = {form = "p"}, pl}) table.insert(data.inflections, {label = "accusative plural", accel = {form = "acc|p"}, acc_pl}) table.insert(data.check, acc) table.insert(data.check, pl) table.insert(data.check, acc_pl) else table.insert(data.inflections, {label = "accusative", accel = {form = "acc"}, acc}) table.insert(data.check, acc) end end }

pos_functions["verbs"] = { params = { },	func = function(args, data) local stem = PAGENAME:sub(1, -2) table.insert(data.inflections, {label = "present", accel = {form = "pres"}, stem .. "as"}) table.insert(data.inflections, {label = "past", accel = {form = "past"}, stem .. "is"}) table.insert(data.inflections, {label = "future", accel = {form = "futr"}, stem .. "os"}) table.insert(data.inflections, {label = "conditional", accel = {form = "cond"}, stem .. "us"}) table.insert(data.inflections, {label = "volitive", accel = {form = "voli"}, stem .. "u"}) end }

pos_functions["noun forms"] = { params = { [1] = {},	},	func = function(args, data) if args[1] == "p" or args[1] == "p+" then table.insert(data.genders, "p") data.categories = {"Esperanto nouns", "Esperanto pluralia tantum"} table.insert(data.inflections, {label = "accusative", accel = {form = "acc"}, PAGENAME .. "n"}) table.insert(data.check, PAGENAME .. "n") if args[1] == "p+" then local singular = mw.ustring.gsub(PAGENAME, "j$", "") table.insert(data.inflections, {label = "singular", singular}) table.insert(data.check, singular) end end end }

pos_functions["pluralia tantum"] = { params = { [1] = {},	},	func = function(args, data) data.pos_category = "nouns" table.insert(data.categories, 1, "Esperanto pluralia tantum") table.insert(data.inflections, {label = "accusative", accel = {form = "acc"}, PAGENAME .. "n"}) table.insert(data.check, PAGENAME .. "n") if args[1] == "+" then local singular = mw.ustring.gsub(PAGENAME, "j$", "") table.insert(data.inflections, {label = "singular", singular}) table.insert(data.check, singular) end end }

pos_functions["participles"] = { params = { [1] = {}, [2] = {}, --these will be phased out },	func = function(args, data) local ending = mw.ustring.match(PAGENAME, participle_pattern) if ending then local vowel, consonant = ending:match("([aoe])(j?n?)$") if consonant == "" then if vowel == "a" or vowel == "o" then table.insert(data.inflections, {label = "accusative singular", accel = {form = ending .. "n"}, PAGENAME .. "n"}) table.insert(data.inflections, {label = "plural", accel = {form = ending .. "j"}, PAGENAME .. "j"}) table.insert(data.inflections, {label = "accusative plural", accel = {form = ending .. "jn"}, PAGENAME .. "jn"}) table.insert(data.check, PAGENAME .. "n") table.insert(data.check, PAGENAME .. "j") table.insert(data.check, PAGENAME .. "jn") elseif vowel == "e" then data.categories = {"Esperanto adverbial participles"} end elseif vowel == "e" then error("-e" .. consonant .. " is not a valid participle ending!") end if vowel == "a" then data.categories = {"Esperanto adjectival participles"} elseif vowel == "o" then data.categories = {"Esperanto nominal participles"} end else error("This term is not a participle!") end end }

return export

title: Module:eo-headword


text:
Module:eo-headword/documentation

This module implements Esperanto headword-line templates.

title: Module:eo-headword/documentation


text: Template:eo-head

title: Template:eo-head


text:
Template:eo-head/documentation

This template provides the headword-line template for all Esperanto terms, including lemmas and non-lemma forms, but not including grammatical terms such as determiners, prepositions, conjunctions, interjections and the like.

Because of the unique nature of Esperanto, where the part of speech can be determined from the word's spelling, separate headword-line templates for different parts of speech are not required.

title: Template:eo-head/documentation


text: anende

title: anende


text: anedes

title: anedes


text: anets

title: anets


text: Category:Esperanto modules

title: Category:Esperanto modules


text: Category:Esperanto nominal participles

title: Category:Esperanto nominal participles


text: Category:Nominal participles by language


text: elastiske

title: elastiske


text:
Thread:User talk:CodeCat/Dynamic Columns/Rows

I have now learned that if I use  }  to determine what's supposed to happen if some parameter is equal to one and what's supposed to happen if it's not equal to one, but I don't know how to use this to create new rows in a table. I need to know how to do this to be able to have the noun table add a row for the count form for masculine nouns when I set some parameter equal to one (let's say "cf"). Now, I only know how to make the code add the count form rather than a dash when the appropriate parameter is defined but this is not satisfactory, because I don't want the count form's row appearing for feminine and neuter nouns. So, could you advise me as to what I should do? I don't think I can just add the code for the new row within one of the parameters of the aforementioned if statements. I tried and the whole template got messed up.


text:
Thread:User talk:CodeCat/Dynamic Columns/Rows/reply

Showing and hiding table cells or whole rows with "if" is a bit tricky, because the table formatting code interferes with the code for the "if". Both use |, so things get a little confused. Furthermore, table formatting depends on the presence of line breaks, so if you don't get those right, things also don't work.

For the first problem, the solution is to use the template instead of | whenever you want to use a | for a table formatting tag, but inside some other kind of conditional code like "if" or "switch". This makes the code look even harder to understand but at least it works.

For the second problem you have to keep some things in mind when it comes to tables. All the table-specific formatting tags, like and | (new cell) and |- (new row), must be placed at the beginning of a line. They can be placed inside "if", but then that "if" must be placed on the beginning of the line, so that when it is evaluated and replaced with the result text, the table tags will end up on the beginning of the line instead of the "if".

I hope this helps.