Translation updates and minor changes

pull/356/head
aandrew-me 1 week ago
parent 0631ce973e
commit 4fe1940a06

@ -11,9 +11,6 @@
</head> </head>
<body id="compressor_body"> <body id="compressor_body">
<!-- Popup message -->
<span id="popupText" data-translate="copiedText">Text copied</span>
<!-- Menu icon --> <!-- Menu icon -->
<img src="../assets/images/menu.png" alt="menu" id="menuIcon"> <img src="../assets/images/menu.png" alt="menu" id="menuIcon">

@ -130,7 +130,7 @@
<div class="prefBox"> <div class="prefBox">
<span id="proxyTitle" data-translate="proxy">Proxy</span> <span id="proxyTitle" data-translate="proxy">Proxy</span>
<input type="text" id="proxyTxt" placeholder="Example: http://localhost:8080" <input type="text" id="proxyTxt" placeholder="http://localhost:8080"
pattern="^(http:\/\/|https:\/\/|socks5:\/\/)?[a-zA-Z0-9.]+:[\d]+$"> pattern="^(http:\/\/|https:\/\/|socks5:\/\/)?[a-zA-Z0-9.]+:[\d]+$">
</div> </div>

@ -384,7 +384,7 @@ function registerIpcHandlers() {
type: "error", type: "error",
title: "Error", title: "Error",
message: message, message: message,
buttons: ["Ok", "Copy error"], buttons: ["Ok", i18n("clickToCopy")],
}); });
if (response === 1) clipboard.writeText(message); if (response === 1) clipboard.writeText(message);
}); });

@ -170,7 +170,7 @@ async function startCompression() {
} else { } else {
updateProgress("success", "", itemId); updateProgress("success", "", itemId);
const fileSavedElement = document.createElement("b"); const fileSavedElement = document.createElement("b");
fileSavedElement.textContent = "File saved. Click to open"; fileSavedElement.textContent = i18n.__("fileSavedClickToOpen");
fileSavedElement.onclick = () => { fileSavedElement.onclick = () => {
ipcRenderer.send("show-file", outputPath); ipcRenderer.send("show-file", outputPath);
}; };
@ -182,7 +182,7 @@ async function startCompression() {
errorElement.onclick = () => { errorElement.onclick = () => {
ipcRenderer.send("error_dialog", error.message); ipcRenderer.send("error_dialog", error.message);
}; };
errorElement.textContent = "Error. Click for details"; errorElement.textContent = i18n.__("errorClickForDetails");
updateProgress("error", "", itemId); updateProgress("error", "", itemId);
getId(itemId + "_prog").appendChild(errorElement); getId(itemId + "_prog").appendChild(errorElement);
currentItemId = ""; currentItemId = "";
@ -647,14 +647,4 @@ getId("homeWin").addEventListener("click", () => {
closeMenu(); closeMenu();
menuIsOpen = false; menuIsOpen = false;
ipcRenderer.send("load-win", __dirname + "/index.html"); ipcRenderer.send("load-win", __dirname + "/index.html");
}); });
// Popup message
function showPopup(text) {
console.log("Triggered showpopup");
getId("popupText").textContent = text;
getId("popupText").style.display = "inline-block";
setTimeout(() => {
getId("popupText").style.display = "none";
}, 2200);
}
Loading…
Cancel
Save