Fix getLocaleCollation() in Firefox 54
This commit is contained in:
parent
d5a8a3420d
commit
a73b2403b0
1 changed files with 3 additions and 4 deletions
|
@ -1338,17 +1338,16 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var locale = appLocale.getCategory('NSILOCALE_COLLATE');
|
|
||||||
// Extract a valid language tag
|
// Extract a valid language tag
|
||||||
locale = locale.match(/^[a-z]{2}(\-[A-Z]{2})?/)[0];
|
appLocale = appLocale.match(/^[a-z]{2}(\-[A-Z]{2})?/)[0];
|
||||||
var collator = new Intl.Collator(locale, {
|
var collator = new Intl.Collator(appLocale, {
|
||||||
ignorePunctuation: true,
|
ignorePunctuation: true,
|
||||||
numeric: true,
|
numeric: true,
|
||||||
sensitivity: 'base'
|
sensitivity: 'base'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Zotero.debug(e, 1);
|
Zotero.logError(e);
|
||||||
|
|
||||||
// If there's an error, just skip sorting
|
// If there's an error, just skip sorting
|
||||||
collator = {
|
collator = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue