mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-29 18:16:43 +00:00
fix(tui): preserve literal translated placeholder replacements
This commit is contained in:
@@ -190,7 +190,7 @@ run_pve8to9_check2() {
|
||||
local check_help
|
||||
check_help="$(translate "Once finished, repeat the check ({check}) to review any remaining issues.")"
|
||||
[[ "$check_help" == *'{check}'* ]] || check_help="Once finished, repeat the check ({check}) to review any remaining issues."
|
||||
check_help="${check_help//\{check\}/$(translate "Run PVE 8 to 9 check")}"
|
||||
check_help="${check_help//\{check\}/"$(translate "Run PVE 8 to 9 check")"}"
|
||||
msg_info2 "$check_help"
|
||||
echo -e
|
||||
msg_success "$(translate "Press Enter to exit the script after reading instructions...")"
|
||||
|
||||
@@ -780,7 +780,7 @@ run_pve8to9_check() {
|
||||
local check_help
|
||||
check_help="$(translate "Once finished, repeat the check ({check}) to review any remaining issues before starting the PVE 8 → PVE 9 upgrade.")"
|
||||
[[ "$check_help" == *'{check}'* ]] || check_help="Once finished, repeat the check ({check}) to review any remaining issues before starting the PVE 8 → PVE 9 upgrade."
|
||||
check_help="${check_help//\{check\}/$(translate "Run PVE 8 to 9 check")}"
|
||||
check_help="${check_help//\{check\}/"$(translate "Run PVE 8 to 9 check")"}"
|
||||
msg_info2 "$check_help"
|
||||
echo -e
|
||||
msg_success "$(translate "Press Enter to exit the script after reading instructions...")"
|
||||
@@ -1150,7 +1150,7 @@ run_pve8to9_check2() {
|
||||
local check_help
|
||||
check_help="$(translate "Once finished, repeat the check ({check}) to review any remaining issues before rebooting.")"
|
||||
[[ "$check_help" == *'{check}'* ]] || check_help="Once finished, repeat the check ({check}) to review any remaining issues before rebooting."
|
||||
check_help="${check_help//\{check\}/$(translate "Run PVE 8 to 9 check")}"
|
||||
check_help="${check_help//\{check\}/"$(translate "Run PVE 8 to 9 check")"}"
|
||||
msg_info2 "$check_help"
|
||||
echo -e
|
||||
msg_success "$(translate "Press Enter to exit the script after reading instructions...")"
|
||||
|
||||
@@ -182,8 +182,8 @@ function run_gpu_passthrough_wizard() {
|
||||
local gpu_notice
|
||||
gpu_notice="$(translate "GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again.")"
|
||||
[[ "$gpu_notice" == *'{menu}'* && "$gpu_notice" == *'{action}'* ]] || gpu_notice="GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again."
|
||||
gpu_notice="${gpu_notice//\{menu\}/$(translate "Hardware: GPUs and Coral-TPU")}"
|
||||
gpu_notice="${gpu_notice//\{action\}/$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")}"
|
||||
gpu_notice="${gpu_notice//\{menu\}/"$(translate "Hardware: GPUs and Coral-TPU")"}"
|
||||
gpu_notice="${gpu_notice//\{action\}/"$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")"}"
|
||||
msg_warn "$gpu_notice"
|
||||
WIZARD_GPU_RESULT="cancelled"
|
||||
return 0
|
||||
|
||||
@@ -237,8 +237,8 @@ function run_gpu_passthrough_wizard() {
|
||||
local gpu_notice
|
||||
gpu_notice="$(translate "GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again.")"
|
||||
[[ "$gpu_notice" == *'{menu}'* && "$gpu_notice" == *'{action}'* ]] || gpu_notice="GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again."
|
||||
gpu_notice="${gpu_notice//\{menu\}/$(translate "Hardware: GPUs and Coral-TPU")}"
|
||||
gpu_notice="${gpu_notice//\{action\}/$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")}"
|
||||
gpu_notice="${gpu_notice//\{menu\}/"$(translate "Hardware: GPUs and Coral-TPU")"}"
|
||||
gpu_notice="${gpu_notice//\{action\}/"$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")"}"
|
||||
msg_warn "$gpu_notice"
|
||||
return 0
|
||||
fi
|
||||
|
||||
@@ -174,8 +174,8 @@ function run_gpu_passthrough_wizard() {
|
||||
local gpu_notice
|
||||
gpu_notice="$(translate "GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again.")"
|
||||
[[ "$gpu_notice" == *'{menu}'* && "$gpu_notice" == *'{action}'* ]] || gpu_notice="GPU passthrough assistant not found. Later, open {menu} → {action} from the main menu to try again."
|
||||
gpu_notice="${gpu_notice//\{menu\}/$(translate "Hardware: GPUs and Coral-TPU")}"
|
||||
gpu_notice="${gpu_notice//\{action\}/$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")}"
|
||||
gpu_notice="${gpu_notice//\{menu\}/"$(translate "Hardware: GPUs and Coral-TPU")"}"
|
||||
gpu_notice="${gpu_notice//\{action\}/"$(translate "Add GPU to VM (Intel | AMD | NVIDIA)")"}"
|
||||
msg_warn "$gpu_notice"
|
||||
WIZARD_GPU_RESULT="cancelled"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user