www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit aa0592011758e05a4c0e306a0553ad6fa5a9a516
parent d6c36ae9a35d5d1e55a4cefd2a145034e1c6eda7
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 27 May 2017 05:37:47 -0400

Don't break getLocaleCollation() in Firefox <54 (after a73b2403b)

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1330,17 +1330,18 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); } if (Services.locale.getAppLocale) { - var appLocale = Services.locale.getAppLocale(); + var locale = Services.locale.getAppLocale(); } // Fx <=53 else { - var appLocale = Services.locale.getApplicationLocale(); + var locale = Services.locale.getApplicationLocale(); + locale = locale.getCategory('NSILOCALE_COLLATE'); } try { // Extract a valid language tag - appLocale = appLocale.match(/^[a-z]{2}(\-[A-Z]{2})?/)[0]; - var collator = new Intl.Collator(appLocale, { + locale = locale.match(/^[a-z]{2}(\-[A-Z]{2})?/)[0]; + var collator = new Intl.Collator(locale, { ignorePunctuation: true, numeric: true, sensitivity: 'base'