Author: jfthomps
Date: Mon Jul 27 20:05:08 2015
New Revision: 1692940
URL: http://svn.apache.org/r1692940
Log:
VCL-888 - problem with translations containing single quotes
changed all calls to _() to call i()
Modified:
vcl/trunk/web/js/blockallocations.js
vcl/trunk/web/js/code.js
vcl/trunk/web/js/newresservercommon.js
vcl/trunk/web/js/requests.js
vcl/trunk/web/js/resources.js
vcl/trunk/web/js/resources/image.js
vcl/trunk/web/js/siteconfig.js
Modified: vcl/trunk/web/js/blockallocations.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/blockallocations.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/blockallocations.js (original)
+++ vcl/trunk/web/js/blockallocations.js Mon Jul 27 20:05:08 2015
@@ -76,7 +76,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: i("Remove"),
onClick: createRemoveFunc(rmfunc, id)
});
store.newItem({id: id, start: start, start2: start2,
end: end, remove: btn});
@@ -111,7 +111,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: i("Remove"),
onClick:
createRemoveFunc(blockFormRemoveListSlot, id)
});
store.newItem({id: id, date1: date1, date2: date2,
start: start, end: end, remove: btn});
@@ -131,7 +131,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 = i('The selected Block
Request no longer exists.');
return;
}
dojo.byId('available').innerHTML = data.items.available;
@@ -213,7 +213,7 @@ function blockFormAddWeeklyTime() {
teststart = teststart.getTime();
if(startts < testend &&
endts > teststart) {
- alert(_('These times overlap with an existing time
slot'));
+ alert(i('These times overlap with an existing time
slot'));
return;
}
}
@@ -224,7 +224,7 @@ function blockFormAddWeeklyTime() {
requestBlockAddWeeklyStore.nextid = id;
var btn = new dijit.form.Button({
- label: _("Remove"),
+ label: i("Remove"),
onClick: function() {blockFormRemoveWeeklyTime(id);}
});
requestBlockAddWeeklyStore.newItem({id: id, start: start, start2: s,
end: end, remove: btn});
@@ -252,7 +252,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(i('These times overlap with an existing time
slot'));
return;
}
}
@@ -263,7 +263,7 @@ function blockFormAddMonthlyTime() {
requestBlockAddMonthlyStore.nextid = id;
var btn = new dijit.form.Button({
- label: _("Remove"),
+ label: i("Remove"),
onClick: function() {blockFormRemoveMonthlyTime(id);}
});
requestBlockAddMonthlyStore.newItem({id: id, start: start, start2: s,
end: end, remove: btn});
@@ -282,7 +282,7 @@ function blockFormAddListSlot() {
today.setSeconds(0);
today.setMilliseconds(0);
if(dateobj.value < today) {
- alert(_('The date must be today or later'));
+ alert(i('The date must be today or later'));
return;
}
@@ -308,7 +308,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(i('The date and times overlap with an existing
time slot'));
return;
}
}
@@ -319,7 +319,7 @@ function blockFormAddListSlot() {
requestBlockAddListStore.nextid = id;
var btn = new dijit.form.Button({
- label: _("Remove"),
+ label: i("Remove"),
onClick: function() {blockFormRemoveListSlot(id);}
});
requestBlockAddListStore.newItem({id: id, date1: date1, date2: d,
start: start, end: end, remove: btn});
@@ -359,7 +359,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(i('Please fix invalid values before submitting.'));
return;
}
var weekly = dojo.byId('weeklyradio');
@@ -389,13 +389,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(i('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(i('Please fill in Last Date of Usage'));
return;
}
var today = new Date();
@@ -404,39 +404,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(i('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(i('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(i('The Last Date of Usage must be today or later'));
return;
}
var days = new Array();
if(dojo.byId('wdays0').checked)
- days.push(_('Sunday'));
+ days.push(i('Sunday'));
if(dojo.byId('wdays1').checked)
- days.push(_('Monday'));
+ days.push(i('Monday'));
if(dojo.byId('wdays2').checked)
- days.push(_('Tuesday'));
+ days.push(i('Tuesday'));
if(dojo.byId('wdays3').checked)
- days.push(_('Wednesday'));
+ days.push(i('Wednesday'));
if(dojo.byId('wdays4').checked)
- days.push(_('Thursday'));
+ days.push(i('Thursday'));
if(dojo.byId('wdays5').checked)
- days.push(_('Friday'));
+ days.push(i('Friday'));
if(dojo.byId('wdays6').checked)
- days.push(_('Saturday'));
+ days.push(i('Saturday'));
if(days.length == 0) {
- alert(_('At least one day must be checked when using "Repeating
Weekly"'));
+ alert(i('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(i('At least one start/end combination must be entered
when using "Repeating Weekly"'));
return;
}
if(dijit.byId('groupsel'))
@@ -445,27 +445,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(i('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 = i('Name:');
dojo.byId('confname').innerHTML =
dijit.byId('brname').textbox.value;
- dojo.byId('confownertitle').innerHTML = _('Owner:');
+ dojo.byId('confownertitle').innerHTML = i('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 = i('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 = i('Weekly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML =
dijit.byId('wkfirstdate').getDisplayedValue();
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('Last Date:');
dojo.byId('confvalue2').innerHTML =
dijit.byId('wklastdate').getDisplayedValue();
- dojo.byId('conftitle3').innerHTML = _('Repeating on these days:');
+ dojo.byId('conftitle3').innerHTML = i('Repeating on these days:');
dojo.byId('confvalue3').innerHTML = days.join('<br>');
var times = new Array();
var items = requestBlockAddWeeklyStore._getItemsArray();
@@ -479,7 +479,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 = i('During these times:');
dojo.byId('confvalue4').innerHTML = times2.join('<br>');
if(dijit.byId('comments') && dijit.byId('comments').value.length)
dojo.removeClass('commentsnote', 'hidden');
@@ -554,13 +554,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(i('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(i('Please fill in Last Date of Usage'));
return;
}
var today = new Date();
@@ -569,20 +569,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(i('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(i('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(i('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(i('At least one start/end combination must be entered
when using "Repeating Monthly"'));
return;
}
if(dijit.byId('groupsel'))
@@ -591,32 +591,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(i('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 = i('Name:');
dojo.byId('confname').innerHTML =
dijit.byId('brname').textbox.value;
- dojo.byId('confownertitle').innerHTML = _('Owner:');
+ dojo.byId('confownertitle').innerHTML = i('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 = i('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 = i('Monthly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML =
dijit.byId('mnfirstdate').getDisplayedValue();
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('Last Date:');
dojo.byId('confvalue2').innerHTML =
dijit.byId('mnlastdate').getDisplayedValue();
- dojo.byId('conftitle3').innerHTML = _('Repeat on:');
+ dojo.byId('conftitle3').innerHTML = i('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 + ' ' + i("of each month");
var times = new Array();
var items = requestBlockAddMonthlyStore._getItemsArray();
for(var i = 0; i < len; i++) {
@@ -629,7 +629,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 = i('During these times:');
dojo.byId('confvalue4').innerHTML = times2.join('<br>');
if(dijit.byId('comments') && dijit.byId('comments').value.length)
dojo.removeClass('commentsnote', 'hidden');
@@ -690,7 +690,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(i('At least one date/start/end combination must be
entered when using "List of Dates/Times"'));
return;
}
if(dijit.byId('groupsel'))
@@ -698,23 +698,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(i('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 = i('Name:');
dojo.byId('confname').innerHTML =
dijit.byId('brname').textbox.value;
- dojo.byId('confownertitle').innerHTML = _('Owner:');
+ dojo.byId('confownertitle').innerHTML = i('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 = i('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 = i('List of Dates/Times');
+ dojo.byId('conftitle1').innerHTML = i('Repeat on:');
var slots = new Array();
var items = requestBlockAddListStore._getItemsArray();
var date1 = '';
@@ -888,14 +888,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 = i('Weekly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML = data.items.startdate;
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('Last Date:');
dojo.byId('confvalue2').innerHTML = data.items.lastdate;
- dojo.byId('conftitle3').innerHTML = _('Repeating on these
days:');
+ dojo.byId('conftitle3').innerHTML = i('Repeating on these
days:');
dojo.byId('confvalue3').innerHTML =
data.items.days.join('<br>');
- dojo.byId('conftitle4').innerHTML = _('During these times:');
+ dojo.byId('conftitle4').innerHTML = i('During these times:');
dojo.byId('confvalue4').innerHTML =
data.items.times.join('<br>');
}
else if(data.items.repeating == 'monthly') {
@@ -904,14 +904,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 = i('Monthly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML = data.items.startdate;
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('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 = i('Repeat on:');
+ dojo.byId('confvalue3').innerHTML = data.items.date1 + ' ' +
i("of each month");
+ dojo.byId('conftitle4').innerHTML = i('During these times:');
dojo.byId('confvalue4').innerHTML =
data.items.times.join('<br>');
}
else if(data.items.repeating == 'list') {
@@ -920,8 +920,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 = i('List of Dates/Times');
+ dojo.byId('conftitle1').innerHTML = i('Repeat on:');
dojo.byId('confvalue1').innerHTML =
data.items.slots.join('<br>');
}
dojo.byId('submitdeletecont').value = data.items.cont;
@@ -949,14 +949,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 = i('Weekly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML = data.items.startdate;
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('Last Date:');
dojo.byId('confvalue2').innerHTML = data.items.lastdate;
- dojo.byId('conftitle3').innerHTML = _('Repeating on these
days:');
+ dojo.byId('conftitle3').innerHTML = i('Repeating on these
days:');
dojo.byId('confvalue3').innerHTML =
data.items.days.join('<br>');
- dojo.byId('conftitle4').innerHTML = _('During these times:');
+ dojo.byId('conftitle4').innerHTML = i('During these times:');
dojo.byId('confvalue4').innerHTML =
data.items.times.join('<br>');
}
else if(data.items.repeating == 'monthly') {
@@ -965,14 +965,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 = i('Monthly');
+ dojo.byId('conftitle1').innerHTML = i('First Date:');
dojo.byId('confvalue1').innerHTML = data.items.startdate;
- dojo.byId('conftitle2').innerHTML = _('Last Date:');
+ dojo.byId('conftitle2').innerHTML = i('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 = i('Repeat on:');
+ dojo.byId('confvalue3').innerHTML = data.items.date1 + ' ' +
i("of each month");
+ dojo.byId('conftitle4').innerHTML = i('During these times:');
dojo.byId('confvalue4').innerHTML =
data.items.times.join('<br>');
}
else if(data.items.repeating == 'list') {
@@ -981,8 +981,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 = i('List of Dates/Times');
+ dojo.byId('conftitle1').innerHTML = i('Repeat on:');
dojo.byId('confvalue1').innerHTML =
data.items.slots.join('<br>');
}
document.body.style.cursor = 'default';
@@ -1026,36 +1026,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 = i('Weekly');
+ dojo.byId('accepttitle1').innerHTML = i('First Date:');
dojo.byId('acceptvalue1').innerHTML = data.items.startdate;
- dojo.byId('accepttitle2').innerHTML = _('Last Date:');
+ dojo.byId('accepttitle2').innerHTML = i('Last Date:');
dojo.byId('acceptvalue2').innerHTML = data.items.lastdate;
- dojo.byId('accepttitle3').innerHTML = _('Repeating on these
days:');
+ dojo.byId('accepttitle3').innerHTML = i('Repeating on these
days:');
dojo.byId('acceptvalue3').innerHTML =
data.items.days.join('<br>');
- dojo.byId('accepttitle4').innerHTML = _('During these times:');
+ dojo.byId('accepttitle4').innerHTML = i('During these times:');
dojo.byId('acceptvalue4').innerHTML =
data.items.times.join('<br>');
- dojo.byId('accepttitle5').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('accepttitle5').innerHTML = i('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 = i('Monthly');
+ dojo.byId('accepttitle1').innerHTML = i('First Date:');
dojo.byId('acceptvalue1').innerHTML = data.items.startdate;
- dojo.byId('accepttitle2').innerHTML = _('Last Date:');
+ dojo.byId('accepttitle2').innerHTML = i('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 = i('Repeat on:');
+ dojo.byId('acceptvalue3').innerHTML = data.items.date1 + ' ' +
i("of each month");
+ dojo.byId('accepttitle4').innerHTML = i('During these times:');
dojo.byId('acceptvalue4').innerHTML =
data.items.times.join('<br>');
- dojo.byId('accepttitle5').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('accepttitle5').innerHTML = i('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 = i('List of Dates/Times');
+ dojo.byId('accepttitle1').innerHTML = i('Repeat on:');
dojo.byId('acceptvalue1').innerHTML =
data.items.slots.join('<br>');
- dojo.byId('accepttitle2').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('accepttitle2').innerHTML = i('User Submitted
Comments:');
dojo.byId('acceptvalue2').innerHTML = data.items.comments;
}
dojo.byId('submitacceptcont').value = data.items.cont;
@@ -1101,36 +1101,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 = i('Weekly');
+ dojo.byId('rejecttitle1').innerHTML = i('First Date:');
dojo.byId('rejectvalue1').innerHTML = data.items.startdate;
- dojo.byId('rejecttitle2').innerHTML = _('Last Date:');
+ dojo.byId('rejecttitle2').innerHTML = i('Last Date:');
dojo.byId('rejectvalue2').innerHTML = data.items.lastdate;
- dojo.byId('rejecttitle3').innerHTML = _('Repeating on these
days:');
+ dojo.byId('rejecttitle3').innerHTML = i('Repeating on these
days:');
dojo.byId('rejectvalue3').innerHTML =
data.items.days.join('<br>');
- dojo.byId('rejecttitle4').innerHTML = _('During these times:');
+ dojo.byId('rejecttitle4').innerHTML = i('During these times:');
dojo.byId('rejectvalue4').innerHTML =
data.items.times.join('<br>');
- dojo.byId('rejecttitle5').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('rejecttitle5').innerHTML = i('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 = i('Monthly');
+ dojo.byId('rejecttitle1').innerHTML = i('First Date:');
dojo.byId('rejectvalue1').innerHTML = data.items.startdate;
- dojo.byId('rejecttitle2').innerHTML = _('Last Date:');
+ dojo.byId('rejecttitle2').innerHTML = i('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 = i('Repeat on:');
+ dojo.byId('rejectvalue3').innerHTML = data.items.date1 + ' ' +
i("of each month");
+ dojo.byId('rejecttitle4').innerHTML = i('During these times:');
dojo.byId('rejectvalue4').innerHTML =
data.items.times.join('<br>');
- dojo.byId('rejecttitle5').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('rejecttitle5').innerHTML = i('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 = i('List of Dates/Times');
+ dojo.byId('rejecttitle1').innerHTML = i('Repeat on:');
dojo.byId('rejectvalue1').innerHTML =
data.items.slots.join('<br>');
- dojo.byId('rejecttitle2').innerHTML = _('User Submitted
Comments:');
+ dojo.byId('rejecttitle2').innerHTML = i('User Submitted
Comments:');
dojo.byId('rejectvalue2').innerHTML = data.items.comments;
}
dojo.byId('submitrejectcont').value = data.items.cont;
@@ -1195,9 +1195,9 @@ 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 = i('Skip');
else
- var label = _('Use');
+ var label = i('Use');
var btn = new dijit.form.Button({
label: label,
onClick: createRemoveFunc(toggleBlockTime, items[i].id)
@@ -1233,9 +1233,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(i('Use'));
else
- items[0].delbtn[0].setLabel(_('Skip'));
+ items[0].delbtn[0].setLabel(i('Skip'));
blockTimesGrid.update();
}
});
@@ -1331,11 +1331,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 = i('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 = i('Total online:') + ' '
+ data.items.virtual.total;
else
dojo.byId('totalvirtual').innerHTML = '';
dojo.byId('allocatedBareMachines').style.height = '320px';
Modified: vcl/trunk/web/js/code.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/code.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/code.js (original)
+++ vcl/trunk/web/js/code.js Mon Jul 27 20:05:08 2015
@@ -81,7 +81,7 @@ function returnCheck(CB, data, ioArgs) {
catch(error) {
if((! data.match(/-- continuationserror --/)) &&
(data.match(/<html/) || ! error.message.match(/syntax
error/))) {
- alert(_('Error encountered:') + " " + _('Please try
again later'));
+ alert(i('Error encountered:') + " " + i('Please try
again later'));
return;
}
else if(data.match(/-- continuationserror --/)) {
@@ -93,7 +93,7 @@ function returnCheck(CB, data, ioArgs) {
var div = document.createElement('div');
div.innerHTML = data;
var msg = div.textContent || div.innerText || "";
- alert(_('Error encountered:') + '\n\n' + msg);
+ alert(i('Error encountered:') + '\n\n' + msg);
return;
}
CB(json, ioArgs);
@@ -254,10 +254,10 @@ function checkNewLocalPassword() {
stat.innerHTML = '';
}
else if(pwd1.value == pwd2.value) {
- stat.innerHTML = '<font color="#008000">' + _('match') +
'</font>';
+ stat.innerHTML = '<font color="#008000">' + i('match') +
'</font>';
}
else {
- stat.innerHTML = '<font color="red">' + _('no match') +
'</font>';
+ stat.innerHTML = '<font color="red">' + i('no match') +
'</font>';
}
}
Modified: vcl/trunk/web/js/newresservercommon.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/newresservercommon.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/newresservercommon.js (original)
+++ vcl/trunk/web/js/newresservercommon.js Mon Jul 27 20:05:08 2015
@@ -112,7 +112,7 @@ function deployProfileChanged() {
onItem: function(item, request) {
var desc = profilesstore.getValue(item, 'desc');
if(desc == '') {
- desc = _('(No description)');
+ desc = i('(No description)');
}
dojo.byId('deploydesc').innerHTML = desc;
}
@@ -121,7 +121,7 @@ function deployProfileChanged() {
function getServerProfileData(cont, id, cb) {
if(id == 'profileid') {
- dijit.byId('fetchProfilesBtn').set('label', _('Working...'));
+ dijit.byId('fetchProfilesBtn').set('label', i('Working...'));
dijit.byId('fetchProfilesBtn').set('disabled', true);
}
var data = {continuation: cont,
@@ -133,7 +133,7 @@ function getServerProfileData(cont, id,
function getServerProfileDataDeployCB(data, ioArgs) {
document.body.style.cursor = 'default';
if(data.items.error) {
- alert(_('You do not have access to apply this server
profile.'));
+ alert(i('You do not have access to apply this server
profile.'));
return;
}
dojo.byId('appliedprofileid').value = data.items.id;
Modified: vcl/trunk/web/js/requests.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/requests.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/requests.js (original)
+++ vcl/trunk/web/js/requests.js Mon Jul 27 20:05:08 2015
@@ -53,8 +53,8 @@ function initViewRequests(imaging) {
});
var dlg = new dijit.Dialog({
id: 'noimageaccessdlg',
- title: _('Create / Update an Image'),
- content: _('You do not have access to create or
update any images.') + '<br><br>',
+ title: i('Create / Update an Image'),
+ content: i('You do not have access to create or
update any images.') + '<br><br>',
style: 'width: 300px; text-align: center;',
closable: false
});
@@ -216,7 +216,7 @@ function selectResType() {
dojo.removeClass('whentitleserver', 'hidden');
if(profilesstore._arrayOfAllItems.length != 0 &&
(profilesstore._arrayOfAllItems.length != 1 ||
- profilesstore._arrayOfAllItems[0].name != _('(New
Profile)')))
+ profilesstore._arrayOfAllItems[0].name != i('(New
Profile)')))
dojo.removeClass('deployprofileslist', 'hidden');
dojo.removeClass('nrnamespan', 'hidden');
dojo.removeClass('nrservergroupspan', 'hidden');
@@ -347,7 +347,7 @@ function validateDeployInputs() {
start.setMinutes(time.getMinutes());
var teststart = parseInt(start.getTime() / 1000);
if(start < now) {
- dojo.byId('deployerr').innerHTML = _('The start
day and time must be in the future.');
+ dojo.byId('deployerr').innerHTML = i('The start
day and time must be in the future.');
dojo.removeClass('deployerr', 'hidden');
dijit.byId('newResDlgBtn').set('disabled',
true);
return false;
@@ -366,7 +366,7 @@ function validateDeployInputs() {
teststart.setMinutes(dojo.byId('deploymin').value);
teststart.setSeconds(0);
if(teststart < now) {
- dojo.byId('deployerr').innerHTML = _('The start
day and time must be in the future.');
+ dojo.byId('deployerr').innerHTML = i('The start
day and time must be in the future.');
dojo.removeClass('deployerr', 'hidden');
dijit.byId('newResDlgBtn').set('disabled',
true);
return false;
@@ -381,7 +381,7 @@ function validateDeployInputs() {
end.setMinutes(time.getMinutes());
var endts = parseInt(end.getTime() / 1000);
if(nowts + 1800 > endts) {
- dojo.byId('deployerr').innerHTML = _('The end time must
be at least 30 minutes in the future.');
+ dojo.byId('deployerr').innerHTML = i('The end time must
be at least 30 minutes in the future.');
dojo.removeClass('deployerr', 'hidden');
dijit.byId('newResDlgBtn').set('disabled', true);
return false;
@@ -392,13 +392,13 @@ function validateDeployInputs() {
teststart = parseInt(teststart.getTime() / 1000);
}
if(teststart > endts) {
- dojo.byId('deployerr').innerHTML = _('The end time must
be after the start time.');
+ dojo.byId('deployerr').innerHTML = i('The end time must
be after the start time.');
dojo.removeClass('deployerr', 'hidden');
dijit.byId('newResDlgBtn').set('disabled', true);
return false;
}
if(teststart + 1800 > endts) {
- dojo.byId('deployerr').innerHTML = _('The end time is
too close to the start time.');
+ dojo.byId('deployerr').innerHTML = i('The end time is
too close to the start time.');
dojo.removeClass('deployerr', 'hidden');
dijit.byId('newResDlgBtn').set('disabled', true);
return false;
@@ -552,7 +552,7 @@ function getImageDescription() {
function showSuggestedTimes() {
if(dojo.byId('suggestcont').value == 'cluster') {
- alert(_('Times cannot be suggested for cluster reservations'));
+ alert(i('Times cannot be suggested for cluster reservations'));
return;
}
dijit.byId('suggestedTimes').show();
@@ -560,7 +560,7 @@ function showSuggestedTimes() {
dojo.removeClass('suggestloading', 'hidden');
dijit.byId('suggestDlgBtn').set('disabled', true);
showDijitButton('suggestDlgBtn');
- dijit.byId('suggestDlgCancelBtn').set('label', _('Cancel'));
+ dijit.byId('suggestDlgCancelBtn').set('label', i('Cancel'));
var data = {continuation: dojo.byId('suggestcont').value};
RPCwrapper(data, showSuggestedTimesCB, 1, 30000);
document.body.style.cursor = 'wait';
@@ -578,7 +578,7 @@ function showSuggestedTimesCB(data, ioAr
}
else if(data.items.status == 'error') {
hideDijitButton('suggestDlgBtn');
- dijit.byId('suggestDlgCancelBtn').set('label', _('Okay'));
+ dijit.byId('suggestDlgCancelBtn').set('label', i('Okay'));
if(dijit.byId('suggestedTimes'))
recenterDijitDialog('suggestedTimes');
return;
@@ -588,7 +588,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', i('Okay'));
recenterDijitDialog('editResDlg');
return;
}
@@ -659,7 +659,7 @@ function selectLater() {
if(resbtntxt != '')
dijit.byId('newResDlgBtn').set('label', resbtntxt);
else
- dijit.byId('newResDlgBtn').set('label', _('Create
Reservation'));
+ dijit.byId('newResDlgBtn').set('label', i('Create
Reservation'));
}
dojo.addClass('waittime', 'hidden');
}
@@ -672,7 +672,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', i('Modify Reservation'));
resetEditResBtn();
}
@@ -758,21 +758,21 @@ function setEndAt() {
function resetDeployBtnLabel() {
if(dojo.byId('basicrdo').checked)
- dijit.byId('newResDlgBtn').set('label', _("Create
Reservation"));
+ dijit.byId('newResDlgBtn').set('label', i("Create
Reservation"));
if(dojo.byId('imagingrdo').checked)
- dijit.byId('newResDlgBtn').set('label', _("Create Imaging
Reservation"));
+ dijit.byId('newResDlgBtn').set('label', i("Create Imaging
Reservation"));
if(dojo.byId('serverrdo').checked)
- dijit.byId('newResDlgBtn').set('label', _("Deploy Server"));
+ dijit.byId('newResDlgBtn').set('label', i("Deploy Server"));
}
function checkValidImage() {
if(resSubmitted)
return false;
if(dijit.byId('deployimage') && ! dijit.byId('deployimage').isValid()) {
- alert(_('Please select a valid environment.'));
+ alert(i('Please select a valid environment.'));
return false;
}
- if(dijit.byId('newResDlgBtn').get('label') == _('View Available
Times')) {
+ if(dijit.byId('newResDlgBtn').get('label') == i('View Available
Times')) {
showSuggestedTimes();
return false;
}
@@ -796,7 +796,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 ' + i('hour');
newminutes = 60;
}
// if option > 46 hours, add as days
@@ -808,7 +808,7 @@ function setMaxRequestLength(minutes) {
len = len - (len % 1440);
else
len = len + 1440;
- text = len / 1440 + ' ' + _('days');
+ text = len / 1440 + ' ' + i('days');
newminutes = len;
}
// else add in 2 hr chuncks up to max
@@ -818,17 +818,17 @@ function setMaxRequestLength(minutes) {
tmp = tmp - (tmp % 120);
newminutes = tmp + 120;
if(newminutes < minutes)
- text = (newminutes / 60) + ' ' + _('hours');
+ text = (newminutes / 60) + ' ' + i('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) + ' ' + i('hours');
else
- text = (tmp / 60) + ':' +
(newminutes % 60) + ' ' + _('hours');
+ text = (tmp / 60) + ':' +
(newminutes % 60) + ' ' + i('hours');
else
- text = (tmp / 60) + ' ' + _('hours');
+ text = (tmp / 60) + ' ' + i('hours');
}
}
obj.options[i + 1] = new Option(text, newminutes);
@@ -1086,8 +1086,8 @@ function promptRevisions() {
dijit.byId('imageRevisionDlg').destroyRecursive();
var divall = document.createElement('div');
var div1 = document.createElement('div');
- div1.innerHTML = _("There are multiple versions of this environment
available.") + "<br>" +
- _("Please select the version you would like to
check out:");
+ div1.innerHTML = i("There are multiple versions of this environment
available.") + "<br>" +
+ i("Please select the version you would like to
check out:");
divall.appendChild(div1);
var div2 = document.createElement('div');
div2.id = 'imageRevisionContent';
@@ -1104,14 +1104,14 @@ function promptRevisions() {
dojo.connect(btn1, 'onClick', submitNewReservation);
div3.appendChild(btn1.domNode);
var btn2 = new dijit.form.Button({
- label: _('Cancel'),
+ label: i('Cancel'),
}, document.createElement('div'));
dojo.connect(btn2, 'onClick', function()
{dijit.byId('imageRevisionDlg').hide();});
div3.appendChild(btn2.domNode);
divall.appendChild(div3);
var dlg = new dijit.Dialog({
id: 'imageRevisionDlg',
- title: _('Select Image Revisions'),
+ title: i('Select Image Revisions'),
content: divall,
width: "50%",
style: "width: 50%",
@@ -1143,10 +1143,10 @@ function addRevisionSelection(item) {
var mstore = new dojo.store.Memory({data: item.imagerevision});
var wrapper = new dojo.data.ObjectStore({objectStore: mstore});
var layout = [
- {field: 'revision', name: _('Revision'), width: '60px'},
- {field: 'user', name: _('User'), width: '130px'},
- {field: 'prettydate', name: _('Created'), width: '110px'},
- {field: 'production', name: _('Production'), width: '60px'}
+ {field: 'revision', name: i('Revision'), width: '60px'},
+ {field: 'user', name: i('User'), width: '130px'},
+ {field: 'prettydate', name: i('Created'), width: '110px'},
+ {field: 'production', name: i('Production'), width: '60px'}
];
var div = document.createElement('div');
div.style.width = "100%";
@@ -1194,7 +1194,7 @@ function submitNewReservation() {
if(! validateDeployInputs()) {
return;
}
- if(dijit.byId('newResDlgBtn').get('label') == _('View Available
Times')) {
+ if(dijit.byId('newResDlgBtn').get('label') == i('View Available
Times')) {
showSuggestedTimes();
return;
}
@@ -1217,7 +1217,7 @@ function submitNewReservation() {
revids.push(0);
}
data.revisionid = revids.join(':');
- dijit.byId('imageRevBtn').set('label', _('Working...'));
+ dijit.byId('imageRevBtn').set('label', i('Working...'));
dijit.byId('imageRevBtn').set('disabled', true);
}
else {
@@ -1297,7 +1297,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 = i('Loading...');
}
var disp = dijit.byId('resStatusPane').domNode.style.visibility;
if(disp == 'hidden')
@@ -1436,11 +1436,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', i('Okay'));
}
else if(data.items.status == 'noindefinite') {
dijit.byId('editResDlgBtn').set('style', 'display: inline');
- dijit.byId('editResCancelBtn').set('label', _('Cancel'));
+ dijit.byId('editResCancelBtn').set('label', i('Cancel'));
dojo.byId('editrescont').value = data.items.cont;
dojo.byId('editresid').value = data.items.requestid;
if(dojo.byId('indefinitelabel'))
@@ -1450,7 +1450,7 @@ function editReservationCB(data, ioArgs)
}
else {
dijit.byId('editResDlgBtn').set('style', 'display: inline');
- dijit.byId('editResCancelBtn').set('label', _('Cancel'));
+ dijit.byId('editResCancelBtn').set('label', i('Cancel'));
dojo.byId('editrescont').value = data.items.cont;
dojo.byId('editresid').value = data.items.requestid;
}
@@ -1485,7 +1485,7 @@ function hideEditResDlg() {
function resetEditResBtn() {
dojo.byId('editResDlgErrMsg').innerHTML = '';
- dijit.byId('editResDlgBtn').set('label', _('Modify Reservation'));
+ dijit.byId('editResDlgBtn').set('label', i('Modify Reservation'));
}
function editResOpenEnd() {
@@ -1509,10 +1509,10 @@ function editResOpenEnd() {
}
function submitEditReservation() {
- if(dijit.byId('editResDlgBtn').get('label') == _('View Available
Times')) {
+ if(dijit.byId('editResDlgBtn').get('label') == i('View Available
Times')) {
dijit.byId('suggestDlgBtn').set('disabled', true);
showDijitButton('suggestDlgBtn');
- dijit.byId('suggestDlgCancelBtn').set('label', _('Cancel'));
+ dijit.byId('suggestDlgCancelBtn').set('label', i('Cancel'));
showSuggestedTimes();
return;
}
@@ -1561,7 +1561,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 = i("The end
time must be later than the start time.");
return;
}
}
@@ -1584,7 +1584,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', i('Okay'));
resRefresh();
return;
}
@@ -1593,7 +1593,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', i('View Available
Times'));
return;
}
else if(data.items.status == 'unavailable') {
@@ -1619,18 +1619,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 = i('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 = i('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 = i('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', i('Okay'));
recenterDijitDialog('editResDlg');
}
@@ -1710,7 +1710,7 @@ function submitReinstallReservationCB(da
return;
}
if(data.items.status == 'invalidrevisionid') {
- dojo.byId('reinstallResDlgErrMsg').innerHTML = _('An invalid
version was submitted.');
+ dojo.byId('reinstallResDlgErrMsg').innerHTML = i('An invalid
version was submitted.');
dojo.byId('reinstallrescont').value = data.items.cont;
return;
}
Modified: vcl/trunk/web/js/resources.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/resources.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/resources.js (original)
+++ vcl/trunk/web/js/resources.js Mon Jul 27 20:05:08 2015
@@ -22,9 +22,9 @@ function Resource() {
Resource.prototype.DeleteBtn = function(rscid, rowIndex) {
var rowdata = this.grid.getItem(rowIndex);
if(! ('deleted' in rowdata) || rowdata.deleted == '0')
- var label = _('Delete');
+ var label = i('Delete');
else
- var label = _('Undelete');
+ var label = i('Undelete');
var btn = new dijit.form.Button({
label: label,
onClick: function() {
@@ -42,7 +42,7 @@ Resource.prototype.EditBtn = function(rs
else
var disable = true;
var btn = new dijit.form.Button({
- label: _('Edit'),
+ label: i('Edit'),
disabled: disable,
onClick: function() {
editResource(rscid);
@@ -114,7 +114,7 @@ Resource.prototype.addRemItemCB = functi
});
}
else if(data.items.status == 'noaccess') {
- alert(_('You do not have access to the submitted resource or
group'));
+ alert(i('You do not have access to the submitted resource or
group'));
}
document.body.style.cursor = 'default';
}
@@ -269,7 +269,7 @@ function toggleDeleteResourceCB(data, io
div.style = 'text-align: center;';
var dlg = new dijit.Dialog({
id: 'resourceinusedlg',
- title: _('Resource In Use'),
+ title: i('Resource In Use'),
content: data.items.msg,
style: 'width: 400px;',
autofocus: false,
@@ -289,7 +289,7 @@ function submitToggleDeleteResource() {
function submitToggleDeleteResourceCB(data, ioArgs) {
if(data.items.status == 'error') {
- alert(_('Problem encountered while attempting to delete
resource. Please contact a system administrator.'));
+ alert(i('Problem encountered while attempting to delete
resource. Please contact a system administrator.'));
return;
}
else if(data.items.status == 'success') {
@@ -384,7 +384,7 @@ function populateLists(selobj, inselobj,
function populateListsCB(data, ioArgs) {
if(data.items.status == 'noaccess') {
document.body.style.cursor = 'default';
- alert(_('You do not have access to the submitted resource or
group'));
+ alert(i('You do not have access to the submitted resource or
group'));
return;
}
var oldstore = window[data.items.intitle].store;
Modified: vcl/trunk/web/js/resources/image.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/image.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/image.js (original)
+++ vcl/trunk/web/js/resources/image.js Mon Jul 27 20:05:08 2015
@@ -31,9 +31,9 @@ Image.prototype.colformatter = function(
obj.field == 'rootaccess' ||
obj.field == 'sethostname') {
if(value == "0")
- return '<span class="rederrormsg">' + _('false') +
'</span>';
+ return '<span class="rederrormsg">' + i('false') +
'</span>';
if(value == "1")
- return '<span class="ready">' + _('true') + '</span>';
+ return '<span class="ready">' + i('true') + '</span>';
}
if(obj.field == 'maxinitialtime' && value == 0)
return '(unset)';
@@ -48,7 +48,7 @@ function inlineEditResourceCB(data, ioAr
dijit.byId('advancedoptions').toggle();
dojo.byId('saveresourcecont').value = data.items.cont;
dijit.byId('addeditdlg').set('title', data.items.title);
- dijit.byId('addeditbtn').set('label', _('Save Changes'));
+ dijit.byId('addeditbtn').set('label', i('Save Changes'));
dojo.byId('editresid').value = data.items.resid;
dijit.byId('name').set('value', data.items.data.prettyname);
dijit.byId('owner').set('value', data.items.data.owner);
@@ -77,7 +77,7 @@ function inlineEditResourceCB(data, ioAr
dijit.byId('addeditdlg').show();
}
else if(data.items.status == 'noaccess') {
- alert(_('Access denied to edit this item'));
+ alert(i('Access denied to edit this item'));
}
}
@@ -179,27 +179,27 @@ function saveResource() {
data['networkspeed'] =
parseInt(dijit.byId('networkspeed').get('value'));
if((+log10(data['networkspeed']).toFixed(2) % 1) != 0) { // log10(1000)
-> 2.9999999999999996
- errobj.innerHTML = _('Invalid network speed specified');
+ errobj.innerHTML = i('Invalid network speed specified');
return;
}
data['concurrent'] = dijit.byId('concurrent').get('value');
if(data['concurrent'] < 0 || data['concurrent'] > 255) {
- errobj.innerHTML = _('Max Concurrent Usage must be between 0
and 255');
+ errobj.innerHTML = i('Max Concurrent Usage must be between 0
and 255');
return;
}
data['checkout'] = parseInt(dijit.byId('checkout').get('value'));
if(data['checkout'] != 0 && data['checkout'] != 1) {
- errobj.innerHTML = _('Invalid value specified for \'Available
for checkout\'');
+ errobj.innerHTML = i('Invalid value specified for \'Available
for checkout\'');
return;
}
data['checkuser'] = parseInt(dijit.byId('checkuser').get('value'));
if(data['checkuser'] != 0 && data['checkuser'] != 1) {
- errobj.innerHTML = _('Invalid value specified for \'Check for
logged in user\'');
+ errobj.innerHTML = i('Invalid value specified for \'Check for
logged in user\'');
return;
}
data['rootaccess'] = parseInt(dijit.byId('rootaccess').get('value'));
if(data['rootaccess'] != 0 && data['rootaccess'] != 1) {
- errobj.innerHTML = _('Invalid value specified for \'Users have
administrative access\'');
+ errobj.innerHTML = i('Invalid value specified for \'Users have
administrative access\'');
return;
}
data['sethostname'] = parseInt(dijit.byId('sethostname').get('value'));
@@ -208,18 +208,18 @@ function saveResource() {
data['sethostname'] = 0;
}
else {
- errobj.innerHTML = _('Invalid value specified for \'Set
computer hostname\'');
+ errobj.innerHTML = i('Invalid value specified for \'Set
computer hostname\'');
return;
}
}
if(dijit.byId('sysprep')) {
data['sysprep'] = parseInt(dijit.byId('sysprep').get('value'));
if(data['sysprep'] != 0 && data['sysprep'] != 1) {
- errobj.innerHTML = _('Invalid value specified for \'Use
sysprep\'');
+ errobj.innerHTML = i('Invalid value specified for \'Use
sysprep\'');
return;
}
if(! /[0-9,]+/.test(dojo.byId('connectmethodids').value)) {
- errobj.innerHTML = _('Invalid Connect Methods
specified');
+ errobj.innerHTML = i('Invalid Connect Methods
specified');
return;
}
data['connectmethodids'] = dojo.byId('connectmethodids').value;
@@ -347,7 +347,7 @@ function updateCurrentConMethods() {
}
function addSubimage() {
- dijit.byId('addbtn').attr('label', _('Working...'));
+ dijit.byId('addbtn').attr('label', i('Working...'));
var data = {continuation: dojo.byId('addsubimagecont').value,
imageid: dijit.byId('addsubimagesel').value};
RPCwrapper(data, addSubimageCB, 1);
@@ -355,12 +355,12 @@ function addSubimage() {
function addSubimageCB(data, ioArgs) {
if(data.items.error) {
- dijit.byId('addbtn').attr('label', _('Add Subimage'));
+ dijit.byId('addbtn').attr('label', i('Add Subimage'));
alert(data.items.msg);
return;
}
var obj = dojo.byId('cursubimagesel');
- if(obj.options[0].text == _('(None)')) {
+ if(obj.options[0].text == i('(None)')) {
obj.disabled = false;
obj.remove(0);
}
@@ -370,7 +370,7 @@ function addSubimageCB(data, ioArgs) {
obj.options[index] = new Option(data.items.name, data.items.newid,
false, false);
sortSelect(obj);
dojo.byId('subimgcnt').innerHTML = obj.options.length;
- dijit.byId('addbtn').attr('label', _('Add Subimage'));
+ dijit.byId('addbtn').attr('label', i('Add Subimage'));
}
function remSubimages() {
@@ -383,7 +383,7 @@ function remSubimages() {
if(! imgids.length)
return;
var ids = imgids.join(',');
- dijit.byId('rembtn').attr('label', _('Working...'));
+ dijit.byId('rembtn').attr('label', i('Working...'));
var data = {continuation: dojo.byId('remsubimagecont').value,
imageids: ids};
RPCwrapper(data, remSubimagesCB, 1);
@@ -391,7 +391,7 @@ function remSubimages() {
function remSubimagesCB(data, ioArgs) {
if(data.items.error) {
- dijit.byId('rembtn').attr('label', _('Remove Selected
Subimage(s)'));
+ dijit.byId('rembtn').attr('label', i('Remove Selected
Subimage(s)'));
alert(data.items.msg);
return;
}
@@ -402,14 +402,14 @@ function remSubimagesCB(data, ioArgs) {
}
if(! obj.options.length) {
obj.disabled = true;
- obj.options[0] = new Option(_('(None)'), 'none', false, false);
+ obj.options[0] = new Option(i('(None)'), 'none', false, false);
dojo.byId('subimgcnt').innerHTML = 0;
}
else
dojo.byId('subimgcnt').innerHTML = obj.options.length;
dojo.byId('addsubimagecont').value = data.items.addcont;
dojo.byId('remsubimagecont').value = data.items.remcont;
- dijit.byId('rembtn').attr('label', _('Remove Selected Subimage(s)'));
+ dijit.byId('rembtn').attr('label', i('Remove Selected Subimage(s)'));
}
function selectConMethodRevision(url) {
@@ -439,7 +439,7 @@ function addConnectMethod2(item) {
function addConnectMethod3() {
dojo.byId('cmerror').innerHTML = '';
- dijit.byId('addcmbtn').attr('label', _('Working...'));
+ dijit.byId('addcmbtn').attr('label', i('Working...'));
var data = {continuation: dojo.byId('addcmcont').value,
newid: dijit.byId('addcmsel').value};
if(dijit.byId('conmethodrevid'))
@@ -451,7 +451,7 @@ function addConnectMethod3() {
function addConnectMethodCB(data, ioArgs) {
if(data.items.error) {
- dijit.byId('addcmbtn').attr('label', _('Add Method'));
+ dijit.byId('addcmbtn').attr('label', i('Add Method'));
alert(data.items.msg);
return;
}
@@ -464,7 +464,7 @@ function addConnectMethodCB(data, ioArgs
dijit.byId('addcmsel').setStore(cmstore, '', {query: {active: 0}});
dojo.byId('addcmcont').value = data.items.addcont;
dojo.byId('remcmcont').value = data.items.remcont;
- dijit.byId('addcmbtn').attr('label', _('Add Method'));
+ dijit.byId('addcmbtn').attr('label', i('Add Method'));
}
function remConnectMethod() {
@@ -477,12 +477,12 @@ function remConnectMethod() {
if(! cmids.length)
return;
if(cmids.length == obj.options.length) {
- dojo.byId('cmerror').innerHTML = _('There must be at least one
item in Current Methods');
+ dojo.byId('cmerror').innerHTML = i('There must be at least one
item in Current Methods');
setTimeout(function() {dojo.byId('cmerror').innerHTML = '';},
20000);
return;
}
var ids = cmids.join(',');
- dijit.byId('remcmbtn').attr('label', _('Working...'));
+ dijit.byId('remcmbtn').attr('label', i('Working...'));
var data = {continuation: dojo.byId('remcmcont').value,
ids: ids};
if(dijit.byId('conmethodrevid'))
@@ -498,7 +498,7 @@ function remConnectMethodCB(data, ioArgs
dijit.byId('addcmbtn').set('disabled', false);
}
if(data.items.error) {
- dijit.byId('rembtn').attr('label', _('Remove Selected
Methods'));
+ dijit.byId('rembtn').attr('label', i('Remove Selected
Methods'));
alert(data.items.msg);
return;
}
@@ -518,7 +518,7 @@ function remConnectMethodCB(data, ioArgs
dojo.byId('addcmcont').value = data.items.addcont;
dojo.byId('remcmcont').value = data.items.remcont;
updateConnectionMethodList();
- dijit.byId('remcmbtn').attr('label', _('Remove Selected Methods'));
+ dijit.byId('remcmbtn').attr('label', i('Remove Selected Methods'));
}
function updateConnectionMethodList() {
@@ -565,7 +565,7 @@ function deleteRevisions(cont, idlist) {
var obj2 = document.getElementById('radrev' + id);
if(obj.checked) {
if(obj2.checked) {
- alert(_('You cannot delete the production
revision.'));
+ alert(i('You cannot delete the production
revision.'));
return;
}
checkedids.push(id);
@@ -651,7 +651,7 @@ function startImageCB(data, ioArgs) {
dojo.byId('updateimage').disabled = 'disabled';
dojo.addClass('updateimagelabel', 'disabledlabel');
}
- dijit.byId('addeditbtn').set('label', _('Create Image'));
+ dijit.byId('addeditbtn').set('label', i('Create Image'));
dijit.byId('addeditbtn').set('disabled', false);
dijit.byId('clickthroughDlgBtn').set('disabled', false);
if(data.items.ostype == 'windows' || data.items.ostype == 'linux') {
@@ -718,7 +718,7 @@ function updateImageCB(data, ioArgs) {
}
}
else if(data.items.status == 'noaccess') {
- alert(_('You must be the owner of the image to update it.'));
+ alert(i('You must be the owner of the image to update it.'));
dijit.byId('updateimagedlg').hide();
return;
}
@@ -739,7 +739,7 @@ function submitUpdateImageClickthrough()
function submitUpdateImageClickthroughCB(data, ioArgs) {
if(data.items.status == 'noaccess') {
- alert(_('You must be the owner of the image to update it.'));
+ alert(i('You must be the owner of the image to update it.'));
dijit.byId('updateimagedlg').hide();
dijit.byId('clickthroughdlg').hide();
dijit.byId('clickthroughDlgBtn').set('disabled', false);
Modified: vcl/trunk/web/js/siteconfig.js
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/js/siteconfig.js?rev=1692940&r1=1692939&r2=1692940&view=diff
==============================================================================
--- vcl/trunk/web/js/siteconfig.js (original)
+++ vcl/trunk/web/js/siteconfig.js Mon Jul 27 20:05:08 2015
@@ -96,7 +96,7 @@ TimeVariable.prototype.addAffiliationSet
var domidbase = this.domidbase;
var btn = new dijit.form.Button({
id: data.items.id + 'delbtn',
- label: _('Delete'),
+ label: i('Delete'),
onClick: function() {
func(data.items.id, domidbase);
}