-
+
Configure how your LED strip is mapped to screen edges. Use test buttons to verify each edge lights up correctly.
@@ -102,22 +106,22 @@
-
+
Screen
- Top: 0 LEDs
+ Top: 0 LEDs
- Right: 0 LEDs
+ Right: 0 LEDs
- Bottom: 0 LEDs
+ Bottom: 0 LEDs
- Left: 0 LEDs
+ Left: 0 LEDs
@@ -128,20 +132,20 @@
- Starting Position:
+ Starting Position:
- Bottom Left
- Bottom Right
- Top Left
- Top Right
+ Bottom Left
+ Bottom Right
+ Top Left
+ Top Right
- Direction:
+ Direction:
- Clockwise
- Counterclockwise
+ Clockwise
+ Counterclockwise
@@ -149,45 +153,45 @@
- Total LEDs: 0 / 0
+ Total LEDs: 0 / 0
-
Test Edges (lights up each edge):
+
Test Edges (lights up each edge):
- ⬆️ Top
+ ⬆️ Top
- ➡️ Right
+ ➡️ Right
- ⬇️ Bottom
+ ⬇️ Bottom
- ⬅️ Left
+ ⬅️ Left
@@ -195,8 +199,8 @@
@@ -205,43 +209,43 @@
@@ -250,18 +254,19 @@
-
+
Please enter your API key to authenticate and access the WLED Screen Controller.
@@ -329,20 +334,20 @@
}
function showLogin() {
- showApiKeyModal('Enter your API key to login and access the controller.');
+ showApiKeyModal(t('auth.message'));
document.getElementById('modal-cancel-btn').style.display = 'inline-block';
}
function logout() {
- if (confirm('Are you sure you want to logout?')) {
+ if (confirm(t('auth.logout.confirm'))) {
localStorage.removeItem('wled_api_key');
apiKey = null;
updateAuthUI();
- showToast('Logged out successfully', 'info');
+ showToast(t('auth.logout.success'), 'info');
// Clear the UI
- document.getElementById('devices-list').innerHTML = '
Please login to view devices
';
- document.getElementById('displays-list').innerHTML = '
Please login to view displays
';
+ document.getElementById('devices-list').innerHTML = `
${t('auth.please_login')} devices
`;
+ document.getElementById('displays-list').innerHTML = `
${t('auth.please_login')} displays
`;
}
}
@@ -395,7 +400,7 @@
const key = input.value.trim();
if (!key) {
- error.textContent = 'Please enter an API key';
+ error.textContent = t('auth.error.required');
error.style.display = 'block';
return;
}
@@ -406,7 +411,7 @@
updateAuthUI();
closeApiKeyModal();
- showToast('Logged in successfully!', 'success');
+ showToast(t('auth.success'), 'success');
// Reload data
loadServerInfo();
diff --git a/server/src/wled_controller/static/locales/en.json b/server/src/wled_controller/static/locales/en.json
new file mode 100644
index 0000000..13aa1da
--- /dev/null
+++ b/server/src/wled_controller/static/locales/en.json
@@ -0,0 +1,111 @@
+{
+ "app.title": "WLED Screen Controller",
+ "app.version": "Version:",
+ "theme.toggle": "Toggle theme",
+ "locale.change": "Change language",
+ "auth.login": "Login",
+ "auth.logout": "Logout",
+ "auth.authenticated": "Authenticated",
+ "auth.title": "Login to WLED Controller",
+ "auth.message": "Please enter your API key to authenticate and access the WLED Screen Controller.",
+ "auth.label": "API Key:",
+ "auth.placeholder": "Enter your API key...",
+ "auth.hint": "Your API key will be stored securely in your browser's local storage.",
+ "auth.button.cancel": "Cancel",
+ "auth.button.login": "Login",
+ "auth.error.required": "Please enter an API key",
+ "auth.success": "Logged in successfully!",
+ "auth.logout.confirm": "Are you sure you want to logout?",
+ "auth.logout.success": "Logged out successfully",
+ "auth.please_login": "Please login to view",
+ "displays.title": "Available Displays",
+ "displays.layout": "Display Layout",
+ "displays.information": "Display Information",
+ "displays.legend.primary": "Primary Display",
+ "displays.legend.secondary": "Secondary Display",
+ "displays.badge.primary": "Primary",
+ "displays.badge.secondary": "Secondary",
+ "displays.resolution": "Resolution:",
+ "displays.position": "Position:",
+ "displays.index": "Display Index:",
+ "displays.loading": "Loading displays...",
+ "displays.none": "No displays available",
+ "displays.failed": "Failed to load displays",
+ "devices.title": "WLED Devices",
+ "devices.add": "Add New Device",
+ "devices.loading": "Loading devices...",
+ "devices.none": "No devices configured",
+ "devices.failed": "Failed to load devices",
+ "devices.wled_config": "WLED Configuration:",
+ "devices.wled_note": "Configure your WLED device (effects, segments, color order, power limits, etc.) using the",
+ "devices.wled_link": "official WLED app",
+ "devices.wled_note2": "This controller sends pixel color data and controls brightness per device.",
+ "device.name": "Device Name:",
+ "device.name.placeholder": "Living Room TV",
+ "device.url": "WLED URL:",
+ "device.url.placeholder": "http://192.168.1.100",
+ "device.led_count": "LED Count:",
+ "device.led_count.hint": "Number of LEDs configured in your WLED device",
+ "device.button.add": "Add Device",
+ "device.button.start": "Start",
+ "device.button.stop": "Stop",
+ "device.button.settings": "Settings",
+ "device.button.calibrate": "Calibrate",
+ "device.button.remove": "Remove",
+ "device.status.connected": "Connected",
+ "device.status.disconnected": "Disconnected",
+ "device.status.error": "Error",
+ "device.status.processing": "Processing",
+ "device.status.idle": "Idle",
+ "device.fps": "FPS:",
+ "device.display": "Display:",
+ "device.remove.confirm": "Are you sure you want to remove this device?",
+ "device.added": "Device added successfully",
+ "device.removed": "Device removed successfully",
+ "device.started": "Processing started",
+ "device.stopped": "Processing stopped",
+ "settings.title": "Device Settings",
+ "settings.brightness": "Brightness:",
+ "settings.brightness.hint": "Global brightness for this WLED device (0-100%)",
+ "settings.url.hint": "IP address or hostname of your WLED device",
+ "settings.button.cancel": "Cancel",
+ "settings.button.save": "Save Changes",
+ "settings.saved": "Settings saved successfully",
+ "settings.failed": "Failed to save settings",
+ "calibration.title": "LED Calibration",
+ "calibration.description": "Configure how your LED strip is mapped to screen edges. Use test buttons to verify each edge lights up correctly.",
+ "calibration.preview.screen": "Screen",
+ "calibration.preview.top": "Top:",
+ "calibration.preview.right": "Right:",
+ "calibration.preview.bottom": "Bottom:",
+ "calibration.preview.left": "Left:",
+ "calibration.preview.leds": "LEDs",
+ "calibration.start_position": "Starting Position:",
+ "calibration.position.bottom_left": "Bottom Left",
+ "calibration.position.bottom_right": "Bottom Right",
+ "calibration.position.top_left": "Top Left",
+ "calibration.position.top_right": "Top Right",
+ "calibration.direction": "Direction:",
+ "calibration.direction.clockwise": "Clockwise",
+ "calibration.direction.counterclockwise": "Counterclockwise",
+ "calibration.leds.top": "Top LEDs:",
+ "calibration.leds.right": "Right LEDs:",
+ "calibration.leds.bottom": "Bottom LEDs:",
+ "calibration.leds.left": "Left LEDs:",
+ "calibration.total": "Total LEDs:",
+ "calibration.test": "Test Edges (lights up each edge):",
+ "calibration.test.top": "Top",
+ "calibration.test.right": "Right",
+ "calibration.test.bottom": "Bottom",
+ "calibration.test.left": "Left",
+ "calibration.button.cancel": "Cancel",
+ "calibration.button.save": "Save Calibration",
+ "calibration.saved": "Calibration saved successfully",
+ "calibration.failed": "Failed to save calibration",
+ "calibration.testing": "Testing {edge} edge...",
+ "server.healthy": "Server online",
+ "server.offline": "Server offline",
+ "error.unauthorized": "Unauthorized - please login",
+ "error.network": "Network error",
+ "error.unknown": "An error occurred"
+}
diff --git a/server/src/wled_controller/static/locales/ru.json b/server/src/wled_controller/static/locales/ru.json
new file mode 100644
index 0000000..0e8c21b
--- /dev/null
+++ b/server/src/wled_controller/static/locales/ru.json
@@ -0,0 +1,111 @@
+{
+ "app.title": "WLED Контроллер Экрана",
+ "app.version": "Версия:",
+ "theme.toggle": "Переключить тему",
+ "locale.change": "Изменить язык",
+ "auth.login": "Войти",
+ "auth.logout": "Выйти",
+ "auth.authenticated": "Авторизован",
+ "auth.title": "Вход в WLED Контроллер",
+ "auth.message": "Пожалуйста, введите ваш API ключ для аутентификации и доступа к WLED Контроллеру Экрана.",
+ "auth.label": "API Ключ:",
+ "auth.placeholder": "Введите ваш API ключ...",
+ "auth.hint": "Ваш API ключ будет безопасно сохранен в локальном хранилище браузера.",
+ "auth.button.cancel": "Отмена",
+ "auth.button.login": "Войти",
+ "auth.error.required": "Пожалуйста, введите API ключ",
+ "auth.success": "Вход выполнен успешно!",
+ "auth.logout.confirm": "Вы уверены, что хотите выйти?",
+ "auth.logout.success": "Выход выполнен успешно",
+ "auth.please_login": "Пожалуйста, войдите для просмотра",
+ "displays.title": "Доступные Дисплеи",
+ "displays.layout": "Расположение Дисплеев",
+ "displays.information": "Информация о Дисплеях",
+ "displays.legend.primary": "Основной Дисплей",
+ "displays.legend.secondary": "Вторичный Дисплей",
+ "displays.badge.primary": "Основной",
+ "displays.badge.secondary": "Вторичный",
+ "displays.resolution": "Разрешение:",
+ "displays.position": "Позиция:",
+ "displays.index": "Индекс Дисплея:",
+ "displays.loading": "Загрузка дисплеев...",
+ "displays.none": "Нет доступных дисплеев",
+ "displays.failed": "Не удалось загрузить дисплеи",
+ "devices.title": "WLED Устройства",
+ "devices.add": "Добавить Новое Устройство",
+ "devices.loading": "Загрузка устройств...",
+ "devices.none": "Устройства не настроены",
+ "devices.failed": "Не удалось загрузить устройства",
+ "devices.wled_config": "Конфигурация WLED:",
+ "devices.wled_note": "Настройте ваше WLED устройство (эффекты, сегменты, порядок цветов, ограничения питания и т.д.) используя",
+ "devices.wled_link": "официальное приложение WLED",
+ "devices.wled_note2": "Этот контроллер отправляет данные о цвете пикселей и управляет яркостью для каждого устройства.",
+ "device.name": "Имя Устройства:",
+ "device.name.placeholder": "ТВ в Гостиной",
+ "device.url": "WLED URL:",
+ "device.url.placeholder": "http://192.168.1.100",
+ "device.led_count": "Количество Светодиодов:",
+ "device.led_count.hint": "Количество светодиодов, настроенных в вашем WLED устройстве",
+ "device.button.add": "Добавить Устройство",
+ "device.button.start": "Запустить",
+ "device.button.stop": "Остановить",
+ "device.button.settings": "Настройки",
+ "device.button.calibrate": "Калибровка",
+ "device.button.remove": "Удалить",
+ "device.status.connected": "Подключено",
+ "device.status.disconnected": "Отключено",
+ "device.status.error": "Ошибка",
+ "device.status.processing": "Обработка",
+ "device.status.idle": "Ожидание",
+ "device.fps": "FPS:",
+ "device.display": "Дисплей:",
+ "device.remove.confirm": "Вы уверены, что хотите удалить это устройство?",
+ "device.added": "Устройство успешно добавлено",
+ "device.removed": "Устройство успешно удалено",
+ "device.started": "Обработка запущена",
+ "device.stopped": "Обработка остановлена",
+ "settings.title": "Настройки Устройства",
+ "settings.brightness": "Яркость:",
+ "settings.brightness.hint": "Общая яркость для этого WLED устройства (0-100%)",
+ "settings.url.hint": "IP адрес или имя хоста вашего WLED устройства",
+ "settings.button.cancel": "Отмена",
+ "settings.button.save": "Сохранить Изменения",
+ "settings.saved": "Настройки успешно сохранены",
+ "settings.failed": "Не удалось сохранить настройки",
+ "calibration.title": "Калибровка Светодиодов",
+ "calibration.description": "Настройте как ваша светодиодная лента сопоставляется с краями экрана. Используйте кнопки тестирования чтобы проверить что каждый край светится правильно.",
+ "calibration.preview.screen": "Экран",
+ "calibration.preview.top": "Сверху:",
+ "calibration.preview.right": "Справа:",
+ "calibration.preview.bottom": "Снизу:",
+ "calibration.preview.left": "Слева:",
+ "calibration.preview.leds": "Светодиодов",
+ "calibration.start_position": "Начальная Позиция:",
+ "calibration.position.bottom_left": "Нижний Левый",
+ "calibration.position.bottom_right": "Нижний Правый",
+ "calibration.position.top_left": "Верхний Левый",
+ "calibration.position.top_right": "Верхний Правый",
+ "calibration.direction": "Направление:",
+ "calibration.direction.clockwise": "По Часовой Стрелке",
+ "calibration.direction.counterclockwise": "Против Часовой Стрелки",
+ "calibration.leds.top": "Светодиодов Сверху:",
+ "calibration.leds.right": "Светодиодов Справа:",
+ "calibration.leds.bottom": "Светодиодов Снизу:",
+ "calibration.leds.left": "Светодиодов Слева:",
+ "calibration.total": "Всего Светодиодов:",
+ "calibration.test": "Тест Краев (подсвечивает каждый край):",
+ "calibration.test.top": "Сверху",
+ "calibration.test.right": "Справа",
+ "calibration.test.bottom": "Снизу",
+ "calibration.test.left": "Слева",
+ "calibration.button.cancel": "Отмена",
+ "calibration.button.save": "Сохранить Калибровку",
+ "calibration.saved": "Калибровка успешно сохранена",
+ "calibration.failed": "Не удалось сохранить калибровку",
+ "calibration.testing": "Тестирование {edge} края...",
+ "server.healthy": "Сервер онлайн",
+ "server.offline": "Сервер офлайн",
+ "error.unauthorized": "Не авторизован - пожалуйста, войдите",
+ "error.network": "Сетевая ошибка",
+ "error.unknown": "Произошла ошибка"
+}