From 8020bf575c3cb1fcec1229189a8a7dfc48e00db0 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sun, 9 Jun 2024 00:17:41 +0500 Subject: [PATCH] update change locale window --- data_from_portwine/scripts/functions_helper | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index adbb726c..c58e4ce7 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -54,10 +54,20 @@ change_locale () { echo "" else [[ ! -f "${pw_yad_v13_0}" ]] && pw_yad_v13_0="yad" - SET_LANG=$("${pw_yad_v13_0}" --title "LANGUAGE" --text "Select the language:" --list --radiolist \ - --column="Set:" --column "Choose language:" TRUE "ru" FALSE "en" FALSE "es" \ - --window-icon "$PW_GUI_ICON_PATH/portproton.svg" --width=300 --height=195) - SET_LANG="$(echo "${SET_LANG}" | awk -F'|' '{print $2}')" + SET_LANG=( + "${pw_yad_v13_0}" --list + --title="Select language for PortProton" + --column="Language" --column="" + --width=400 --height=200 + + "Russian (Русский)" ru + "English" en + "Spanish (Español・Española)" es + ) + + out=$("${SET_LANG[@]}") + [ -n "$out" ] || return + SET_LANG=$(echo "$out" | cut -d'|' -f2) echo "${SET_LANG}" > "${PORT_WINE_TMP_PATH}/PortProton_loc" if [[ ! -z "${SET_LANG}" ]] then LANGUAGE=${SET_LANG}