diff --git a/frontend/static/js/annotations.js b/frontend/static/js/annotations.js index 985b4135..35d0ede2 100644 --- a/frontend/static/js/annotations.js +++ b/frontend/static/js/annotations.js @@ -275,7 +275,7 @@ var cancelBtn = document.createElement('button'); cancelBtn.type = 'button'; cancelBtn.className = 'annotation-cancel-btn'; - cancelBtn.textContent = 'Cancel'; + cancelBtn.textContent = _i18n.cancel || 'Cancel'; cancelBtn.addEventListener('click', function () { contentDiv.textContent = originalText; }); diff --git a/frontend/static/js/comments.js b/frontend/static/js/comments.js index e0cf9259..a6add2e0 100644 --- a/frontend/static/js/comments.js +++ b/frontend/static/js/comments.js @@ -255,7 +255,7 @@ fetch('/api/files/' + _fileId + '/comments/' + commentId + '/resolve', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ resolve: resolve }), + body: JSON.stringify({ is_resolved: resolve }), }) .then(function (r) { if (!r.ok) throw new Error('Failed'); @@ -357,12 +357,10 @@ var cancelBtn = document.createElement('button'); cancelBtn.type = 'button'; cancelBtn.className = 'comment-cancel-btn'; - cancelBtn.textContent = 'Cancel'; + cancelBtn.textContent = _i18n.cancel || 'Cancel'; cancelBtn.addEventListener('click', function () { bodyDiv.innerHTML = originalHTML; }); - - btns.appendChild(saveBtn); btns.appendChild(cancelBtn); form.appendChild(textarea); form.appendChild(btns); diff --git a/frontend/templates/file_detail.html b/frontend/templates/file_detail.html index 9bb08b4e..2c1242bc 100644 --- a/frontend/templates/file_detail.html +++ b/frontend/templates/file_detail.html @@ -2339,7 +2339,7 @@