Bug 1188111 - Failed to read 'hs' and 'ds' errors in add to calendar button's drop down list. r/a=philipp BETA_BASE_20150810
authorMerike Sell <merike.sell@eesti.ee>
Sat, 08 Aug 2015 11:26:05 +0100
changeset 22852 8e324eaa1acce37164b4d56e58c2367c19900adb
parent 22851 987e9543647fa525308ddce0123f0d8af6477beb
child 22853 a588706886bf85c2d375a80b6eff362d585ceb92
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) {}