diff --git a/ui/localization/messages/en.json b/ui/localization/messages/en.json index dad90921..7ac90c6c 100644 --- a/ui/localization/messages/en.json +++ b/ui/localization/messages/en.json @@ -6,6 +6,10 @@ "jetkvm_logo": "JetKVM Logo", "load": "Load", "unknown_error": "Unknown error", + + "close": "Close", + "cancel": "Cancel", + "action_bar_virtual_media": "Virtual Media", "action_bar_paste_text": "Paste text", "action_bar_web_terminal": "Web Terminal", @@ -16,6 +20,7 @@ "action_bar_settings": "Settings", "action_bar_fullscreen": "Fullscreen", "action_bar_exit_fullscreen": "Exit Fullscreen", + "extensions_popover_extensions": "Extensions", "extension_popover_set_error_notification": "Failed to set active extension: {error}", "extension_popover_unload_extension": "Unload Extension", @@ -26,6 +31,7 @@ "extensions_dc_power_control_description": "Control your DC Power extension", "extension_serial_console": "Serial Console", "extension_serial_console_description": "Access your serial console extension", + "atx_power_control_get_state_error": "Failed to get ATX power state: {error}", "atx_power_control_send_action_error": "Failed to send ATX power action {action}: {error}", "atx_power_control_power_button": "Power", @@ -34,6 +40,7 @@ "atx_power_control_reset_button": "Reset", "atx_power_control_power_led": "Power LED", "atx_power_control_hdd_led": "HDD LED", + "dc_power_control_get_state_error": "Failed to get DC power state: {error}", "dc_power_control_set_power_state_error": "Failed to send DC power state to {enabled}: {error}", "dc_power_control_set_restore_state_error": "Failed to send DC power restore state to {state}: {error}", @@ -49,6 +56,7 @@ "dc_power_control_current_unit": "A", "dc_power_control_power": "Power", "dc_power_control_power_unit": "W", + "serial_console_get_settings_error": "Failed to get serial console settings: {error}", "serial_console_set_settings_error": "Failed to set serial console settings to {settings}: {error}", "serial_console_configure_description": "Configure your serial console settings", @@ -61,5 +69,76 @@ "serial_console_parity_odd": "Odd Parity", "serial_console_parity_none": "No Parity", "serial_console_parity_mark": "Mark Parity", - "serial_console_parity_space": "Space Parity" + "serial_console_parity_space": "Space Parity", + + "wake_on_lan_add_device_device_name": "Device Name", + "wake_on_lan_add_device_example_device_name": "Plex Media Server", + "wake_on_lan_add_device_mac_address": "MAC Address", + "wake_on_lan_add_device_back": "Back", + "wake_on_lan_add_device_save_device": "Save Device", + + "paste_modal_paste_text": "Paste text", + "paste_modal_paste_text_description": "Paste text from your client to the remote host", + "paste_modal_paste_from_host": "Paste from host", + "paste_modal_invalid_chars_intro": "The following characters won't be pasted:", + "paste_modal_delay_between_keys": "Delay between keys", + "paste_modal_delay_out_of_range": "Delay must be between {min} and {max}", + "paste_modal_sending_using_layout": "Sending text using keyboard layout: {iso}-{name}", + "paste_modal_confirm_paste": "Confirm Paste", + + "mount_virtual_media": "Virtual Media", + "mount_virtual_media_description": "Mount an image to boot from or install an operating system.", + "mount_no_mounted_media": "No mounted media", + "mount_add_file_to_get_started": "Add a file to get started", + "mount_streaming_from_url": "Streaming from URL", + "mount_mounted_from_storage": "Mounted from JetKVM Storage", + "mount_unmount": "Unmount", + "mount_add_new_media": "Add New Media", + + "mount_get_state_error": "Failed to get virtual media state: {error}", + "mount_unmount_error": "Failed to unmount image: {error}", + "mount_mounted_as": "Mounted as", + "mount_mode_disk": "Disk", + "mount_mode_cdrom": "CD-ROM", + + "wake_on_lan": "Wake On LAN", + "wake_on_lan_description": "Send a Magic Packet to wake up a remote device.", + + "wake_on_lan_invalid_mac": "Invalid MAC address", + "wake_on_lan_failed_send_magic": "Failed to send Magic Packet", + "wake_on_lan_magic_sent_success": "Magic Packet sent successfully", + + "wake_on_lan_failed_add_device": "Failed to add device", + + "wake_on_lan_empty_no_devices_added": "No devices added", + "wake_on_lan_empty_add_device_to_start": "Add a device to start using Wake-on-LAN", + "wake_on_lan_empty_add_new_device": "Add New Device", + + "wake_on_lan_device_list_wake": "Wake", + "wake_on_lan_device_list_delete_device": "Delete device", + "wake_on_lan_device_list_add_new_device": "Add New Device", + + "connection_stats_sidebar": "Connection Stats", + + "connection_stats_connection": "Connection", + "connection_stats_connection_description": "The connection between the client and the JetKVM.", + "connection_stats_round_trip_time": "Round-Trip Time", + "connection_stats_round_trip_time_description": "Round-trip time for the active ICE candidate pair between peers.", + + "connection_stats_video": "Video", + "connection_stats_video_description": "The video stream from the JetKVM to the client.", + + "connection_stats_network_stability": "Network Stability", + "connection_stats_network_stability_description": "How steady the flow of inbound video packets is across the network.", + "connection_stats_badge_jitter": "Jitter", + + "connection_stats_playback_delay": "Playback Delay", + "connection_stats_playback_delay_description": "Delay added by the jitter buffer to smooth playback when frames arrive unevenly.", + "connection_stats_badge_jitter_buffer_avg_delay": "Jitter Buffer Avg. Delay", + + "connection_stats_packets_lost": "Packets Lost", + "connection_stats_packets_lost_description": "Count of lost inbound video RTP packets.", + + "connection_stats_frames_per_second": "Frames per second", + "connection_stats_frames_per_second_description": "Number of inbound video frames displayed per second." } \ No newline at end of file diff --git a/ui/src/components/popovers/MountPopover.tsx b/ui/src/components/popovers/MountPopover.tsx index 8b6a8a55..dfa88665 100644 --- a/ui/src/components/popovers/MountPopover.tsx +++ b/ui/src/components/popovers/MountPopover.tsx @@ -1,20 +1,17 @@ import { PlusCircleIcon } from "@heroicons/react/20/solid"; import { forwardRef, useEffect, useCallback } from "react"; -import { - LuLink, - LuPlus, - LuRadioReceiver, -} from "react-icons/lu"; +import { LuLink, LuPlus, LuRadioReceiver } from "react-icons/lu"; import { useClose } from "@headlessui/react"; import { useLocation } from "react-router"; +import { m } from "@localizations/messages.js"; import { Button } from "@components/Button"; import Card, { GridCard } from "@components/Card"; import { formatters } from "@/utils"; -import { RemoteVirtualMediaState, useMountMediaStore } from "@/hooks/stores"; +import { RemoteVirtualMediaState, useMountMediaStore } from "@hooks/stores"; import { SettingsPageHeader } from "@components/SettingsPageheader"; -import { JsonRpcResponse, useJsonRpc } from "@/hooks/useJsonRpc"; -import { useDeviceUiNavigation } from "@/hooks/useAppNavigation"; +import { JsonRpcResponse, useJsonRpc } from "@hooks/useJsonRpc"; +import { useDeviceUiNavigation } from "@hooks/useAppNavigation"; import notifications from "@/notifications"; const MountPopopover = forwardRef((_props, ref) => { @@ -25,9 +22,7 @@ const MountPopopover = forwardRef((_props, ref) => { const syncRemoteVirtualMediaState = useCallback(() => { send("getVirtualMediaState", {}, (response: JsonRpcResponse) => { if ("error" in response) { - notifications.error( - `Failed to get virtual media state: ${response.error.message}`, - ); + notifications.error(m.mount_get_state_error({ error: response.error.message })); } else { setRemoteVirtualMediaState(response.result as unknown as RemoteVirtualMediaState); } @@ -37,7 +32,7 @@ const MountPopopover = forwardRef((_props, ref) => { const handleUnmount = () => { send("unmountImage", {}, (response: JsonRpcResponse) => { if ("error" in response) { - notifications.error(`Failed to unmount image: ${response.error.message}`); + notifications.error(m.mount_unmount_error({ error: response.error.message })); } else { syncRemoteVirtualMediaState(); } @@ -57,10 +52,10 @@ const MountPopopover = forwardRef((_props, ref) => {

- No mounted media + {m.mount_no_mounted_media()}

- Add a file to get started + {m.mount_add_file_to_get_started()}

@@ -81,7 +76,7 @@ const MountPopopover = forwardRef((_props, ref) => {

- Streaming from URL + {m.mount_streaming_from_url()}

{formatters.truncateMiddle(url, 55)} @@ -105,7 +100,7 @@ const MountPopopover = forwardRef((_props, ref) => {

- Mounted from JetKVM Storage + {m.mount_mounted_from_storage()}

{formatters.truncateMiddle(path, 50)} @@ -138,8 +133,8 @@ const MountPopopover = forwardRef((_props, ref) => {

((_props, ref) => {
{remoteVirtualMediaState ? (
-
- Mounted as{" "} +
+ {m.mount_mounted_as()}{" "} - {remoteVirtualMediaState.mode === "Disk" ? "Disk" : "CD-ROM"} + {remoteVirtualMediaState.mode === "Disk" ? m.mount_mode_disk() : m.mount_mode_cdrom()}
@@ -173,7 +168,7 @@ const MountPopopover = forwardRef((_props, ref) => {
@@ -69,11 +70,11 @@ export default function DeviceList({ animationDelay: "0.2s", }} > -

- No devices added + {m.wake_on_lan_empty_no_devices_added()}

- Add a device to start using Wake-on-LAN + {m.wake_on_lan_empty_add_device_to_start()}

@@ -41,11 +42,11 @@ export default function EmptyStateCard({ animationDelay: "0.2s", }} > -