diff --git a/chrome/content/zotero/runJS.html b/chrome/content/zotero/runJS.html
index 5dc6935ab9..dce469c89a 100644
--- a/chrome/content/zotero/runJS.html
+++ b/chrome/content/zotero/runJS.html
@@ -1,36 +1,37 @@
- Run JavaScript
+
-
+
diff --git a/chrome/content/zotero/runJS.js b/chrome/content/zotero/runJS.js
index 2681b493c3..dfe8a8ccb9 100644
--- a/chrome/content/zotero/runJS.js
+++ b/chrome/content/zotero/runJS.js
@@ -1,8 +1,8 @@
function update() {
var isAsync = document.getElementById('run-as-async').checked;
var resultLabel = document.getElementById('result-label');
- var val = isAsync ? 'Return value' : 'Result';
- resultLabel.textContent = val + ':';
+ var type = isAsync ? 'async' : 'none';
+ resultLabel.setAttribute('data-l10n-args', `{"type":"${type}"}`);
}
async function run() {
@@ -85,6 +85,7 @@ window.addEventListener("load", function (e) {
return;
}
+ MozXULElement.insertFTLIfNeeded("zotero.ftl");
var codeWin = document.getElementById("editor-code").contentWindow;
codeEditor = codeWin.editor;
var session = codeEditor.getSession();
diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl
index 0b67f5697b..24c27a66ea 100644
--- a/chrome/locale/en-US/zotero/zotero.ftl
+++ b/chrome/locale/en-US/zotero/zotero.ftl
@@ -10,6 +10,7 @@ general-add = Add
general-remind-me-later = Remind Me Later
general-choose-file = Choose Fileā¦
general-open-settings = Open Settings
+general-help = Help
menu-file-show-in-finder =
.label = Show in Finder
@@ -257,6 +258,16 @@ rtfScan-complete-page =
rtfScan-complete-page-description = Your document has now been scanned and processed. Please ensure that it is formatted correctly.
+runJS-title = Run JavaScript
+runJS-editor-label = Code:
+runJS-run = Run
+runJS-help = { general-help }
+runJS-result = {
+ $type ->
+ [async] Return value:
+ *[other] Result:
+}
+runJS-run-async = Run as async function
bibliography-style-label = Citation Style:
bibliography-locale-label = Language: