rem: var name = nameTemplate.replace(/%NAME%/g, columns[i].label); 
add: name = nameTemplate.replace(/%NAME%/g, columns[i].label); 
context: function fillViewMenu(aEvent){  var adjacentElement = document.getElementById("fill-before-this-node");  var popupElement = aEvent.target;    var bookmarksView = document.getElementById("bookmarks-view");  var columns = bookmarksView.columns;  if (!gConstructedViewMenuSortItems) {    for (var i = 0; i < columns.length; ++i) {      var name = columns[i].name;      var accesskey = columns[i].accesskey;            var menuitem = document.createElement("menuitem");      var nameTemplate = bookmarksView._bundle.GetStringFromName("SortMenuItem");      var name = nameTemplate.replace(/%NAME%/g, columns[i].label);      menuitem.setAttribute("label", name);      menuitem.setAttribute("accesskey", columns[i].accesskey);      menuitem.setAttribute("resource", columns[i].resource);      menuitem.setAttribute("id", "sortMenuItem:" + columns[i].resource);      menuitem.setAttribute("checked", columns[i].sortActive);      menuitem.setAttribute("name", "sortSet");      menuitem.setAttribute("type", "radio");            popupElement.insertBefore(menuitem, adjacentElement);    }        gConstructedViewMenuSortItems = true;  }    const kPrefSvcContractID = "@mozilla.org/preferences;1";  const kPrefSvcIID = Components.interfaces.nsIPrefService;  var prefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID);  var bookmarksSortPrefs = prefSvc.getBranch("browser.bookmarks.sort.");  if (gConstructedViewMenuSortItems) {    var resource = bookmarksSortPrefs.getCharPref("resource");    var element = document.getElementById("sortMenuItem:" + resource);    if (element)      element.setAttribute("checked", "true");  }    var sortAscendingMenu = document.getElementById("ascending");  var sortDescendingMenu = document.getElementById("descending");  var noSortMenu = document.getElementById("natural");    sortAscendingMenu.setAttribute("checked", "false");  sortDescendingMenu.setAttribute("checked", "false");  noSortMenu.setAttribute("checked", "false");  var direction = bookmarksSortPrefs.getCharPref("direction");  if (direction == "natural")    sortAscendingMenu.setAttribute("checked", "true");  else if (direction == "ascending")     sortDescendingMenu.setAttribute("checked", "true");  else    noSortMenu.setAttribute("checked", "true");}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e774059904a47d9f619d269b6b4d3119ae88d797/bookmarks.js/buggy/xpfe/components/bookmarks/resources/bookmarks.js