From eb13ca620e9ff40fca5062ea044d7cc4e6cd8ce4 Mon Sep 17 00:00:00 2001 From: martino <32328813+f3rs3n@users.noreply.github.com> Date: Tue, 22 Sep 2026 19:00:03 +0200 Subject: [PATCH] fix(i18n): clarify VM storage selection messages --- scripts/help_info_menu.sh | 2 +- scripts/vm/disk_selector.sh | 6 +++--- scripts/vm/synology.sh | 12 ++++++------ scripts/vm/vm_creator.sh | 8 +++++++- scripts/vm/zimaos.sh | 12 ++++++------ 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/scripts/help_info_menu.sh b/scripts/help_info_menu.sh index f960e262..873ac07a 100644 --- a/scripts/help_info_menu.sh +++ b/scripts/help_info_menu.sh @@ -382,7 +382,7 @@ show_storage_commands() { echo -en "\n${TAB}${BOLD}${YW}${HOLD}$(translate 'Enter full path to the disk image (e.g., /var/lib/vz/images/xyz.img): ')${CL}" read -r image_path - echo -e "\n${YELLOW}$(translate 'Available storage volumes:')${NC}" + echo -e "\n${YELLOW}$(translate 'Storage IDs:')${NC}" pvesm status | awk 'NR>1 {print " - "$1}' echo -en "\n${TAB}${BOLD}${YW}${HOLD}$(translate 'Enter target storage name (e.g., local-lvm): ')${CL}" diff --git a/scripts/vm/disk_selector.sh b/scripts/vm/disk_selector.sh index 6816ea2f..67589bc8 100644 --- a/scripts/vm/disk_selector.sh +++ b/scripts/vm/disk_selector.sh @@ -141,7 +141,7 @@ function select_disk_type() { # Select Virtual Disks # ========================================================== function select_virtual_disk() { - msg_info "Detecting available storage volumes..." + msg_info "$(translate "Detecting storage for disk images...")" local STORAGE_MENU=() local TAG TYPE FREE ITEM @@ -165,8 +165,8 @@ function select_virtual_disk() { STORAGE=${STORAGE_MENU[0]} else [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" >/dev/null 2>&1 - STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage Volume")" --radiolist \ - "$(translate "Choose the storage volume for the virtual disk:\n")" 20 78 10 \ + STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage")" --radiolist \ + "$(translate "Choose the storage for the virtual disk:")"$'\n' 20 78 10 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) if [ $? -ne 0 ] || [ -z "$STORAGE" ]; then diff --git a/scripts/vm/synology.sh b/scripts/vm/synology.sh index 5954de9c..34a526d6 100644 --- a/scripts/vm/synology.sh +++ b/scripts/vm/synology.sh @@ -540,7 +540,7 @@ function select_disk_type() { } function select_virtual_disk() { - msg_info "Detecting available storage volumes..." + msg_info "$(translate "Detecting storage for disk images...")" local STORAGE_MENU=() local TAG TYPE FREE ITEM @@ -564,8 +564,8 @@ function select_virtual_disk() { STORAGE=${STORAGE_MENU[0]} else [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" >/dev/null 2>&1 - STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage Volume")" --radiolist \ - "$(translate "Choose the storage volume for the virtual disk:\n")" 20 78 10 \ + STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage")" --radiolist \ + "$(translate "Choose the storage for the virtual disk:")"$'\n' 20 78 10 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || return 0 [[ -z "$STORAGE" ]] && return 0 fi @@ -953,7 +953,7 @@ function select_efi_storage() { [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" > /dev/null 2>&1 while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --backtitle "ProxMenuX" --title "EFI Disk Storage" --radiolist \ - "$(translate "Choose the storage volume for the EFI disk (4MB):\n\nUse Spacebar to select.")" \ + "$(translate "Choose the storage for the EFI disk (4MB):")"$'\n\n'"$(translate "Use Spacebar to select.")" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || { msg_warn "$(translate "EFI storage selection cancelled.")" >&2 @@ -1004,8 +1004,8 @@ function select_storage_volume() { STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "ProxMenuX" --title "Storage Pools" --radiolist \ - "$(translate "Choose the storage volume for $purpose:\n\nUse Spacebar to select.")" \ + STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage")" --radiolist \ + "$(translate "Choose the storage for the loader disk:")"$'\n\n'"$(translate "Use Spacebar to select.")" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || { msg_warn "$(translate "Storage selection cancelled for $purpose.")" >&2 diff --git a/scripts/vm/vm_creator.sh b/scripts/vm/vm_creator.sh index 0c9d8d49..7d9bfb02 100644 --- a/scripts/vm/vm_creator.sh +++ b/scripts/vm/vm_creator.sh @@ -179,8 +179,14 @@ function select_storage_target() { STORAGE="${STORAGE_MENU[0]}" else [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" >/dev/null 2>&1 + local storage_prompt + case "$PURPOSE" in + EFI) storage_prompt=$(translate "Choose the storage for the EFI disk (4MB):") ;; + TPM) storage_prompt=$(translate "Choose the storage for the TPM disk (4MB):") ;; + *) storage_prompt=$(translate "Choose the storage volume for the $PURPOSE disk (4MB):") ;; + esac STORAGE=$(whiptail --backtitle "ProxMenux" --title "$(translate "$PURPOSE Disk Storage")" --radiolist \ - "$(translate "Choose the storage volume for the $PURPOSE disk (4MB):\n\nUse Spacebar to select.")" 16 70 6 \ + "$storage_prompt"$'\n\n'"$(translate "Use Spacebar to select.")" 16 70 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || { msg_warn "$(translate "$PURPOSE disk storage selection cancelled.")" >&2 return 1 diff --git a/scripts/vm/zimaos.sh b/scripts/vm/zimaos.sh index 17ff2770..7374bd03 100644 --- a/scripts/vm/zimaos.sh +++ b/scripts/vm/zimaos.sh @@ -555,7 +555,7 @@ function select_disk_type() { } function select_virtual_disk() { - msg_info "Detecting available storage volumes..." + msg_info "$(translate "Detecting storage for disk images...")" local STORAGE_MENU=() local TAG TYPE FREE ITEM @@ -579,8 +579,8 @@ function select_virtual_disk() { STORAGE=${STORAGE_MENU[0]} else [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" >/dev/null 2>&1 - STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage Volume")" --radiolist \ - "$(translate "Choose the storage volume for the virtual disk:\n")" 20 78 10 \ + STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage")" --radiolist \ + "$(translate "Choose the storage for the virtual disk:")"$'\n' 20 78 10 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || return 0 [[ -z "$STORAGE" ]] && return 0 fi @@ -990,7 +990,7 @@ function select_efi_storage() { [[ -n "${SPINNER_PID:-}" ]] && kill "$SPINNER_PID" > /dev/null 2>&1 while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --backtitle "ProxMenuX" --title "EFI Disk Storage" --radiolist \ - "$(translate "Choose the storage volume for the EFI disk (4MB):\n\nUse Spacebar to select.")" \ + "$(translate "Choose the storage for the EFI disk (4MB):")"$'\n\n'"$(translate "Use Spacebar to select.")" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || { msg_warn "$(translate "EFI storage selection cancelled.")" >&2 @@ -1041,8 +1041,8 @@ function select_storage_volume() { STORAGE=${STORAGE_MENU[0]} else while [ -z "${STORAGE:+x}" ]; do - STORAGE=$(whiptail --backtitle "ProxMenuX" --title "Storage Pools" --radiolist \ - "$(translate "Choose the storage volume for $purpose:")" \ + STORAGE=$(whiptail --backtitle "ProxMenuX" --title "$(translate "Select Storage")" --radiolist \ + "$(translate "Choose the storage for the loader disk:")" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || { msg_warn "$(translate "Storage selection cancelled for $purpose.")" >&2