Codebase review: stability, performance, usability, and i18n fixes
Stability: - Fix race condition: set _is_running before create_task in target processors - Await probe task after cancel in wled_target_processor - Replace raw fetch() with fetchWithAuth() across devices, kc-targets, pattern-templates - Add try/catch to showTestTemplateModal in streams.js - Wrap blocking I/O in asyncio.to_thread (picture_targets, system restore) - Fix dashboardStopAll to filter only running targets with ok guard Performance: - Vectorize fire effect spark loop with numpy in effect_stream - Vectorize FFT band binning with cumulative sum in analysis.py - Rewrite pixel_processor with vectorized numpy (accept ndarray or list) - Add httpx.AsyncClient connection pooling with lock in wled_provider - Optimize _send_pixels_http to avoid np.hstack allocation in wled_client - Mutate chart arrays in-place in dashboard, perf-charts, targets - Merge dashboard 2-batch fetch into single Promise.all - Hoist frame_time outside loop in mapped_stream Usability: - Fix health check interval load/save in device settings - Swap confirm modal button classes (No=secondary, Yes=danger) - Add aria-modal to audio/value source editors, fix close button aria-labels - Add modal footer close button to settings modal - Add dedicated calibration LED count validation error keys i18n: - Replace ~50 hardcoded English strings with t() calls across 12 JS files - Add 50 new keys to en.json, ru.json, zh.json - Localize inline toasts in index.html with window.t fallback - Add data-i18n to command palette footer - Add localization policy to CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -992,5 +992,54 @@
|
||||
"settings.saved_backups.download": "Download",
|
||||
"settings.saved_backups.delete": "Delete",
|
||||
"settings.saved_backups.delete_confirm": "Delete this backup file?",
|
||||
"settings.saved_backups.delete_error": "Failed to delete backup"
|
||||
"settings.saved_backups.delete_error": "Failed to delete backup",
|
||||
"device.error.power_off_failed": "Failed to turn off device",
|
||||
"device.removed": "Device removed",
|
||||
"device.error.remove_failed": "Failed to remove device",
|
||||
"device.error.settings_load_failed": "Failed to load device settings",
|
||||
"device.error.brightness": "Failed to update brightness",
|
||||
"device.error.required": "Please fill in all fields correctly",
|
||||
"device.error.update": "Failed to update device",
|
||||
"device.error.save": "Failed to save settings",
|
||||
"device_discovery.error.fill_all_fields": "Please fill in all fields",
|
||||
"device_discovery.added": "Device added successfully",
|
||||
"device_discovery.error.add_failed": "Failed to add device",
|
||||
"calibration.error.load_failed": "Failed to load calibration",
|
||||
"calibration.error.css_load_failed": "Failed to load color strip source",
|
||||
"calibration.error.test_toggle_failed": "Failed to toggle test edge",
|
||||
"calibration.saved": "Calibration saved",
|
||||
"calibration.error.save_failed": "Failed to save calibration",
|
||||
"calibration.error.led_count_mismatch": "Total LEDs must equal the device LED count",
|
||||
"calibration.error.led_count_exceeded": "Calibrated LEDs exceed the total LED count",
|
||||
"dashboard.error.profile_toggle_failed": "Failed to toggle profile",
|
||||
"dashboard.error.start_failed": "Failed to start processing",
|
||||
"dashboard.error.stop_failed": "Failed to stop processing",
|
||||
"dashboard.error.autostart_toggle_failed": "Failed to toggle auto-start",
|
||||
"dashboard.error.stop_all": "Failed to stop all targets",
|
||||
"target.error.editor_open_failed": "Failed to open target editor",
|
||||
"target.error.start_failed": "Failed to start target",
|
||||
"target.error.stop_failed": "Failed to stop target",
|
||||
"target.error.clone_failed": "Failed to clone target",
|
||||
"target.error.autostart_toggle_failed": "Failed to toggle auto-start",
|
||||
"target.error.delete_failed": "Failed to delete target",
|
||||
"audio_source.error.load": "Failed to load audio source",
|
||||
"audio_template.error.clone_failed": "Failed to clone audio template",
|
||||
"value_source.error.load": "Failed to load value source",
|
||||
"color_strip.error.editor_open_failed": "Failed to open color strip editor",
|
||||
"color_strip.error.clone_failed": "Failed to clone color strip source",
|
||||
"color_strip.error.delete_failed": "Failed to delete color strip source",
|
||||
"pattern.error.editor_open_failed": "Failed to open pattern template editor",
|
||||
"pattern.error.clone_failed": "Failed to clone pattern template",
|
||||
"pattern.error.delete_failed": "Failed to delete pattern template",
|
||||
"pattern.error.capture_bg_failed": "Failed to capture background",
|
||||
"stream.error.clone_picture_failed": "Failed to clone picture source",
|
||||
"stream.error.clone_capture_failed": "Failed to clone capture template",
|
||||
"stream.error.clone_pp_failed": "Failed to clone postprocessing template",
|
||||
"kc_target.error.editor_open_failed": "Failed to open key colors editor",
|
||||
"kc_target.error.clone_failed": "Failed to clone key colors target",
|
||||
"kc_target.error.delete_failed": "Failed to delete key colors target",
|
||||
"theme.switched.dark": "Switched to dark theme",
|
||||
"theme.switched.light": "Switched to light theme",
|
||||
"accent.color.updated": "Accent color updated",
|
||||
"search.footer": "↑↓ navigate · Enter select · Esc close"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user