diff --git a/ui/localization/messages/en.json b/ui/localization/messages/en.json index ad70653c..5f1f6e88 100644 --- a/ui/localization/messages/en.json +++ b/ui/localization/messages/en.json @@ -279,6 +279,34 @@ "general_update_updating_description": "Please don't turn off your device. This process may take a few minutes.", "general_update_updating_title": "Updating your device", "getting_remote_session_description": "Getting remote session description attempt {attempt}", + "hardware_backlight_settings_error": "Failed to set backlight settings: {error}", + "hardware_backlight_settings_get_error": "Failed to get backlight settings: {error}", + "hardware_backlight_settings_success": "Backlight settings updated successfully", + "hardware_dim_display_after_description": "Set how long to wait before dimming the display", + "hardware_dim_display_after_title": "Dim Display After", + "hardware_display_brightness_description": "Set the brightness of the display", + "hardware_display_brightness_high": "High", + "hardware_display_brightness_low": "Low", + "hardware_display_brightness_medium": "Medium", + "hardware_display_brightness_off": "Off", + "hardware_display_brightness_title": "Display Brightness", + "hardware_display_orientation_description": "Set the orientation of the display", + "hardware_display_orientation_error": "Failed to set display orientation: {error}", + "hardware_display_orientation_inverted": "Inverted", + "hardware_display_orientation_normal": "Normal", + "hardware_display_orientation_success": "Display orientation updated successfully", + "hardware_display_orientation_title": "Display Orientation", + "hardware_display_wake_up_note": "The display will wake up when the connection state changes, or when touched.", + "hardware_page_description": "Configure display settings and hardware options for your JetKVM device", + "hardware_time_1_hour": "1 Hour", + "hardware_time_1_minute": "1 Minute", + "hardware_time_10_minutes": "10 Minutes", + "hardware_time_30_minutes": "30 Minutes", + "hardware_time_5_minutes": "5 Minutes", + "hardware_time_never": "Never", + "hardware_title": "Hardware", + "hardware_turn_off_display_after_description": "Period of inactivity before display automatically turns off", + "hardware_turn_off_display_after_title": "Turn off Display After", "hide": "Hide", "ice_gathering_completed": "ICE Gathering completed", "info_caps_lock": "Caps Lock", @@ -325,6 +353,15 @@ "jiggler_save_jiggler_config": "Save Jiggler Config", "jiggler_timezone_description": "Timezone for cron schedule", "jiggler_timezone_label": "Timezone", + "keyboard_description": "Configure keyboard settings for your device", + "keyboard_layout_description": "Keyboard layout of target operating system", + "keyboard_layout_error": "Failed to set keyboard layout: {error}", + "keyboard_layout_long_description": "The virtual keyboard, paste text, and keyboard macros send individual key strokes to the target device. The keyboard layout determines which key codes are being sent. Ensure that the keyboard layout in JetKVM matches the settings in the operating system.", + "keyboard_layout_success": "Keyboard layout set successfully to {layout}", + "keyboard_layout_title": "Keyboard Layout", + "keyboard_show_pressed_keys_description": "Display currently pressed keys in the status bar", + "keyboard_show_pressed_keys_title": "Show Pressed Keys", + "keyboard_title": "Keyboard", "kvm_terminal": "KVM Terminal", "last_online": "Last online {time}", "learn_more": "Learn more", @@ -637,34 +674,5 @@ "wake_on_lan_magic_sent_success": "Magic Packet sent successfully", "wake_on_lan": "Wake On LAN", "welcome_to_jetkvm_description": "Control any computer remotely", - "welcome_to_jetkvm": "Welcome to JetKVM", - - "hardware_backlight_settings_error": "Failed to set backlight settings: {error}", - "hardware_backlight_settings_get_error": "Failed to get backlight settings: {error}", - "hardware_backlight_settings_success": "Backlight settings updated successfully", - "hardware_dim_display_after_description": "Set how long to wait before dimming the display", - "hardware_dim_display_after_title": "Dim Display After", - "hardware_display_brightness_description": "Set the brightness of the display", - "hardware_display_brightness_high": "High", - "hardware_display_brightness_low": "Low", - "hardware_display_brightness_medium": "Medium", - "hardware_display_brightness_off": "Off", - "hardware_display_brightness_title": "Display Brightness", - "hardware_display_orientation_description": "Set the orientation of the display", - "hardware_display_orientation_error": "Failed to set display orientation: {error}", - "hardware_display_orientation_inverted": "Inverted", - "hardware_display_orientation_normal": "Normal", - "hardware_display_orientation_success": "Display orientation updated successfully", - "hardware_display_orientation_title": "Display Orientation", - "hardware_display_wake_up_note": "The display will wake up when the connection state changes, or when touched.", - "hardware_page_description": "Configure display settings and hardware options for your JetKVM device", - "hardware_time_10_minutes": "10 Minutes", - "hardware_time_1_hour": "1 Hour", - "hardware_time_1_minute": "1 Minute", - "hardware_time_30_minutes": "30 Minutes", - "hardware_time_5_minutes": "5 Minutes", - "hardware_time_never": "Never", - "hardware_title": "Hardware", - "hardware_turn_off_display_after_description": "Period of inactivity before display automatically turns off", - "hardware_turn_off_display_after_title": "Turn off Display After" + "welcome_to_jetkvm": "Welcome to JetKVM" } \ No newline at end of file diff --git a/ui/src/routes/devices.$id.settings.keyboard.tsx b/ui/src/routes/devices.$id.settings.keyboard.tsx index 5bb66d4c..d5d6a4e2 100644 --- a/ui/src/routes/devices.$id.settings.keyboard.tsx +++ b/ui/src/routes/devices.$id.settings.keyboard.tsx @@ -1,13 +1,14 @@ import { useCallback, useEffect } from "react"; -import { useSettingsStore } from "@/hooks/stores"; -import { JsonRpcResponse, useJsonRpc } from "@/hooks/useJsonRpc"; -import useKeyboardLayout from "@/hooks/useKeyboardLayout"; +import { useSettingsStore } from "@hooks/stores"; +import { JsonRpcResponse, useJsonRpc } from "@hooks/useJsonRpc"; +import useKeyboardLayout from "@hooks/useKeyboardLayout"; +import { Checkbox } from "@components/Checkbox"; +import { SelectMenuBasic } from "@components/SelectMenuBasic"; import { SettingsItem } from "@components/SettingsItem"; import { SettingsPageHeader } from "@components/SettingsPageheader"; -import { Checkbox } from "@/components/Checkbox"; -import { SelectMenuBasic } from "@/components/SelectMenuBasic"; import notifications from "@/notifications"; +import { m } from "@localizations/messages.js"; export default function SettingsKeyboardRoute() { const { setKeyboardLayout } = useSettingsStore(); @@ -33,10 +34,10 @@ export default function SettingsKeyboardRoute() { send("setKeyboardLayout", { layout: isoCode }, resp => { if ("error" in resp) { notifications.error( - `Failed to set keyboard layout: ${resp.error.data || "Unknown error"}`, + m.keyboard_layout_error({ error: resp.error.data || m.unknown_error() }), ); } - notifications.success("Keyboard layout set successfully to " + isoCode); + notifications.success(m.keyboard_layout_success({ layout: isoCode })); setKeyboardLayout(isoCode); }); }, @@ -46,14 +47,14 @@ export default function SettingsKeyboardRoute() { return (

- The virtual keyboard, paste text, and keyboard macros send individual key strokes to the target device. The keyboard layout determines which key codes are being sent. Ensure that the keyboard layout in JetKVM matches the settings in the operating system. + {m.keyboard_layout_long_description()}