diff --git a/Auto-Image.js b/Auto-Image.js index e795118..d316d69 100644 --- a/Auto-Image.js +++ b/Auto-Image.js @@ -871,7 +871,7 @@ if (source === 'turnstile-capture' && token) { setTurnstileToken(token); if (document.querySelector("#statusText")?.textContent.includes("CAPTCHA")) { - Utils.showAlert("Token captured successfully! You can start the bot now.", "success"); + Utils.showAlert(Utils.t("tokenCapturedSuccess"), "success"); updateUI("colorsFound", "success", { count: state.availableColors.length }); } } @@ -991,7 +991,7 @@ `; const title = document.createElement('div'); - title.textContent = 'Cloudflare Turnstile — please complete the check if shown'; + title.textContent = Utils.t('turnstileInstructions'); title.style.cssText = 'font: 600 12px/1.3 "Segoe UI",sans-serif; margin-bottom: 8px; opacity: 0.9;'; const host = document.createElement('div'); @@ -999,7 +999,7 @@ host.style.cssText = 'width: 100%; min-height: 70px;'; const hideBtn = document.createElement('button'); - hideBtn.textContent = 'Hide'; + hideBtn.textContent = Utils.t('hideTurnstileBtn'); hideBtn.style.cssText = 'position:absolute; top:6px; right:6px; font-size:11px; background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.2); border-radius:6px; padding:2px 6px; cursor:pointer;'; hideBtn.addEventListener('click', () => overlay.remove()); @@ -2150,7 +2150,7 @@ }, async requestPermission() { if (!("Notification" in window)) { - Utils.showAlert("Notifications are not supported in this browser.", "warning"); + Utils.showAlert(Utils.t("notificationsNotSupported"), "warning"); return "denied"; } if (Notification.permission === "granted") return "granted"; @@ -2198,8 +2198,8 @@ const shouldEdge = state._lastChargesBelow || force; const shouldRepeat = now - (state._lastChargesNotifyAt || 0) >= repeatMs; if (shouldEdge || shouldRepeat) { - const msg = `Charges ready: ${Math.floor(state.currentCharges)} / ${state.maxCharges}. Threshold: ${state.cooldownChargeThreshold}.`; - this.notify("WPlace — Charges Ready", msg, "wplace-notify-charges"); + const msg = Utils.t("chargesReadyMessage", { current: Math.floor(state.currentCharges), max: state.maxCharges, threshold: state.cooldownChargeThreshold }); + this.notify(Utils.t("chargesReadyNotification"), msg, "wplace-notify-charges"); state._lastChargesNotifyAt = now; } state._lastChargesBelow = false; @@ -2336,7 +2336,7 @@ // Don't re-fetch colors here, use what was captured when user clicked upload if (!state.availableColors || state.availableColors.length === 0) { // If no colors have been captured yet, show message - colorsContainer.innerHTML = '