Fixed race condition where translations weren't being applied to the database page when French language was selected. The issue was caused by the i18n system loading asynchronously while page content was being rendered.
Changes:
- Added applyTranslationsWhenReady() function that waits for translations to load
- Re-apply translations after dynamic content (sidebar/topbar) is loaded
- Added languageChanged event listener to re-apply translations on language switch
- Ensures all text appears in the selected language (French/English)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added a "Danger Zone" section on the database page that allows users to empty all sensor data tables while preserving configuration and timestamp tables. The feature includes:
- New Python script (sqlite/empty_sensor_tables.py) to safely empty sensor tables
- Backend endpoint in launcher.php (empty_sensor_tables)
- Frontend UI with red warning card and confirmation dialog
- Detailed feedback showing deleted record counts per table
- i18n support for French and English
Tables emptied: data_NPM, data_NPM_5channels, data_BME280, data_envea, data_WIND, data_MPPT, data_NOISE, modem_status
Tables preserved: timestamp_table, config_table, envea_sondes_table, config_scripts_table
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extended internationalization support by adding translation keys and data-i18n attributes to page content. Previously only the sidebar was translated - now the main content of Home, Database, and Logs pages will switch between French and English when the user changes the language selector.
Translation keys added:
- Home page: title, welcome message, PM measures, Linux stats, disk/memory usage
- Database page: all UI labels, buttons, and dropdown options
- Logs page: title, description, log types, and action buttons
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added i18n.js script to all main pages (index, database, saraR4, wifi, logs, admin) to enable language switching functionality across the entire application. Commented out Map and Terminal menu items in the sidebar as these pages are not yet ready for production use.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extended the internationalization system to support sidebar navigation menu with French/English translations. Fixed language selector dropdown styling to improve text visibility with proper contrast (gray background instead of transparent).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**Core System:**
- Add i18n.js translation library with data-attribute support
- Create translation files (fr.json, en.json) with offline support
- Store language preference in SQLite config_table
- Add backend endpoints for get/set language
**UI Features:**
- Add language switcher dropdown to topbar (🇫🇷 FR / 🇬🇧 EN)
- Auto-sync language selection across all pages
- Support for static HTML and dynamically created elements
**Implementation:**
- Migrate sensors.html as working example
- Add data-i18n attributes to all UI elements
- Support for buttons, inputs, and dynamic content
- Comprehensive README documentation in html/lang/
**Technical Details:**
- Works completely offline (local JSON files)
- No external dependencies
- Database-backed user preference
- Event-based language change notifications
- Automatic translation on page load
Next steps: Gradually migrate other pages (admin, wifi, index, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Refactor sensor card creation to use config_table instead of non-existent config_scripts_table
- Fix BME280 card check: use config.BME280 instead of response["BME280/get_data_v2.py"]
- Fix NOISE card check: use config.NOISE instead of response.i2C_sound
- Fix Envea card check: use config.envea instead of response["envea/read_value_v2.py"]
- Create dedicated createSensorCards() function for cleaner code
- Remove obsolete get_config_scripts_sqlite AJAX call
Now sensor cards properly display based on config_table settings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix deviceID overwrite bug: preserve manual configuration across reboots
- Use deviceName as hotspot SSID for better device identification
- Implement live WiFi scanning instead of reading stale CSV data
- Improve hotspot management with dynamic connection detection
- Add database status updates on WiFi connection success/failure
- Hide password in logs for better security
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>