History page translation updates

pull/353/head
aandrew-me 2 weeks ago
parent 0762f41e33
commit 42ac996346

@ -609,21 +609,21 @@
const copyBtn = document.createElement('button'); const copyBtn = document.createElement('button');
copyBtn.className = 'copy-url-btn'; copyBtn.className = 'copy-url-btn';
copyBtn.textContent = i18n.__('Copy URL'); copyBtn.textContent = i18n.__('copyUrl');
copyBtn.addEventListener('click', () => copyToClipboard(item.url)); copyBtn.addEventListener('click', () => copyToClipboard(item.url));
actions.appendChild(copyBtn); actions.appendChild(copyBtn);
const openBtn = document.createElement('button'); const openBtn = document.createElement('button');
openBtn.className = 'open-file-btn'; openBtn.className = 'open-file-btn';
openBtn.textContent = i18n.__('Open'); openBtn.textContent = i18n.__('open');
openBtn.addEventListener('click', () => openFile(item.filePath)); openBtn.addEventListener('click', () => openFile(item.filePath));
actions.appendChild(openBtn); actions.appendChild(openBtn);
const deleteBtn = document.createElement('button'); const deleteBtn = document.createElement('button');
deleteBtn.className = 'delete-btn'; deleteBtn.className = 'delete-btn';
deleteBtn.textContent = i18n.__('Delete'); deleteBtn.textContent = i18n.__('delete');
deleteBtn.addEventListener('click', () => deleteHistoryItem(item.id)); deleteBtn.addEventListener('click', () => deleteHistoryItem(item.id));
actions.appendChild(deleteBtn); actions.appendChild(deleteBtn);
@ -731,8 +731,7 @@
filterHistory(); filterHistory();
}).catch((error) => { }).catch((error) => {
console.error("Failed to delete history item:", error); console.error("Failed to delete history item:", error);
// TODO: Translate showPopup(i18n.__("failedToDeleteHistoryItem"), true);
showPopup("Failed to delete history item. Please try again.", true);
}); });
} }
} }

@ -155,5 +155,6 @@
"fileDoesNotExist": "File does not exist anymore", "fileDoesNotExist": "File does not exist anymore",
"updatingYtdlp": "Updating yt-dlp", "updatingYtdlp": "Updating yt-dlp",
"updatedYtdlp": "Updated yt-dlp", "updatedYtdlp": "Updated yt-dlp",
"ytDlpUpdateRequired": "If yt-dlp is updating, wait for the update to finish. If you have installed yt-dlp by yourself, please update it." "ytDlpUpdateRequired": "If yt-dlp is updating, wait for the update to finish. If you have installed yt-dlp by yourself, please update it.",
"failedToDeleteHistoryItem": "Failed to delete history item"
} }

Loading…
Cancel
Save