mirror of
https://github.com/tiennm99/WPlace-AutoBOT.git
synced 2026-10-14 04:15:46 +00:00
feat(ui): update language file and improve translations
- Update the title in `en.json` to "Auto-Image". - Standardize button labels for upload and resize actions. - Add new translation keys: "colorsUpdated", "overlayTilesNotLoaded", "paintingBatchFailed", "paintingPixelCheckFailed", "paintingFinalBatchFailed", and "fullChargeIn". - Refine messages for clarity, such as updating "noColorsFound" and "noChargesThreshold". - Improve error and progress messages for better user understanding. Benefits: - Provides more descriptive and user-friendly translations. - Enhances consistency across UI elements. - Supports additional scenarios with new translations. Note: - Ensure all new keys are properly integrated into the application logic.
This commit is contained in:
1 parent
8947dc036f
commit
a5fc3469ca
2 files changed
+21
-12
No files matched your search
+5
-3
@@ -304,7 +304,7 @@
|
||||
}
|
||||
|
||||
// Load translations from CDN
|
||||
const url = `https://staninna.github.io/WPlace-AutoBOT/decoupled-translations/lang/${language}.json`;
|
||||
const url = `https://skalsech.github.io/WPlace-AutoBOT/feat-external-lang/lang/${language}.json`;
|
||||
const maxRetries = 3;
|
||||
const baseDelay = 1000; // 1 second
|
||||
|
||||
@@ -3302,7 +3302,7 @@
|
||||
// Link external CSS files
|
||||
const cssLink = document.createElement('link');
|
||||
cssLink.rel = 'stylesheet';
|
||||
cssLink.href = 'https://skalsech.github.io/WPlace-AutoBOT/my_main/auto-image-styles.css';
|
||||
cssLink.href = 'https://skalsech.github.io/WPlace-AutoBOT/feat-external-lang/auto-image-styles.css';
|
||||
cssLink.setAttribute('data-wplace-theme', 'true');
|
||||
document.head.appendChild(cssLink);
|
||||
|
||||
@@ -6482,13 +6482,15 @@
|
||||
return; // Уже достигли порога
|
||||
}
|
||||
|
||||
let timeText = Utils.msToTimeText(remainingMs);
|
||||
const current = state.fullChargeData ? state.fullChargeData.current : state.currentCharges;
|
||||
const timeText = Utils.msToTimeText(remainingMs);
|
||||
|
||||
updateUI(
|
||||
'noChargesThreshold',
|
||||
'warning',
|
||||
{
|
||||
threshold,
|
||||
current,
|
||||
time: timeText,
|
||||
},
|
||||
true
|
||||
|
||||
+16
-9
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"title": "WPlace Auto-Image",
|
||||
"title": "Auto-Image",
|
||||
"toggleOverlay": "Toggle Overlay",
|
||||
"scanColors": "Scan Colors",
|
||||
"uploadImage": "Upload Image",
|
||||
"resizeImage": "Resize Image",
|
||||
"uploadImage": "Upload",
|
||||
"resizeImage": "Resize",
|
||||
"selectPosition": "Select Position",
|
||||
"startPainting": "Start Painting",
|
||||
"stopPainting": "Stop Painting",
|
||||
"startPainting": "Start",
|
||||
"stopPainting": "Stop",
|
||||
"checkingColors": "🔍 Checking available colors...",
|
||||
"noColorsFound": "❌ Open the color palette on the site and try again!",
|
||||
"noColorsFound": "❌ To update the color swatch, open the color palette on the site and try again!",
|
||||
"colorsUpdated": "✅ Available colors increased {oldCount} -> {newCount}, {diffCount} new colors found",
|
||||
"colorsFound": "✅ {count} available colors found. Ready to upload.",
|
||||
"loadingImage": "🖼️ Loading image...",
|
||||
"imageLoaded": "✅ Image loaded with {count} valid pixels",
|
||||
@@ -20,13 +21,18 @@
|
||||
"startPaintingMsg": "🎨 Starting painting...",
|
||||
"paintingProgress": "🧱 Progress: {painted}/{total} pixels...",
|
||||
"noCharges": "⌛ No charges. Waiting {time}...",
|
||||
"paintingStopped": "⏹️ Painting stopped by user",
|
||||
"overlayTilesNotLoaded": "❌ Required map tiles not loaded. Check connection or retry.",
|
||||
"paintingStoppedByUser": "⏹️ Painting stopped by user",
|
||||
"paintingBatchFailed": "❌ Failed to send pixel batch after retries. Painting stopped.",
|
||||
"paintingPixelCheckFailed": "❌ Failed to read pixel at ({x}, {y}). Painting stopped.",
|
||||
"paintingFinalBatchFailed": "⚠️ Final batch of {count} pixels failed after retries.",
|
||||
"paintingComplete": "✅ Painting complete! {count} pixels painted.",
|
||||
"paintingError": "❌ Error during painting",
|
||||
"paintingError": "❌ Unexpected error during painting",
|
||||
"missingRequirements": "❌ Load an image and select a position first",
|
||||
"progress": "Progress",
|
||||
"pixels": "Pixels",
|
||||
"charges": "Charges",
|
||||
"fullChargeIn": "Full Charge In",
|
||||
"estimatedTime": "Estimated time",
|
||||
"initMessage": "Click 'Upload Image' to begin",
|
||||
"waitingInit": "Waiting for initialization...",
|
||||
@@ -71,7 +77,8 @@
|
||||
"waitCharges": "Wait until charges reach",
|
||||
"captchaSolving": "🔑 Generating Turnstile token...",
|
||||
"captchaFailed": "❌ Turnstile token generation failed. Trying fallback method...",
|
||||
"automation": "Automation", "noChargesThreshold": "⌛ Waiting for charges to reach {threshold}. Currently {current}. Next in {time}...",
|
||||
"automation": "Automation",
|
||||
"noChargesThreshold": "⌛ Waiting to reach {threshold} charges. Currently {current}. Estimated time: {time}.",
|
||||
"tokenCapturedSuccess": "Token captured successfully! You can start the bot now.",
|
||||
"notificationsNotSupported": "Notifications are not supported in this browser.",
|
||||
"chargesReadyNotification": "WPlace — Charges Ready",
|
||||
|
||||
Reference in new issue
Block a user