Bug 1188111 - Failed to read 'hs' and 'ds' errors in add to calendar button's drop down list. r/a=philipp RELEASE_BASE_20150810
authorMerike Sell <merike.sell@eesti.ee>
Sat, 08 Aug 2015 11:26:05 +0100
changeset 22675 527220c6962b925dc54ad747835095f338ff6ded
parent 22674 49ea4c6cf1959b0e45a724577e5e5150d6ec0cb6
child 22676 ae28d3c8b21ec32aad6999ad395a83478b3cb46b
push idunknown
push userunknown
push dateunknown
bugs1188111
Bug 1188111 - Failed to read 'hs' and 'ds' errors in add to calendar button's drop down list. r/a=philipp
calendar/base/content/calendar-extract.js
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -9,17 +9,17 @@ Components.utils.import("resource://gre/
 let calendarExtract = {
     onShowLocaleMenu: function onShowLocaleMenu(target) {
         let localeList = document.getElementById(target.id);
         let langs = new Array();
         let chrome = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
                                .getService(Components.interfaces.nsIXULChromeRegistry);
         chrome.QueryInterface(Components.interfaces.nsIToolkitChromeRegistry);
         let locales = chrome.getLocalesForPackage("calendar");
-        let langRegex = /^((..)-*(.*))$/;
+        let langRegex = /^(([^-]+)-*(.*))$/;
 
         while (locales.hasMore()) {
             let localeParts = langRegex.exec(locales.getNext());
             let langName = localeParts[2];
 
             try {
                 langName = cal.calGetString("languageNames", langName, null, "global");
             } catch (ex) {}