From 139019f6e3623a5337eb81f887ff8c2922f715a1 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 3 Jul 2020 08:22:44 -0400 Subject: [PATCH] Internationalize clipboard default project name (#2814) Fixes #2776 --- .../index/default-importing-controller/parsing-panel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/webapp/modules/core/scripts/index/default-importing-controller/parsing-panel.js b/main/webapp/modules/core/scripts/index/default-importing-controller/parsing-panel.js index a874915cd..0e68f3ad8 100644 --- a/main/webapp/modules/core/scripts/index/default-importing-controller/parsing-panel.js +++ b/main/webapp/modules/core/scripts/index/default-importing-controller/parsing-panel.js @@ -60,7 +60,11 @@ Refine.DefaultImportingController.prototype._showParsingPanel = function(hasFile if (!(this._projectName) && this._job.config.fileSelection.length > 0) { var index = this._job.config.fileSelection[0]; var record = this._job.config.retrievalRecord.files[index]; - this._projectName = $.trim(record.fileName.replace(/[\._-]/g, ' ').replace(/\s+/g, ' ')); + if (record.fileName == '(clipboard)') { + this._projectName = $.i18n('core-index-import/clipboard'); + } else { + this._projectName = $.trim(record.fileName.replace(/[\._-]/g, ' ').replace(/\s+/g, ' ')); + } } if (this._projectName) { this._parsingPanelElmts.projectNameInput[0].value = this._projectName;