rem: alert("Please enter a duration."); 
add: alert( bundle.GetStringFromName("pleaseEnterADuration") ); 
context: function Commit(){  var changed = false;  // Grovel through the fields to see if any of the values have  // changed. If so, update the RDF graph and force them to be saved  // to disk.  for (var i = 0; i < Fields.length; ++i)  {    var field = document.getElementById(Fields[i]);    // Get the new value as a literal, using 'null' if the value is    // empty.    var newvalue = field.value;    dump("field value = " + newvalue + "\n");    var oldvalue = Bookmarks.GetTarget(RDF.GetResource(bookmark_url),                                       RDF.GetResource(Properties[i]),                                       true);    if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral);    if ((newvalue) && (i == Fields.length-1))    {    	// we're dealing with the URL attribute;    	// if a scheme isn't specified, use "http://"    	if (newvalue.indexOf(":") < 0)    	{    		dump("Setting default URL scheme to HTTP.\n");    		newvalue = "http://" + newvalue;    	}    }        if (updateAttribute(Properties[i], oldvalue, newvalue) == true)    {    	changed = true;    }  }    // Update bookmark schedule if necessary  	var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule";	var oldvalue = Bookmarks.GetTarget(RDF.GetResource(bookmark_url),                               RDF.GetResource(scheduleRes), true);        var newvalue = "";	var dayRange = "";	var dayRangeNode = document.getElementById("dayRange");	if (dayRangeNode)	{		dayRange = dayRangeNode.options[dayRangeNode.selectedIndex].value;	}	if (dayRange != "")	{		var startHourRange = "";		var startHourRangeNode = document.getElementById("startHourRange");		if (startHourRangeNode)		{			startHourRange = startHourRangeNode.options[startHourRangeNode.selectedIndex].value;		}		var endHourRange = "";		var endHourRangeNode = document.getElementById("endHourRange");		if (endHourRangeNode)		{			endHourRange = endHourRangeNode.options[endHourRangeNode.selectedIndex].value;		}		if (startHourRange > endHourRange)		{			var temp = startHourRange;			startHourRange = endHourRange;			endHourRange = temp;		}		var duration = document.getElementById("duration").value;		if (duration == "")		{			alert("Please enter a duration.");			return(false);		}		var method = "";		if (document.getElementById("bookmarkIcon").checked)	method += ",icon";		if (document.getElementById("playSound").checked)	method += ",sound";		if (document.getElementById("showAlert").checked)	method += ",alert";		if (document.getElementById("openWindow").checked)	method += ",open";		if (method.length < 1)		{			alert("Please select a notification method.");			return(false);		}		method = method.substr(1, method.length - 1);	// trim off the initial comma		dump("dayRange: " + dayRange + "\n");		dump("startHourRange: " + startHourRange + "\n");		dump("endHourRange: " + endHourRange + "\n");		dump("duration: " + duration + "\n");		dump("method: " + method + "\n");				newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method;	}	if (updateAttribute(scheduleRes, oldvalue, newvalue) == true)	{		changed = true;	}  if (changed == true)  {    dump("re-writing bookmarks.html\n");    var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);    if (remote)    {	    remote.Flush();    }  }  window.close();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/c83d8a0957238d9085df673aff90e5c67b4ec813/bm-props.js/buggy/xpfe/components/bookmarks/resources/bm-props.js