You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2012/04/17 22:01:14 UTC

svn commit: r1327259 [4/7] - in /incubator/vcl/trunk/web: ./ .ht-inc/ js/ js/nls/ js/nls/ja_JP/ js/nls/zh_CN/ js/vcldojo/ js/vcldojo/nls/ js/vcldojo/nls/ja-jp/ js/vcldojo/nls/zh-cn/ locale/ locale/ja_JP/ locale/ja_JP/LC_MESSAGES/ locale/po_files/ local...

Modified: incubator/vcl/trunk/web/js/blockallocations.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/blockallocations.js?rev=1327259&r1=1327258&r2=1327259&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/blockallocations.js (original)
+++ incubator/vcl/trunk/web/js/blockallocations.js Tue Apr 17 20:01:13 2012
@@ -96,7 +96,7 @@ function populateBlockStoreCB(data, ioAr
 			end.setHours(data.items.endhs[i]);
 			end.setMinutes(data.items.endms[i]);
 			var btn = new dijit.form.Button({
-				label: "Remove",
+				label: _("Remove"),
 				onClick: createRemoveFunc(rmfunc, id)
 			});
 			store.newItem({id: id, start: start, start2: start2, end: end, remove: btn});
@@ -131,7 +131,7 @@ function populateBlockStoreCB(data, ioAr
 			end.setHours(data.items.endhs[i]);
 			end.setMinutes(data.items.endms[i]);
 			var btn = new dijit.form.Button({
-				label: "Remove",
+				label: _("Remove"),
 				onClick: createRemoveFunc(blockFormRemoveListSlot, id)
 			});
 			store.newItem({id: id, date1: date1, date2: date2, start: start, end: end, remove: btn});
@@ -151,7 +151,7 @@ function updateBlockStatus() {
 
 function updateBlockStatusCB(data, ioArgs) {
 	if(data.items.status && data.items.status == 'gone') {
-		dojo.byId('statusdiv').innerHTML = 'The selected Block Request no longer exists.';
+		dojo.byId('statusdiv').innerHTML = _('The selected Block Request no longer exists.');
 		return;
 	}
 	dojo.byId('available').innerHTML = data.items.available;
@@ -233,7 +233,7 @@ function blockFormAddWeeklyTime() {
 		teststart = teststart.getTime();
 		if(startts < testend &&
 		   endts > teststart) {
-			alert('These times overlap with an existing time slot');
+			alert(_('These times overlap with an existing time slot'));
 			return;
 		}
 	}
@@ -244,7 +244,7 @@ function blockFormAddWeeklyTime() {
 	requestBlockAddWeeklyStore.nextid = id;
 
 	var btn = new dijit.form.Button({
-		label: "Remove",
+		label: _("Remove"),
 		onClick: function() {blockFormRemoveWeeklyTime(id);}
 	});
 	requestBlockAddWeeklyStore.newItem({id: id, start: start, start2: s, end: end, remove: btn});
@@ -272,7 +272,7 @@ function blockFormAddMonthlyTime() {
 	for(var i = 0; i < len; i++) {
 		if(startts < items[i].end[0].getTime() &&
 		   endts > items[i].start2[0].getTime()) {
-			alert('These times overlap with an existing time slot');
+			alert(_('These times overlap with an existing time slot'));
 			return;
 		}
 	}
@@ -283,7 +283,7 @@ function blockFormAddMonthlyTime() {
 	requestBlockAddMonthlyStore.nextid = id;
 
 	var btn = new dijit.form.Button({
-		label: "Remove",
+		label: _("Remove"),
 		onClick: function() {blockFormRemoveMonthlyTime(id);}
 	});
 	requestBlockAddMonthlyStore.newItem({id: id, start: start, start2: s, end: end, remove: btn});
@@ -302,7 +302,7 @@ function blockFormAddListSlot() {
 	today.setSeconds(0);
 	today.setMilliseconds(0);
 	if(dateobj.value < today) {
-		alert('The date must be today or later');
+		alert(_('The date must be today or later'));
 		return;
 	}
 
@@ -328,7 +328,7 @@ function blockFormAddListSlot() {
 		var checkend = items[i].date2[0].getTime() + items[i].end[0].getTime();
 		if(startts < checkend &&
 		   endts > checkstart) {
-			alert('The date and times overlap with an existing time slot');
+			alert(_('The date and times overlap with an existing time slot'));
 			return;
 		}
 	}
@@ -339,7 +339,7 @@ function blockFormAddListSlot() {
 	requestBlockAddListStore.nextid = id;
 
 	var btn = new dijit.form.Button({
-		label: "Remove",
+		label: _("Remove"),
 		onClick: function() {blockFormRemoveListSlot(id);}
 	});
 	requestBlockAddListStore.newItem({id: id, date1: date1, date2: d, start: start, end: end, remove: btn});
@@ -379,7 +379,7 @@ function blockFormConfirm(mode) {
 	   (dijit.byId('groupsel') && ! dijit.byId('groupsel').isValid()) ||
 		(dijit.byId('brname') && ! dijit.byId('brname').isValid()) ||
 		(dijit.byId('browner') && ! dijit.byId('browner').isValid())) {
-		alert('Please fix invalid values before submitting.');
+		alert(_('Please fix invalid values before submitting.'));
 		return;
 	}
 	var weekly = dojo.byId('weeklyradio');
@@ -409,13 +409,13 @@ function blockFormVerifyWeekly(mode) {
 	if(! dijit.byId('wkfirstdate').isValid()) {
 		dijit.byId('wkfirstdate')._hasBeenBlurred = true;
 		dijit.byId('wkfirstdate').validate();
-		alert('Please fill in First Date of Usage');
+		alert(_('Please fill in First Date of Usage'));
 		return;
 	}
 	if(! dijit.byId('wklastdate').isValid()) {
 		dijit.byId('wklastdate')._hasBeenBlurred = true;
 		dijit.byId('wklastdate').validate();
-		alert('Please fill in Last Date of Usage');
+		alert(_('Please fill in Last Date of Usage'));
 		return;
 	}
 	var today = new Date();
@@ -424,39 +424,39 @@ function blockFormVerifyWeekly(mode) {
 	today.setSeconds(0);
 	today.setMilliseconds(0);
 	if(pagemode != 'edit' && dijit.byId('wkfirstdate').value < today) {
-		alert('The First Date of Usage must be today or later');
+		alert(_('The First Date of Usage must be today or later'));
 		return;
 	}
 	if(pagemode != 'edit' && dijit.byId('wklastdate').value < dijit.byId('wkfirstdate').value) {
-		alert('The Last Date of Usage must be the same or later than the First Date of Usage');
+		alert(_('The Last Date of Usage must be the same or later than the First Date of Usage'));
 		return;
 	}
 	if(pagemode == 'edit' && dijit.byId('wklastdate').value < today) {
-		alert('The Last Date of Usage must be today or later');
+		alert(_('The Last Date of Usage must be today or later'));
 		return;
 	}
 	var days = new Array();
-	if(dojo.byId('wdaysSunday').checked)
-		days.push('Sunday');
-	if(dojo.byId('wdaysMonday').checked)
-		days.push('Monday');
-	if(dojo.byId('wdaysTuesday').checked)
-		days.push('Tuesday');
-	if(dojo.byId('wdaysWednesday').checked)
-		days.push('Wednesday');
-	if(dojo.byId('wdaysThursday').checked)
-		days.push('Thursday');
-	if(dojo.byId('wdaysFriday').checked)
-		days.push('Friday');
-	if(dojo.byId('wdaysSaturday').checked)
-		days.push('Saturday');
+	if(dojo.byId('wdays0').checked)
+		days.push(_('Sunday'));
+	if(dojo.byId('wdays1').checked)
+		days.push(_('Monday'));
+	if(dojo.byId('wdays2').checked)
+		days.push(_('Tuesday'));
+	if(dojo.byId('wdays3').checked)
+		days.push(_('Wednesday'));
+	if(dojo.byId('wdays4').checked)
+		days.push(_('Thursday'));
+	if(dojo.byId('wdays5').checked)
+		days.push(_('Friday'));
+	if(dojo.byId('wdays6').checked)
+		days.push(_('Saturday'));
 	if(days.length == 0) {
-		alert('At least one day must be checked when using "Repeating Weekly"');
+		alert(_('At least one day must be checked when using "Repeating Weekly"'));
 		return;
 	}
 	var len = requestBlockAddWeeklyStore._getItemsArray().length;
 	if(len == 0) {
-		alert('At least one start/end combination must be entered when using "Repeating Weekly"');
+		alert(_('At least one start/end combination must be entered when using "Repeating Weekly"'));
 		return;
 	}
 	if(dijit.byId('groupsel'))
@@ -465,27 +465,27 @@ function blockFormVerifyWeekly(mode) {
 		var groupselobj = dojo.byId('groupsel');
 	if(mode == 'request' && groupselobj.value == 0 &&
 	   dijit.byId('comments').value.length == 0) {
-		alert('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.');
+		alert(_('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.'));
 		return;
 	}
 	if(mode != 'request') {
-		dojo.byId('confnametitle').innerHTML = 'Name:';
+		dojo.byId('confnametitle').innerHTML = _('Name:');
 		dojo.byId('confname').innerHTML = dijit.byId('brname').textbox.value;
-		dojo.byId('confownertitle').innerHTML = 'Owner:';
+		dojo.byId('confownertitle').innerHTML = _('Owner:');
 		dojo.byId('confowner').innerHTML = dijit.byId('browner').textbox.value;
 	}
 	dojo.byId('confimage').innerHTML = getSelectText('imagesel');
 	dojo.byId('confseats').innerHTML = dijit.byId('machinecnt').value;
 	if(groupselobj.value == 0)
-		dojo.byId('confgroup').innerHTML = 'specified in comments';
+		dojo.byId('confgroup').innerHTML = _('specified in comments');
 	else
 		dojo.byId('confgroup').innerHTML = getSelectText('groupsel');
-	dojo.byId('confrepeat').innerHTML = 'Weekly';
-	dojo.byId('conftitle1').innerHTML = 'First Date:';
+	dojo.byId('confrepeat').innerHTML = _('Weekly');
+	dojo.byId('conftitle1').innerHTML = _('First Date:');
 	dojo.byId('confvalue1').innerHTML = dijit.byId('wkfirstdate').getDisplayedValue();
-	dojo.byId('conftitle2').innerHTML = 'Last Date:';
+	dojo.byId('conftitle2').innerHTML = _('Last Date:');
 	dojo.byId('confvalue2').innerHTML = dijit.byId('wklastdate').getDisplayedValue();
-	dojo.byId('conftitle3').innerHTML = 'Repeating on these days:';
+	dojo.byId('conftitle3').innerHTML = _('Repeating on these days:');
 	dojo.byId('confvalue3').innerHTML = days.join('<br>');
 	var times = new Array();
 	var items = requestBlockAddWeeklyStore._getItemsArray();
@@ -499,7 +499,7 @@ function blockFormVerifyWeekly(mode) {
 	var times2 = new Array();
 	for(i = 0; i < len; i++)
 		times2.push(times[i].val);
-	dojo.byId('conftitle4').innerHTML = 'During these times:';
+	dojo.byId('conftitle4').innerHTML = _('During these times:');
 	dojo.byId('confvalue4').innerHTML = times2.join('<br>');
 	if(dijit.byId('comments') && dijit.byId('comments').value.length)
 		dojo.removeClass('commentsnote', 'hidden');
@@ -508,19 +508,19 @@ function blockFormVerifyWeekly(mode) {
 
 function blockFormSubmitWeekly(mode) {
 	var days = new Array();
-	if(dojo.byId('wdaysSunday').checked)
+	if(dojo.byId('wdays0').checked)
 		days.push(0);
-	if(dojo.byId('wdaysMonday').checked)
+	if(dojo.byId('wdays1').checked)
 		days.push(1);
-	if(dojo.byId('wdaysTuesday').checked)
+	if(dojo.byId('wdays2').checked)
 		days.push(2);
-	if(dojo.byId('wdaysWednesday').checked)
+	if(dojo.byId('wdays3').checked)
 		days.push(3);
-	if(dojo.byId('wdaysThursday').checked)
+	if(dojo.byId('wdays4').checked)
 		days.push(4);
-	if(dojo.byId('wdaysFriday').checked)
+	if(dojo.byId('wdays5').checked)
 		days.push(5);
-	if(dojo.byId('wdaysSaturday').checked)
+	if(dojo.byId('wdays6').checked)
 		days.push(6);
 	var times = new Array();
 	var items = requestBlockAddWeeklyStore._getItemsArray();
@@ -572,13 +572,13 @@ function blockFormVerifyMonthly(mode) {
 	if(! dijit.byId('mnfirstdate').isValid()) {
 		dijit.byId('mnfirstdate')._hasBeenBlurred = true;
 		dijit.byId('mnfirstdate').validate();
-		alert('Please fill in First Date of Usage');
+		alert(_('Please fill in First Date of Usage'));
 		return;
 	}
 	if(! dijit.byId('mnlastdate').isValid()) {
 		dijit.byId('mnlastdate')._hasBeenBlurred = true;
 		dijit.byId('mnlastdate').validate();
-		alert('Please fill in Last Date of Usage');
+		alert(_('Please fill in Last Date of Usage'));
 		return;
 	}
 	var today = new Date();
@@ -587,20 +587,20 @@ function blockFormVerifyMonthly(mode) {
 	today.setSeconds(0);
 	today.setMilliseconds(0);
 	if(pagemode != 'edit' && dijit.byId('mnfirstdate').value < today) {
-		alert('The First Date of Usage must be today or later');
+		alert(_('The First Date of Usage must be today or later'));
 		return;
 	}
 	if(pagemode != 'edit' && dijit.byId('mnlastdate').value < dijit.byId('mnfirstdate').value) {
-		alert('The Last Date of Usage must be the same or later than the First Date of Usage');
+		alert(_('The Last Date of Usage must be the same or later than the First Date of Usage'));
 		return;
 	}
 	if(pagemode == 'edit' && dijit.byId('mnlastdate').value < today) {
-		alert('The Last Date of Usage must be today or later');
+		alert(_('The Last Date of Usage must be today or later'));
 		return;
 	}
 	var len = requestBlockAddMonthlyStore._getItemsArray().length;
 	if(len == 0) {
-		alert('At least one start/end combination must be entered when using "Repeating Monthly"');
+		alert(_('At least one start/end combination must be entered when using "Repeating Monthly"'));
 		return;
 	}
 	if(dijit.byId('groupsel'))
@@ -609,32 +609,32 @@ function blockFormVerifyMonthly(mode) {
 		var groupselobj = dojo.byId('groupsel');
 	if(mode == 'request' && groupselobj.value == 0 &&
 	   dijit.byId('comments').value.length == 0) {
-		alert('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.');
+		alert(_('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.'));
 		return;
 	}
 	if(mode != 'request') {
-		dojo.byId('confnametitle').innerHTML = 'Name:';
+		dojo.byId('confnametitle').innerHTML = _('Name:');
 		dojo.byId('confname').innerHTML = dijit.byId('brname').textbox.value;
-		dojo.byId('confownertitle').innerHTML = 'Owner:';
+		dojo.byId('confownertitle').innerHTML = _('Owner:');
 		dojo.byId('confowner').innerHTML = dijit.byId('browner').textbox.value;
 	}
 	dojo.byId('confimage').innerHTML = getSelectText('imagesel');
 	dojo.byId('confseats').innerHTML = dijit.byId('machinecnt').value;
 	if(groupselobj.value == 0)
-		dojo.byId('confgroup').innerHTML = 'specified in comments';
+		dojo.byId('confgroup').innerHTML = _('specified in comments');
 	else
 		dojo.byId('confgroup').innerHTML = getSelectText('groupsel');
-	dojo.byId('confrepeat').innerHTML = 'Monthly';
-	dojo.byId('conftitle1').innerHTML = 'First Date:';
+	dojo.byId('confrepeat').innerHTML = _('Monthly');
+	dojo.byId('conftitle1').innerHTML = _('First Date:');
 	dojo.byId('confvalue1').innerHTML = dijit.byId('mnfirstdate').getDisplayedValue();
-	dojo.byId('conftitle2').innerHTML = 'Last Date:';
+	dojo.byId('conftitle2').innerHTML = _('Last Date:');
 	dojo.byId('confvalue2').innerHTML = dijit.byId('mnlastdate').getDisplayedValue();
-	dojo.byId('conftitle3').innerHTML = 'Repeat on:';
+	dojo.byId('conftitle3').innerHTML = _('Repeat on:');
 	var obj = dojo.byId('mnweeknum');
 	var date1 = obj.options[obj.selectedIndex].text;
 	obj = dojo.byId('mnday');
 	date1 += " " + obj.options[obj.selectedIndex].text;
-	dojo.byId('confvalue3').innerHTML = date1 + " of each month";
+	dojo.byId('confvalue3').innerHTML = date1 + _(" of each month");
 	var times = new Array();
 	var items = requestBlockAddMonthlyStore._getItemsArray();
 	for(var i = 0; i < len; i++) {
@@ -647,7 +647,7 @@ function blockFormVerifyMonthly(mode) {
 	var times2 = new Array();
 	for(i = 0; i < len; i++)
 		times2.push(times[i].val);
-	dojo.byId('conftitle4').innerHTML = 'During these times:';
+	dojo.byId('conftitle4').innerHTML = _('During these times:');
 	dojo.byId('confvalue4').innerHTML = times2.join('<br>');
 	if(dijit.byId('comments') && dijit.byId('comments').value.length)
 		dojo.removeClass('commentsnote', 'hidden');
@@ -706,7 +706,7 @@ function blockFormSubmitMonthly(mode) {
 function blockFormVerifyList(mode) {
 	var len = requestBlockAddListStore._getItemsArray().length;
 	if(len == 0) {
-		alert('At least one date/start/end combination must be entered when using "List of Dates/Times"');
+		alert(_('At least one date/start/end combination must be entered when using "List of Dates/Times"'));
 		return;
 	}
 	if(dijit.byId('groupsel'))
@@ -714,23 +714,23 @@ function blockFormVerifyList(mode) {
 	else
 		var groupselobj = dojo.byId('groupsel');
 	if(groupselobj.value == 0 && dijit.byId('comments').value.length == 0) {
-		alert('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.');
+		alert(_('When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.'));
 		return;
 	}
 	if(mode != 'request') {
-		dojo.byId('confnametitle').innerHTML = 'Name:';
+		dojo.byId('confnametitle').innerHTML = _('Name:');
 		dojo.byId('confname').innerHTML = dijit.byId('brname').textbox.value;
-		dojo.byId('confownertitle').innerHTML = 'Owner:';
+		dojo.byId('confownertitle').innerHTML = _('Owner:');
 		dojo.byId('confowner').innerHTML = dijit.byId('browner').textbox.value;
 	}
 	dojo.byId('confimage').innerHTML = getSelectText('imagesel');
 	dojo.byId('confseats').innerHTML = dijit.byId('machinecnt').value;
 	if(groupselobj.value == 0)
-		dojo.byId('confgroup').innerHTML = 'specified in comments';
+		dojo.byId('confgroup').innerHTML = _('specified in comments');
 	else
 		dojo.byId('confgroup').innerHTML = getSelectText('groupsel');
-	dojo.byId('confrepeat').innerHTML = 'List of Dates/Times';
-	dojo.byId('conftitle1').innerHTML = 'Repeat on:';
+	dojo.byId('confrepeat').innerHTML = _('List of Dates/Times');
+	dojo.byId('conftitle1').innerHTML = _('Repeat on:');
 	var slots = new Array();
 	var items = requestBlockAddListStore._getItemsArray();
 	var date1 = '';
@@ -902,14 +902,14 @@ function deleteBlockConfirmCB(data, ioAr
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'Weekly';
-		dojo.byId('conftitle1').innerHTML = 'First Date:';
+		dojo.byId('confrepeat').innerHTML = _('Weekly');
+		dojo.byId('conftitle1').innerHTML = _('First Date:');
 		dojo.byId('confvalue1').innerHTML = data.items.startdate;
-		dojo.byId('conftitle2').innerHTML = 'Last Date:';
+		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('conftitle3').innerHTML = 'Repeating on these days:';
+		dojo.byId('conftitle3').innerHTML = _('Repeating on these days:');
 		dojo.byId('confvalue3').innerHTML = data.items.days.join('<br>');
-		dojo.byId('conftitle4').innerHTML = 'During these times:';
+		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
 	else if(data.items.repeating == 'monthly') {
@@ -918,14 +918,14 @@ function deleteBlockConfirmCB(data, ioAr
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'Monthly';
-		dojo.byId('conftitle1').innerHTML = 'First Date:';
+		dojo.byId('confrepeat').innerHTML = _('Monthly');
+		dojo.byId('conftitle1').innerHTML = _('First Date:');
 		dojo.byId('confvalue1').innerHTML = data.items.startdate;
-		dojo.byId('conftitle2').innerHTML = 'Last Date:';
+		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('conftitle3').innerHTML = 'Repeat on:';
-		dojo.byId('confvalue3').innerHTML = data.items.date1 + " of each month";
-		dojo.byId('conftitle4').innerHTML = 'During these times:';
+		dojo.byId('conftitle3').innerHTML = _('Repeat on:');
+		dojo.byId('confvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
 	else if(data.items.repeating == 'list') {
@@ -934,8 +934,8 @@ function deleteBlockConfirmCB(data, ioAr
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'List of Dates/Times';
-		dojo.byId('conftitle1').innerHTML = 'Repeat on:';
+		dojo.byId('confrepeat').innerHTML = _('List of Dates/Times');
+		dojo.byId('conftitle1').innerHTML = _('Repeat on:');
 		dojo.byId('confvalue1').innerHTML = data.items.slots.join('<br>');
 	}
 	dojo.byId('submitdeletecont').value = data.items.cont;
@@ -963,14 +963,14 @@ function viewBlockAllocationCB(data, ioA
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'Weekly';
-		dojo.byId('conftitle1').innerHTML = 'First Date:';
+		dojo.byId('confrepeat').innerHTML = _('Weekly');
+		dojo.byId('conftitle1').innerHTML = _('First Date:');
 		dojo.byId('confvalue1').innerHTML = data.items.startdate;
-		dojo.byId('conftitle2').innerHTML = 'Last Date:';
+		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('conftitle3').innerHTML = 'Repeating on these days:';
+		dojo.byId('conftitle3').innerHTML = _('Repeating on these days:');
 		dojo.byId('confvalue3').innerHTML = data.items.days.join('<br>');
-		dojo.byId('conftitle4').innerHTML = 'During these times:';
+		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
 	else if(data.items.repeating == 'monthly') {
@@ -979,14 +979,14 @@ function viewBlockAllocationCB(data, ioA
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'Monthly';
-		dojo.byId('conftitle1').innerHTML = 'First Date:';
+		dojo.byId('confrepeat').innerHTML = _('Monthly');
+		dojo.byId('conftitle1').innerHTML = _('First Date:');
 		dojo.byId('confvalue1').innerHTML = data.items.startdate;
-		dojo.byId('conftitle2').innerHTML = 'Last Date:';
+		dojo.byId('conftitle2').innerHTML = _('Last Date:');
 		dojo.byId('confvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('conftitle3').innerHTML = 'Repeat on:';
-		dojo.byId('confvalue3').innerHTML = data.items.date1 + " of each month";
-		dojo.byId('conftitle4').innerHTML = 'During these times:';
+		dojo.byId('conftitle3').innerHTML = _('Repeat on:');
+		dojo.byId('confvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('conftitle4').innerHTML = _('During these times:');
 		dojo.byId('confvalue4').innerHTML = data.items.times.join('<br>');
 	}
 	else if(data.items.repeating == 'list') {
@@ -995,8 +995,8 @@ function viewBlockAllocationCB(data, ioA
 		dojo.byId('confimage').innerHTML = data.items.image;
 		dojo.byId('confseats').innerHTML = data.items.seats;
 		dojo.byId('confgroup').innerHTML = data.items.usergroup;
-		dojo.byId('confrepeat').innerHTML = 'List of Dates/Times';
-		dojo.byId('conftitle1').innerHTML = 'Repeat on:';
+		dojo.byId('confrepeat').innerHTML = _('List of Dates/Times');
+		dojo.byId('conftitle1').innerHTML = _('Repeat on:');
 		dojo.byId('confvalue1').innerHTML = data.items.slots.join('<br>');
 	}
 	document.body.style.cursor = 'default';
@@ -1032,36 +1032,36 @@ function acceptBlockConfirmCB(data, ioAr
 		dojo.removeClass('acceptemailwarning', 'hidden');
 	}
 	if(data.items.repeating == 'weekly') {
-		dojo.byId('acceptrepeat').innerHTML = 'Weekly';
-		dojo.byId('accepttitle1').innerHTML = 'First Date:';
+		dojo.byId('acceptrepeat').innerHTML = _('Weekly');
+		dojo.byId('accepttitle1').innerHTML = _('First Date:');
 		dojo.byId('acceptvalue1').innerHTML = data.items.startdate;
-		dojo.byId('accepttitle2').innerHTML = 'Last Date:';
+		dojo.byId('accepttitle2').innerHTML = _('Last Date:');
 		dojo.byId('acceptvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('accepttitle3').innerHTML = 'Repeating on these days:';
+		dojo.byId('accepttitle3').innerHTML = _('Repeating on these days:');
 		dojo.byId('acceptvalue3').innerHTML = data.items.days.join('<br>');
-		dojo.byId('accepttitle4').innerHTML = 'During these times:';
+		dojo.byId('accepttitle4').innerHTML = _('During these times:');
 		dojo.byId('acceptvalue4').innerHTML = data.items.times.join('<br>');
-		dojo.byId('accepttitle5').innerHTML = 'User Submitted Comments:';
+		dojo.byId('accepttitle5').innerHTML = _('User Submitted Comments:');
 		dojo.byId('acceptvalue5').innerHTML = data.items.comments;
 	}
 	else if(data.items.repeating == 'monthly') {
-		dojo.byId('acceptrepeat').innerHTML = 'Monthly';
-		dojo.byId('accepttitle1').innerHTML = 'First Date:';
+		dojo.byId('acceptrepeat').innerHTML = _('Monthly');
+		dojo.byId('accepttitle1').innerHTML = _('First Date:');
 		dojo.byId('acceptvalue1').innerHTML = data.items.startdate;
-		dojo.byId('accepttitle2').innerHTML = 'Last Date:';
+		dojo.byId('accepttitle2').innerHTML = _('Last Date:');
 		dojo.byId('acceptvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('accepttitle3').innerHTML = 'Repeat on:';
-		dojo.byId('acceptvalue3').innerHTML = data.items.date1 + " of each month";
-		dojo.byId('accepttitle4').innerHTML = 'During these times:';
+		dojo.byId('accepttitle3').innerHTML = _('Repeat on:');
+		dojo.byId('acceptvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('accepttitle4').innerHTML = _('During these times:');
 		dojo.byId('acceptvalue4').innerHTML = data.items.times.join('<br>');
 		dojo.byId('accepttitle5').innerHTML = 'User Submitted Comments:';
 		dojo.byId('acceptvalue5').innerHTML = data.items.comments;
 	}
 	else if(data.items.repeating == 'list') {
-		dojo.byId('acceptrepeat').innerHTML = 'List of Dates/Times';
-		dojo.byId('accepttitle1').innerHTML = 'Repeat on:';
+		dojo.byId('acceptrepeat').innerHTML = _('List of Dates/Times');
+		dojo.byId('accepttitle1').innerHTML = _('Repeat on:');
 		dojo.byId('acceptvalue1').innerHTML = data.items.slots.join('<br>');
-		dojo.byId('accepttitle2').innerHTML = 'User Submitted Comments:';
+		dojo.byId('accepttitle2').innerHTML = _('User Submitted Comments:');
 		dojo.byId('acceptvalue2').innerHTML = data.items.comments;
 	}
 	dojo.byId('submitacceptcont').value = data.items.cont;
@@ -1105,36 +1105,36 @@ function rejectBlockConfirmCB(data, ioAr
 		dojo.removeClass('rejectemailwarning', 'hidden');
 	}
 	if(data.items.repeating == 'weekly') {
-		dojo.byId('rejectrepeat').innerHTML = 'Weekly';
-		dojo.byId('rejecttitle1').innerHTML = 'First Date:';
+		dojo.byId('rejectrepeat').innerHTML = _('Weekly');
+		dojo.byId('rejecttitle1').innerHTML = _('First Date:');
 		dojo.byId('rejectvalue1').innerHTML = data.items.startdate;
-		dojo.byId('rejecttitle2').innerHTML = 'Last Date:';
+		dojo.byId('rejecttitle2').innerHTML = _('Last Date:');
 		dojo.byId('rejectvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('rejecttitle3').innerHTML = 'Repeating on these days:';
+		dojo.byId('rejecttitle3').innerHTML = _('Repeating on these days:');
 		dojo.byId('rejectvalue3').innerHTML = data.items.days.join('<br>');
-		dojo.byId('rejecttitle4').innerHTML = 'During these times:';
+		dojo.byId('rejecttitle4').innerHTML = _('During these times:');
 		dojo.byId('rejectvalue4').innerHTML = data.items.times.join('<br>');
-		dojo.byId('rejecttitle5').innerHTML = 'User Submitted Comments:';
+		dojo.byId('rejecttitle5').innerHTML = _('User Submitted Comments:');
 		dojo.byId('rejectvalue5').innerHTML = data.items.comments;
 	}
 	else if(data.items.repeating == 'monthly') {
-		dojo.byId('rejectrepeat').innerHTML = 'Monthly';
-		dojo.byId('rejecttitle1').innerHTML = 'First Date:';
+		dojo.byId('rejectrepeat').innerHTML = _('Monthly');
+		dojo.byId('rejecttitle1').innerHTML = _('First Date:');
 		dojo.byId('rejectvalue1').innerHTML = data.items.startdate;
-		dojo.byId('rejecttitle2').innerHTML = 'Last Date:';
+		dojo.byId('rejecttitle2').innerHTML = _('Last Date:');
 		dojo.byId('rejectvalue2').innerHTML = data.items.lastdate;
-		dojo.byId('rejecttitle3').innerHTML = 'Repeat on:';
-		dojo.byId('rejectvalue3').innerHTML = data.items.date1 + " of each month";
-		dojo.byId('rejecttitle4').innerHTML = 'During these times:';
+		dojo.byId('rejecttitle3').innerHTML = _('Repeat on:');
+		dojo.byId('rejectvalue3').innerHTML = data.items.date1 + _(" of each month");
+		dojo.byId('rejecttitle4').innerHTML = _('During these times:');
 		dojo.byId('rejectvalue4').innerHTML = data.items.times.join('<br>');
-		dojo.byId('rejecttitle5').innerHTML = 'User Submitted Comments:';
+		dojo.byId('rejecttitle5').innerHTML = _('User Submitted Comments:');
 		dojo.byId('rejectvalue5').innerHTML = data.items.comments;
 	}
 	else if(data.items.repeating == 'list') {
-		dojo.byId('rejectrepeat').innerHTML = 'List of Dates/Times';
-		dojo.byId('rejecttitle1').innerHTML = 'Repeat on:';
+		dojo.byId('rejectrepeat').innerHTML = _('List of Dates/Times');
+		dojo.byId('rejecttitle1').innerHTML = _('Repeat on:');
 		dojo.byId('rejectvalue1').innerHTML = data.items.slots.join('<br>');
-		dojo.byId('rejecttitle2').innerHTML = 'User Submitted Comments:';
+		dojo.byId('rejecttitle2').innerHTML = _('User Submitted Comments:');
 		dojo.byId('rejectvalue2').innerHTML = data.items.comments;
 	}
 	dojo.byId('submitrejectcont').value = data.items.cont;
@@ -1199,14 +1199,13 @@ function viewBlockTimesCB(data, ioArgs) 
 	var items = data.items.items;
 	for(var i = 0; i < items.length; i++) {
 		if(items[i].skip == 0)
-			var label = 'Skip';
+			var label = _('Skip');
 		else
-			var label = 'Use';
+			var label = _('Use');
 		var btn = new dijit.form.Button({
 			label: label,
 			onClick: createRemoveFunc(toggleBlockTime, items[i].id)
 		});
-		var foo = 'bar';
 		items[i].delbtn = btn;
 	}
 	var newdata = new Object;
@@ -1238,9 +1237,9 @@ function toggleBlockTimeCB(data, ioArgs)
 			function(items, request) {
 				items[0].skip[0] = data.items.newval;
 				if(data.items.newval == 1)
-					items[0].delbtn[0].setLabel('Use');
+					items[0].delbtn[0].setLabel(_('Use'));
 				else
-					items[0].delbtn[0].setLabel('Skip');
+					items[0].delbtn[0].setLabel(_('Skip'));
 				blockTimesGrid.update();
 			}
 	});
@@ -1336,11 +1335,11 @@ function updateAllocatedMachinesCB(data,
 	graph.labeldata = data.items.virtual.points;
 	graph.render();
 	if(data.items.bare.total != 0)
-		dojo.byId('totalbare').innerHTML = 'Total online: ' + data.items.bare.total;
+		dojo.byId('totalbare').innerHTML = _('Total online: ') + data.items.bare.total;
 	else
 		dojo.byId('totalbare').innerHTML = '';
 	if(data.items.virtual.total != 0)
-		dojo.byId('totalvirtual').innerHTML = 'Total online: ' + data.items.virtual.total;
+		dojo.byId('totalvirtual').innerHTML = _('Total online: ') + data.items.virtual.total;
 	else
 		dojo.byId('totalvirtual').innerHTML = '';
 }

Modified: incubator/vcl/trunk/web/js/code.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/code.js?rev=1327259&r1=1327258&r2=1327259&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/code.js (original)
+++ incubator/vcl/trunk/web/js/code.js Tue Apr 17 20:01:13 2012
@@ -35,6 +35,12 @@ function setBrowser() {
 }
 setBrowser();
 
+function _(str) {
+	if(! usenls || ! (str in nlsmessages))
+		return str;
+	return nlsmessages[str];
+}
+
 function testJS() {
 	if(document.getElementById('testjavascript'))
 		document.getElementById('testjavascript').value = '1';
@@ -266,10 +272,10 @@ function checkNewLocalPassword() {
 		stat.innerHTML = '';
 	}
 	else if(pwd1.value == pwd2.value) {
-		stat.innerHTML = '<font color="#008000">match</font>';
+		stat.innerHTML = '<font color="#008000">' + _('match') + '</font>';
 	}
 	else {
-		stat.innerHTML = '<font color="red">no match</font>';
+		stat.innerHTML = '<font color="red">' + _('no match') + '</font>';
 	}
 }
 

Added: incubator/vcl/trunk/web/js/nls/ja_JP/messages.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/nls/ja_JP/messages.js?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/nls/ja_JP/messages.js (added)
+++ incubator/vcl/trunk/web/js/nls/ja_JP/messages.js Tue Apr 17 20:01:13 2012
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+nlsmessages = {
+'Times cannot be suggested for cluster reservations': 'タイムズは、クラスタの予約のために提案することはできません',
+'Cancel': 'キャンセル',
+'Okay': '良い',
+'Modify Reservation': '予約を変更する',
+'Please select a valid environment.': '有効な環境を選択してください。',
+'View Available Times': '利用可能時間を表示',
+'days': '日',
+'hours': '時間',
+'hour': '時間',
+'Loading...': '負荷',
+'The end time must be later than the start time.': '終了時間は開始時間より後のでなければなりません',
+'The reservation you selected<br>to edit has expired.<br><br>': '編集する選択した予約は有効期限が切れています',
+'The reservation you selected<br>to reboot has expired.<br><br>': '再起動を選択した予約は有効期限が切れています',
+'The reservation you selected<br>to reinstall has expired.<br><br>': '再インストールするを選択予約の期限が切れています',
+'An invalid version was submitted.': '無効なバージョンが提出されました',
+' Ready to connect in ': 'に接続する準備ができました',
+' second': '2番目の',
+' seconds': '秒',
+'match': '一致',
+'no match': '不一致',
+'Remove': '削除する',
+'Skip': 'スキップ',
+'Use': '使用',
+'Name:': '名',
+'Owner:': '所有者',
+'specified in comments': 'コメントで指定された',
+'Monthly': '毎月',
+'First Date:': '最初の日',
+'Last Date:': '最後の日',
+'Repeat on:': 'を繰り返す',
+' of each month': '各月の',
+'During these times:': 'これらの時間帯',
+'List of Dates/Times': '日付と時刻のリスト',
+'Weekly': '毎週',
+'Repeating on these days:': 'これらの日に繰り返し',
+'User Submitted Comments;': 'ユーザが投稿したコメント',
+'Total online: ': '合計オンライン',
+'These times overlap with an existing time slot': 'これらの時間は、既存のタイムスロットと重なる',
+'The date must be today or later': '日付が今日以降である必要があります',
+'The date and times overlap with an existing time slot': '日付と時刻は、既存のタイムスロットと重なる',
+'Please fix invalid values before submitting.': '送信する前に、無効な値を修正してください。',
+'Please fill in First Date of Usage': '使用の最初の日付を記入してください',
+'Please fill in Last Date of Usage': '使用の最終日を記入してください',
+'The First Date of Usage must be today or later': '使用の最初の日付は、今日以降である必要があります',
+'The Last Date of Usage must be the same or later than the First Date of Usage': '使用の最終日は、後の使用の最初の日付と同じかでなければなりません',
+'The Last Date of Usage must be today or later': '使用の最終日が今日以降である必要があります',
+'At least one day must be checked when using "Repeating Weekly"': '繰り返しウィークリーを使用する場合は、少なくとも一日をチェックする必要があります',
+'At least one start/end combination must be entered when using "Repeating Weekly"': '繰り返しウィークリーを使用する場合は、少なくとも一つの開始/終了の組み合わせを入力する必要があります',
+'When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.': 'ユーザグループとして(記載されていないグループ)提出する際に、情報がどのようなグループを作成する必要があるについてのコメントに含まれる必要があります。',
+'At least one start/end combination must be entered when using "Repeating Monthly"': 'At least one start/end combination must be entered when using Repeating Monthly',
+'At least one date/start/end combination must be entered when using "List of Dates/Times"': '日付/時刻のリストを使用する場合は、少なくとも一つの日付/開始/終了の組み合わせを入力する必要があります',
+'Sunday': '日曜日',
+'Monday': '月曜日',
+'Tuesday': '火曜日',
+'Wednesday': '水曜日',
+'Thursday': '木曜日',
+'Friday': '金曜日',
+'Saturday': '土曜日'
+}

Added: incubator/vcl/trunk/web/js/nls/messages.js.template
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/nls/messages.js.template?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/nls/messages.js.template (added)
+++ incubator/vcl/trunk/web/js/nls/messages.js.template Tue Apr 17 20:01:13 2012
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+nlsmessages = {
+'Times cannot be suggested for cluster reservations': '',
+'Cancel': '',
+'Okay': '',
+'Modify Reservation': '',
+'Please select a valid environment.': '',
+'View Available Times': '',
+'days': '',
+'hours': '',
+'hour': '',
+'Loading...': '',
+'The end time must be later than the start time.': '',
+'The reservation you selected<br>to edit has expired.<br><br>': '',
+'The reservation you selected<br>to reboot has expired.<br><br>': '',
+'The reservation you selected<br>to reinstall has expired.<br><br>': '',
+'An invalid version was submitted.': '',
+' Ready to connect in ': '',
+' second': '',
+' seconds': '',
+'match': '',
+'no match': '',
+'Remove': '',
+'Skip': '',
+'Use': '',
+'Name:': '',
+'Owner:': '',
+'specified in comments': '',
+'Monthly': '',
+'First Date:': '',
+'Last Date:': '',
+'Repeat on:': '',
+' of each month': '',
+'During these times:': '',
+'List of Dates/Times': '',
+'Weekly': '',
+'Repeating on these days:': '',
+'User Submitted Comments;': '',
+'Total online: ': '',
+'These times overlap with an existing time slot': '',
+'The date must be today or later': '',
+'The date and times overlap with an existing time slot': '',
+'Please fix invalid values before submitting.': '',
+'Please fill in First Date of Usage': '',
+'Please fill in Last Date of Usage': '',
+'The First Date of Usage must be today or later': '',
+'The Last Date of Usage must be the same or later than the First Date of Usage': '',
+'The Last Date of Usage must be today or later': '',
+'At least one day must be checked when using "Repeating Weekly"': '',
+'At least one start/end combination must be entered when using "Repeating Weekly"': '',
+'When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.': '',
+'At least one start/end combination must be entered when using "Repeating Monthly"': '',
+'At least one date/start/end combination must be entered when using "List of Dates/Times"': '',
+'Sunday': '',
+'Monday': '',
+'Tuesday': '',
+'Wednesday': '',
+'Thursday': '',
+'Friday': '',
+'Saturday': ''
+}

Added: incubator/vcl/trunk/web/js/nls/zh_CN/messages.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/nls/zh_CN/messages.js?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/nls/zh_CN/messages.js (added)
+++ incubator/vcl/trunk/web/js/nls/zh_CN/messages.js Tue Apr 17 20:01:13 2012
@@ -0,0 +1,77 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+nlsmessages = {
+'Times cannot be suggested for cluster reservations': '',
+'Cancel': '取消',
+'Okay': '',
+'Modify Reservation': '',
+'Please select a valid environment.': '请选择有效的环境。',
+'View Available Times': '',
+'days': '日',
+'hours': '小时',
+'hour': '小时',
+'Loading...': '',
+'The end time must be later than the start time.': '',
+'The reservation you selected<br>to edit has expired.<br><br>': '',
+'The reservation you selected<br>to reboot has expired.<br><br>': '',
+'The reservation you selected<br>to reinstall has expired.<br><br>': '',
+'An invalid version was submitted.': '',
+' Ready to connect in ': '',
+' second': '',
+' seconds': '',
+'match': '一致',
+'no match': '不同',
+'Remove': '',
+'Skip': '',
+'Use': '',
+'Name:': '',
+'Owner:': '',
+'specified in comments': '',
+'Monthly': '',
+'First Date:': '',
+'Last Date:': '',
+'Repeat on:': '',
+' of each month': '',
+'During these times:': '',
+'List of Dates/Times': '',
+'Weekly': '',
+'Repeating on these days:': '',
+'User Submitted Comments;': '',
+'Total online: ': '',
+'These times overlap with an existing time slot': '',
+'The date must be today or later': '',
+'The date and times overlap with an existing time slot': '',
+'Please fix invalid values before submitting.': '',
+'Please fill in First Date of Usage': '',
+'Please fill in Last Date of Usage': '',
+'The First Date of Usage must be today or later': '',
+'The Last Date of Usage must be the same or later than the First Date of Usage': '',
+'The Last Date of Usage must be today or later': '',
+'At least one day must be checked when using "Repeating Weekly"': '',
+'At least one start/end combination must be entered when using "Repeating Weekly"': '',
+'When submitting "(group not listed)" as the user group, information must be included in the comments about what group needs to be created.': '',
+'At least one start/end combination must be entered when using "Repeating Monthly"': '',
+'At least one date/start/end combination must be entered when using "List of Dates/Times"': '',
+'Sunday': '星期天',
+'Monday': '星期一',
+'Tuesday': '星期二',
+'Wednesday': '星期三',
+'Thursday': '星期四',
+'Friday': '星期五',
+'Saturday': '星期六'
+}

Modified: incubator/vcl/trunk/web/js/requests.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/requests.js?rev=1327259&r1=1327258&r2=1327259&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/requests.js (original)
+++ incubator/vcl/trunk/web/js/requests.js Tue Apr 17 20:01:13 2012
@@ -88,14 +88,14 @@ function updateWaitTime(cleardesc) {
 
 function showSuggestedTimes() {
 	if(dojo.byId('suggestcont').value == 'cluster') {
-		alert('Times cannot be suggested for cluster reservations');
+		alert(_('Times cannot be suggested for cluster reservations'));
 		return;
 	}
 	dijit.byId('suggestedTimes').show();
 	dojo.byId('suggestContent').innerHTML = '';
 	dojo.removeClass('suggestloading', 'hidden');
 	showDijitButton('suggestDlgBtn');
-	dijit.byId('suggestDlgCancelBtn').set('label', 'Cancel');
+	dijit.byId('suggestDlgCancelBtn').set('label', _('Cancel'));
 	var data = {continuation: dojo.byId('suggestcont').value};
 	RPCwrapper(data, showSuggestedTimesCB, 1);
 	document.body.style.cursor = 'wait';
@@ -113,7 +113,9 @@ function showSuggestedTimesCB(data, ioAr
 	}
 	else if(data.items.status == 'error') {
 		hideDijitButton('suggestDlgBtn');
-		dijit.byId('suggestDlgCancelBtn').set('label', 'Okay');
+		dijit.byId('suggestDlgCancelBtn').set('label', _('Okay'));
+		if(dijit.byId('suggestedTimes'))
+			recenterDijitDialog('suggestedTimes');
 		return;
 	}
 	else if(data.items.status == 'noextend') {
@@ -121,7 +123,7 @@ function showSuggestedTimesCB(data, ioAr
 		dojo.byId('editResDlgContent').innerHTML = data.items.html;
 		dojo.byId('editResDlgErrMsg').innerHTML = '';
 		dijit.byId('editResDlgBtn').set('style', 'display: none');
-		dijit.byId('editResCancelBtn').set('label', 'Okay');
+		dijit.byId('editResCancelBtn').set('label', _('Okay'));
 		recenterDijitDialog('editResDlg');
 		return;
 	}
@@ -171,7 +173,7 @@ function selectLength() {
 function selectEnding() {
 	if(dojo.byId('dateradio'))
 		dojo.byId('dateradio').checked = true;
-	dijit.byId('editResDlgBtn').set('label', 'Modify Reservation');
+	dijit.byId('editResDlgBtn').set('label', _('Modify Reservation'));
 	resetEditResBtn();
 }
 
@@ -200,10 +202,10 @@ function checkValidImage() {
 	if(resSubmitted)
 		return false;
 	if(dijit.byId('imagesel') && ! dijit.byId('imagesel').isValid()) {
-		alert('Please select a valid environment.');
+		alert(_('Please select a valid environment.'));
 		return false;
 	}
-	if(dojo.byId('newsubmit').value == 'View Available Times') {
+	if(dojo.byId('newsubmit').value == _('View Available Times')) {
 		showSuggestedTimes();
 		return false;
 	}
@@ -225,7 +227,7 @@ function setMaxRequestLength(minutes) {
 		// if last option is < 60, add 1 hr
 		if(parseInt(obj.options[i].value) < 60 &&
 			minutes >= 60) {
-			text = '1 hour';
+			text = '1 ' + _('hour');
 			newminutes = 60;
 		}
 		// if option > 46 hours, add as days
@@ -237,9 +239,8 @@ function setMaxRequestLength(minutes) {
 				len = len - (len % 1440);
 			else
 				len = len + 1440;
-			text = len / 1440 + ' days';
+			text = len / 1440 + ' ' + _('days');
 			newminutes = len;
-			var foo = 'bar';
 		}
 		// else add in 2 hr chuncks up to max
 		else {
@@ -248,17 +249,17 @@ function setMaxRequestLength(minutes) {
 				tmp = tmp - (tmp % 120);
 			newminutes = tmp + 120;
 			if(newminutes < minutes)
-				text = (newminutes / 60) + ' hours';
+				text = (newminutes / 60) + ' ' + _('hours');
 			else {
 				newminutes = minutes;
 				tmp = newminutes - (newminutes % 60);
 				if(newminutes % 60)
 					if(newminutes % 60 < 10)
-						text = (tmp / 60) + ':0' + (newminutes % 60) + ' hours';
+						text = (tmp / 60) + ':0' + (newminutes % 60) + ' ' + _('hours');
 					else
-						text = (tmp / 60) + ':' + (newminutes % 60) + ' hours';
+						text = (tmp / 60) + ':' + (newminutes % 60) + ' ' + _('hours');
 				else
-					text = (tmp / 60) + ' hours';
+					text = (tmp / 60) + ' ' + _('hours');
 			}
 		}
 		obj.options[i + 1] = new Option(text, newminutes);
@@ -305,7 +306,7 @@ function showResStatusPane(reqid) {
 	var obj = dijit.byId('resStatusPane');
 	if(currdetailid != reqid) {
 		dojo.byId('detailreqid').value = reqid;
-		dojo.byId('resStatusText').innerHTML = 'Loading...';
+		dojo.byId('resStatusText').innerHTML = _('Loading...');
 	}
 	var disp = dijit.byId('resStatusPane').domNode.style.visibility;
 	if(disp == 'hidden')
@@ -410,11 +411,11 @@ function editReservationCB(data, ioArgs)
 	AJdojoCreate('editResDlgContent');
 	if(data.items.status == 'nomodify') {
 		dijit.byId('editResDlgBtn').set('style', 'display: none');
-		dijit.byId('editResCancelBtn').set('label', 'Okay');
+		dijit.byId('editResCancelBtn').set('label', _('Okay'));
 	}
 	else {
 		dijit.byId('editResDlgBtn').set('style', 'display: inline');
-		dijit.byId('editResCancelBtn').set('label', 'Cancel');
+		dijit.byId('editResCancelBtn').set('label', _('Cancel'));
 		dojo.byId('editrescont').value = data.items.cont;
 		dojo.byId('editresid').value = data.items.requestid;
 	}
@@ -447,7 +448,7 @@ function hideEditResDlg() {
 
 function resetEditResBtn() {
 	dojo.byId('editResDlgErrMsg').innerHTML = '';
-	dijit.byId('editResDlgBtn').set('label', 'Modify Reservation');
+	dijit.byId('editResDlgBtn').set('label', _('Modify Reservation'));
 }
 
 function editResOpenEnd() {
@@ -509,10 +510,10 @@ function useSuggestedEditSlot() {
 }
 
 function submitEditReservation() {
-	if(dijit.byId('editResDlgBtn').get('label') == 'View Available Times') {
+	if(dijit.byId('editResDlgBtn').get('label') == _('View Available Times')) {
 		dijit.byId('suggestDlgBtn').set('disabled', true);
 		showDijitButton('suggestDlgBtn');
-		dijit.byId('suggestDlgCancelBtn').set('label', 'Cancel');
+		dijit.byId('suggestDlgCancelBtn').set('label', _('Cancel'));
 		showSuggestedTimes();
 		return;
 	}
@@ -557,7 +558,7 @@ function submitEditReservation() {
 		data.endmode = 'ending';
 		var testend = new Date(d.getFullYear(), d.getMonth(), d.getDate(), t.getHours(), t.getMinutes(), 0, 0);
 		if(dijit.byId('editstarttime') && testend <= teststart) {
-			dojo.byId('editResDlgErrMsg').innerHTML = "The end time must be later than the start time.";
+			dojo.byId('editResDlgErrMsg').innerHTML = _("The end time must be later than the start time.");
 			return;
 		}
 	}
@@ -580,7 +581,7 @@ function submitEditReservationCB(data, i
 		dojo.byId('editResDlgContent').innerHTML = data.items.html;
 		dojo.byId('editResDlgErrMsg').innerHTML = '';
 		dijit.byId('editResDlgBtn').set('style', 'display: none');
-		dijit.byId('editResCancelBtn').set('label', 'Okay');
+		dijit.byId('editResCancelBtn').set('label', _('Okay'));
 		resRefresh();
 		return;
 	}
@@ -589,7 +590,7 @@ function submitEditReservationCB(data, i
 		dojo.byId('editrescont').value = data.items.cont;
 		//dojo.byId('editresid').value = '';
 		dojo.byId('suggestcont').value = data.items.sugcont;
-		dijit.byId('editResDlgBtn').set('label', 'View Available Times');
+		dijit.byId('editResDlgBtn').set('label', _('View Available Times'));
 		return;
 	}
 	else if(data.items.status == 'unavailable') {
@@ -615,18 +616,18 @@ function checkResGone(reqids) {
 
 function resGone(type) {
 	if(type == 'edit') {
-		dojo.byId('editResDlgContent').innerHTML = "The reservation you selected<br>to edit has expired.<br><br>";
+		dojo.byId('editResDlgContent').innerHTML = _('The reservation you selected<br>to edit has expired.<br><br>');
 	}
 	else if(type == 'reboot') {
-		dojo.byId('editResDlgContent').innerHTML = "The reservation you selected<br>to reboot has expired.<br><br>";
+		dojo.byId('editResDlgContent').innerHTML = _('The reservation you selected<br>to reboot has expired.<br><br>');
 	}
 	else if(type == 'reinstall') {
-		dojo.byId('editResDlgContent').innerHTML = "The reservation you selected<br>to reinstall has expired.<br><br>";
+		dojo.byId('editResDlgContent').innerHTML = _('The reservation you selected<br>to reinstall has expired.<br><br>');
 	}
 	dojo.byId('editresid').value = '';
 	dojo.byId('editResDlgErrMsg').innerHTML = '';
 	dijit.byId('editResDlgBtn').set('style', 'display: none');
-	dijit.byId('editResCancelBtn').set('label', 'Okay');
+	dijit.byId('editResCancelBtn').set('label', _('Okay'));
 	recenterDijitDialog('editResDlg');
 }
 
@@ -706,7 +707,7 @@ function submitReinstallReservationCB(da
 		return;
 	}
 	if(data.items.status == 'invalidrevisionid') {
-		dojo.byId('reinstallResDlgErrMsg').innerHTML = 'An invalid version was submitted.';
+		dojo.byId('reinstallResDlgErrMsg').innerHTML = _('An invalid version was submitted.');
 		dojo.byId('reinstallrescont').value = data.items.cont;
 		return;
 	}
@@ -753,9 +754,9 @@ function showRDPbutton() {
 		timeInterval = 1
 	}
 	if(timeInterval == 1)
-		dojo.byId('counterdiv').innerHTML = " Ready to connect in " + timeInterval + " second";
+		dojo.byId('counterdiv').innerHTML = _(' Ready to connect in ') + timeInterval + _(' second');
 	else
-		dojo.byId('counterdiv').innerHTML = " Ready to connect in " + timeInterval + " seconds";
+		dojo.byId('counterdiv').innerHTML = _(' Ready to connect in ') + timeInterval + _(' seconds');
 	var si = setInterval(function() {
 		if(timeInterval === 0) {
 			clearInterval(si);
@@ -763,9 +764,9 @@ function showRDPbutton() {
 			timeInterval--;
 			if(timeInterval !== 0) {
 				if(timeInterval == 1)
-					dojo.byId('counterdiv').innerHTML = " Ready to connect in " + timeInterval + " second";
+					dojo.byId('counterdiv').innerHTML = _(' Ready to connect in ') + timeInterval + _(' second');
 				else
-					dojo.byId('counterdiv').innerHTML = " Ready to connect in " + timeInterval + " seconds";
+					dojo.byId('counterdiv').innerHTML = _(' Ready to connect in ') + timeInterval + _(' seconds');
 			} else {
 				dojo.addClass('counterdiv', 'hidden');
 				dojo.removeClass('connectdiv', 'hidden');

Modified: incubator/vcl/trunk/web/js/vcldojo/TimeTextBoxEnd.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/vcldojo/TimeTextBoxEnd.js?rev=1327259&r1=1327258&r2=1327259&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/vcldojo/TimeTextBoxEnd.js (original)
+++ incubator/vcl/trunk/web/js/vcldojo/TimeTextBoxEnd.js Tue Apr 17 20:01:13 2012
@@ -16,12 +16,14 @@
 */
 dojo.provide("vcldojo.TimeTextBoxEnd");
 dojo.require('dijit.form.TimeTextBox');
+dojo.require('dojo.i18n');
+dojo.requireLocalization("vcldojo", "TimeTextBoxEnd");
 dojo.declare(
 	"vcldojo.TimeTextBoxEnd",
 	[dijit.form.TimeTextBox],
 	{
 		startid: '',
-		invalidMessage: 'This must be a valid time that is greater than the start time',
+		invalidMessage: '(initial message)',
 		isValid: function(isFocused) {
 			if(dijit.byId(this.startid)) {
 				var start = dijit.byId(this.startid).value;
@@ -29,6 +31,11 @@ dojo.declare(
 					return false;
 			}
 			return this.inherited(arguments);
+		},
+		postCreate: function() {
+			var ln = dojo.i18n.getLocalization("vcldojo", "TimeTextBoxEnd");
+			this.invalidMessage = ln.invalidMessage;
+			this.inherited(arguments);
 		}
 	}
 );

Added: incubator/vcl/trunk/web/js/vcldojo/nls/TimeTextBoxEnd.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/vcldojo/nls/TimeTextBoxEnd.js?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/vcldojo/nls/TimeTextBoxEnd.js (added)
+++ incubator/vcl/trunk/web/js/vcldojo/nls/TimeTextBoxEnd.js Tue Apr 17 20:01:13 2012
@@ -0,0 +1,3 @@
+{
+	'invalidMessage': 'This must be a valid time that is greater than the start time'
+}

Added: incubator/vcl/trunk/web/js/vcldojo/nls/ja-jp/TimeTextBoxEnd.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/vcldojo/nls/ja-jp/TimeTextBoxEnd.js?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/vcldojo/nls/ja-jp/TimeTextBoxEnd.js (added)
+++ incubator/vcl/trunk/web/js/vcldojo/nls/ja-jp/TimeTextBoxEnd.js Tue Apr 17 20:01:13 2012
@@ -0,0 +1,3 @@
+{
+	'invalidMessage': 'これは、開始時刻よりも大きい有効な時間でなければなりません'
+}

Added: incubator/vcl/trunk/web/js/vcldojo/nls/zh-cn/TimeTextBoxEnd.js
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/vcldojo/nls/zh-cn/TimeTextBoxEnd.js?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/js/vcldojo/nls/zh-cn/TimeTextBoxEnd.js (added)
+++ incubator/vcl/trunk/web/js/vcldojo/nls/zh-cn/TimeTextBoxEnd.js Tue Apr 17 20:01:13 2012
@@ -0,0 +1,3 @@
+{
+	'invalidMessage': '这必须是一个有效的时间是大于开始时间'
+}

Added: incubator/vcl/trunk/web/locale/ja_JP/LC_MESSAGES/vcl.mo
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/locale/ja_JP/LC_MESSAGES/vcl.mo?rev=1327259&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/vcl/trunk/web/locale/ja_JP/LC_MESSAGES/vcl.mo
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/vcl/trunk/web/locale/ja_JP/language
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/locale/ja_JP/language?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/locale/ja_JP/language (added)
+++ incubator/vcl/trunk/web/locale/ja_JP/language Tue Apr 17 20:01:13 2012
@@ -0,0 +1 @@
+Japanese

Added: incubator/vcl/trunk/web/locale/po_files/.htaccess
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/locale/po_files/.htaccess?rev=1327259&view=auto
==============================================================================
--- incubator/vcl/trunk/web/locale/po_files/.htaccess (added)
+++ incubator/vcl/trunk/web/locale/po_files/.htaccess Tue Apr 17 20:01:13 2012
@@ -0,0 +1 @@
+Deny from all