fix(tui): preserve literal translated placeholder replacements

This commit is contained in:
martino
2026-09-26 18:23:07 +02:00
parent 9998a937d5
commit 3fa5a379f3
6 changed files with 63 additions and 12 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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