var TYPES = {
	NEW:					"new", 
	ADD:					"comment", 
	EDIT:					"edit", 
	DELETE:					"delete", 
	RENAME:					"rename", 
	MULTIPLE:				"changes"
};

var LABELS = {
	// View skin labels:
	ADD_EDIT_PAGE: "Edit entire page",
	ADD_COMMENT: "Add comment",
	ADD_PAGE: "Page",
	ADD_NEW_TITLE: "(to add a new page, enter a new title here)",
	ADD_FROM: "Author",
	ADD_SHOW_HELP: "Show help",
	ADD_PLEASE_REREAD: "Please re-read your comment before adding it to the page.",
	ADD_BUTTON: "Add",
	QUOTE_TIP: "Copy the selected text to the 'Add comment' area at the bottom",
	QUOTE_BUTTON: "Quote",
	TEASER_TIP: "Add the selected text the the teasers collection (the random paragraphs at the top)",
	TEASER_BUTTON: "Teaser",
	
	// Recent_Changes labels:
	EXPAND_OPTIONS:			"show options",
	SHORTCUT:				"shortcuts:	",
	SHORTCUT_183_DAYS:		"6 months",
	SHORTCUT_91_DAYS:		"3 months",
	SHORTCUT_61_DAYS:		"2 months",
	SHORTCUT_30_DAYS:		"1 month",
	SHORTCUT_21_DAYS:		"3 weeks",
	SHORTCUT_14_DAYS:		"2 weeks",
	SHORTCUT_10_DAYS:		"10 days",
	SHORTCUT_7_DAYS:		"1 week",
	SHORTCUT_5_DAYS:		"5 days",
	SHORTCUT_3_DAYS:		"3 days",
	SHORTCUT_2_DAYS:		"2 days",
	SHORTCUT_1_DAY:			"1 day",
	SHORTCUT_12_HOURS:		"12 hours",
	SHORTCUT_8_HOURS:		"8 hours",
	SHORTCUT_6_HOURS:		"6 hours",
	SHORTCUT_3_HOURS:		"3 hours",
	SHORTCUT_NEWEST:		"since I last checked",
	SHORTCUT_ASCENDING:		"ascending",
	SHORTCUT_DESCENDING:	"descending",
	SHORTCUT_MAIN_CHANGES:	"major types",
	SHORTCUT_ALL_CHANGES:	"all",
	SHORTCUT_LESS:			"less",
	SHORTCUT_MORE:			"more",
	DAYS:					"days:	",
	ORDER:					"order:	",
	ORDER_DESCENDING:		"descending",
	ORDER_ASCENDING:		"ascending",
	FILTER:					"filter:	",
	SHOW_ICONS:				"show icons",
	MAJOR:					"sort by:	",
	MAJOR_CHANGE_DATE:		"change date",
	MAJOR_LAST_VISIT_DATE:	"visit date",
	MINOR:					"group:	",
	MINOR_PAGES:			"pages",
	MINOR_AUTHORS:			"authors",
	MINOR_CHANGES:			"none (changes only)",
	SHOW:					"show: ",
	SHOW_NEW:				"new pages",
	SHOW_ADD:				"comments",
	SHOW_EDIT:				"edits",
	SHOW_RENAME:			"renamed pages",
	SHOW_DELETE:			"deleted pages",
	SHOW_REDIRECT:			"redirected pages",
	SHOW_SEEN:				"seen changes",
	SHOW_UNVISITED:			"unvisited pages",
	NOTHING_NEW:				"<h3>Nothing new!</h3>\nNo new changes were found. You may want to consider looking for changes in a wider range:",
	LOADING:					"<h3>Loading<span id=loading_ellipsis>...</span></h3>\nTrying lo load the list of changes. (This may take a while)",
	PROPOSE_FILTER_OFF:		"Turn off filtering",
	PROPOSE_MAIN_CHANGES:	"Show changes of all major types",
	PROPOSE_SHOW_SEEN:	"Show changes you have already seen (this is especially relevant if other people use this computer)",
	PROPOSE_WIDEN_RANGE:	"Widen the rate range to \u200F",
	PROPOSE_UNVISITED_OFF:	"Show unvisited pages (who knows, some of them may be good)",
	PROPOSE_OTHER:			'If you can\'t find what to read, maybe try some <a href="?Random_Pages" class="cclink" target="_blank">random_pages</a>.\n',
	PAGE_PREFIX:			" &minus; ",
	PAGE_POSTFIX:			" by ",
	USER_PREFIX:			" &minus; ",
	USER_POSTFIX:			":	",
	CHANGE_PREFIX:			" &minus; ",
	CHANGE_POSTFIX:			" by ",
	TIMEDATE_DATE_PREFIX:	"on ",
	TIMEDATE_TIME_PREFIX:	" at ",
	TIMEDATE_POSTFIX:		".",
	HIGHLIGHTS:			"highlights:",
	DATES:					{
								"Past_Week":	"past week", 
								"2_Weeks_Ago":	"2 weeks ago", 
								"3_Weeks_Ago":	"3 weeks ago", 
								"4_Weeks_Ago":	"4 weeks ago", 
								"Long_Ago":	"long time ago",
								"Never":		"pages I never visited",
								"New":		"new pages",
								"Rename":		"renamed pages"
							},
	TYPE:					TYPES,
	EXPAND_HELP:			"show help",
	RECENT_HELP:					
		"This page lists all changes to the site in the last days.\n<ul>\n" +
		"<li>The <b>shortcuts</b> allow you to easily turn on some options and turn off others. You can use them instead of having to <b>show options</b> fully.</li>\n" +
		"<li>You can set the number of <b>days</b> to display. (Including periods shorter that 1 day. For example, 0.25 days is 6 hours.)</li>\n" +
		"<li>The list is ordered by time and date. The <b>ascending order</b> sorts the list from earliest to latest, while the <b>descending order</b> sorts it from latest to earliset.</li>\n" +
		'<li>You can <b>filter</b> out changes whithout a specified text. This way you can see only changes made by "Yonat", for example, or only changes to pages about "chiq_chaq".</li>\n' +
		"<li>The icon next to each change shows the change type. Pointing the cursor at this icon for a few seconds will pop a textual description of the change type. If loading the icons is too slow, you can choose not to <b>show icons</b>.</li>\n" +
		"<li>The <b>sort by change date</b> sorts the changes by when they were made.<br>\n" +
		"The <b>sort by visit date</b> sorts the changes by when you last visited the changes page.</li>\n" +
		"<li>The <b>group</b> options allows you to group together all changes to the same page, all changes by the same author, or to list each change separately.</li>\n" +
		"<li>You can choose to <b>show</b> only certain changes:\n" +
		"<ul><li><b>comments</b> are the text people append to the end of a page. Since most of the discussions is in the comments, showing them is recommended.</li>\n" +
		"<li><b>edits</b> are usually minor changes to a page, that not necessarily add new text. But since there are many edits, hiding them is recommended.</li>\n" +
		"<li><b>deleted pages</b> are no longer part of the site, so hiding them is recommended.</li>\n" +
		"<li><b>renamed pages</b> contain only an automatic redirection to another page.</li>\n" +
		"<li>If you are only interested in certain pages, you may want not to show <b>unvisited pages</b> to concentrate on the pages you like. You will still see <b>new pages</b> and <b>renamed pages</b> though.</li>\n" +
		"<li>Chiq_Chaq tries to remember the last time you visited each page, and so knows which changes you haven't seen yet. But if several people use the same computer, they may want to show <b>seen changes</b>.</li></ul></li>\n" +
		"</ul>",
	end:						undefined // bogus element to mark the end
};

function replaceLabels(labelsObject, s) { 
	return s.replace(/\$([a-zA-Z0-9._]+)/g, function(whole, label) { return (labelsObject[label] != undefined)? labelsObject[label] : whole; }); 
}

