mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
Keep guests running during the PVE 8 to 9 upgrade and complete the help menu
- The upgrade no longer restarts pve-manager while preparing the host, so running guests are not stopped - The upgrade stops before touching any repository when the Proxmox VE 8 update fails or is cancelled - The unattended mode continues into the upgrade instead of exiting after the mode question - Without a subscription, the enterprise repository added by pve-manager 9 is left disabled after the upgrade - grub-efi-amd64 is installed with its output visible in interactive mode - Help menu: qm unlock and pct unlock entries in the VM/CT section, renumbered items and aligned labels - Help menu: pvesm scan nfs takes the server address, and pveupgrade is described as the interactive upgrade - Help menu: an empty choice no longer runs the previous command - translate() finds catalog entries for texts with leading or trailing spaces and keeps the padding - Spanish help menu texts use the tú form and the Intro key - New help and upgrade messages translated into all languages
This commit is contained in:
@@ -271,6 +271,18 @@ translate() {
|
||||
echo "$cached"
|
||||
return
|
||||
fi
|
||||
# The catalog stores texts trimmed; keep the caller's surrounding spaces.
|
||||
local lead="${text%%[![:space:]]*}"
|
||||
local core="${text#"$lead"}"
|
||||
local trail="${core##*[![:space:]]}"
|
||||
core="${core%"$trail"}"
|
||||
if [ -n "$core" ] && [ "$core" != "$text" ]; then
|
||||
cached=$(jq -r --arg text "$core" '.[$text] // .[($text | gsub("\\\\n"; "\n"))] // empty' "$lang_file" 2>/dev/null)
|
||||
if [ -n "$cached" ]; then
|
||||
echo "${lead}${cached}${trail}"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$text"
|
||||
|
||||
Reference in New Issue
Block a user