From 3a8d04f4676e0e010454409005185e346022c262 Mon Sep 17 00:00:00 2001 From: Sylvester Keil Date: Mon, 30 Jul 2018 12:33:08 +0200 Subject: [PATCH] Remove Zotero.localeJoin --- chrome/content/zotero/upgrade.xul | 4 ++-- chrome/content/zotero/xpcom/progressWindow.js | 4 ++-- chrome/content/zotero/xpcom/zotero.js | 17 ----------------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/chrome/content/zotero/upgrade.xul b/chrome/content/zotero/upgrade.xul index fe44b4a35f..e562da566e 100644 --- a/chrome/content/zotero/upgrade.xul +++ b/chrome/content/zotero/upgrade.xul @@ -108,9 +108,9 @@ function _setStartupError() { - Zotero.startupError = Zotero.localeJoin([ + Zotero.startupError = [ Zotero.getString('upgrade.dbUpdateRequired'), Zotero.getString('general.restartFirefox') - ]); + ].join(' '); } diff --git a/chrome/content/zotero/xpcom/progressWindow.js b/chrome/content/zotero/xpcom/progressWindow.js index cedd58dd67..91ba56a2d9 100644 --- a/chrome/content/zotero/xpcom/progressWindow.js +++ b/chrome/content/zotero/xpcom/progressWindow.js @@ -387,10 +387,10 @@ Zotero.ProgressWindow = function(options = {}) { this.Translation = {}; this.Translation.operationInProgress = function() { - var desc = Zotero.localeJoin([ + var desc = [ Zotero.getString('general.operationInProgress'), Zotero.getString('general.operationInProgress.waitUntilFinishedAndTryAgain') - ]); + ].join(' '); self.Translation._scrapeError(desc); }; diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 14c4de739d..585cd659f7 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -43,7 +43,6 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); this.debug = debug; this.log = log; this.logError = logError; - this.localeJoin = localeJoin; this.setFontSize = setFontSize; this.flattenArguments = flattenArguments; this.getAncestorByTagName = getAncestorByTagName; @@ -1412,22 +1411,6 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); } - /* - * This function should be removed - * - * |separator| defaults to a space (not a comma like Array.join()) if - * not specified - * - * TODO: Substitute localized characters (e.g. Arabic comma and semicolon) - */ - function localeJoin(arr, separator) { - if (typeof separator == 'undefined') { - separator = ' '; - } - return arr.join(separator); - } - - this.getLocaleCollation = function () { if (this.collation) { return this.collation;