rem: locale = locale.toLowerCase(); 
add: locale = locale.data.toLowerCase(); 
context: function get_remote_datasource_url() {  var url = '';  var prefs = Components.classes["@mozilla.org/preferences-service;1"]                        .getService(Components.interfaces.nsIPrefBranch);  var locale;  try {    url = prefs.getCharPref("sidebar.customize.all_panels.url");    url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION);  } catch(ex) {    debug("Unable to get remote url pref. What now? "+ex);  }  try {    locale = prefs.getComplexValue("intl.content.langcode",                                   Components.interfaces.nsIPrefLocalizedString);  } catch(ex) {    try {      debug("No lang code pref, intl.content.langcode.");      debug("Use locale from user agent string instead");      locale = prefs.getComplexValue("general.useragent.locale",                                     Components.interfaces.nsIPrefLocalizedString);  } catch(ex) {      debug("Unable to get system locale. What now? "+ex);    }  }  locale = locale.toLowerCase();  url = url.replace(/%LOCALE%/g, locale);  debug("Remote url is " + url);  return url;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f0d82dc0bcfce069916db7381179ad72f5a28ceb/sidebarOverlay.js/clean/xpfe/components/sidebar/resources/sidebarOverlay.js