Fix locales in install script

This commit is contained in:
castro-fidel 2020-10-04 22:19:00 +03:00
parent 19f6e2aae8
commit 1642ff56d2
2 changed files with 6 additions and 6 deletions

@ -24,7 +24,7 @@ if [ ! -d "${config_path}" ]; then
fi fi
if [ ! -e "${config_path}/${portname}_loc" ]; then if [ ! -e "${config_path}/${portname}_loc" ]; then
SET_LANG=`zenity --title "Install $portname" --text "Select the language" --list --radiolist \ SET_LANG=`zenity --title "Install $portname" --text "Select the language" --list --radiolist \
--column="Set" --column "Language:" \ --column="Set:" --column "Language:" \
TRUE "RUS" \ TRUE "RUS" \
FALSE "ENG" ` FALSE "ENG" `
echo "${SET_LANG}" > "${config_path}/${portname}_loc" echo "${SET_LANG}" > "${config_path}/${portname}_loc"
@ -181,7 +181,6 @@ else
fi fi
fi fi
export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf" export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/dxvk.conf"
echo "########################"
######################################################################## ########################################################################
export def_pfx="${PORT_WINE_PATH}/data/dist/share/default_pfx/" export def_pfx="${PORT_WINE_PATH}/data/dist/share/default_pfx/"
if [ ! -d "${def_pfx}" ]; then if [ ! -d "${def_pfx}" ]; then
@ -203,6 +202,7 @@ else
export PW_GAMEMODERUN=0 export PW_GAMEMODERUN=0
echo "Gamemod not installed!" echo "Gamemod not installed!"
fi fi
echo "########################"
ADD_IN_START_PORTWINE ADD_IN_START_PORTWINE
} }
######################################################################## ########################################################################

@ -17,7 +17,7 @@ export port_ver=XX
######################################################################## ########################################################################
export PROGS_INST="" export PROGS_INST=""
export vexit=0 export vexit=0
for PROGS in "wget" "curl" "zenity" "tar" "xterm" for PROGS in "wget" "curl" "zenity" "tar"
do do
if [ ! -x "`which "${PROGS}" 2>/dev/null`" ];then if [ ! -x "`which "${PROGS}" 2>/dev/null`" ];then
PROGS_INST="${PROGS_INST} ${PROGS}" PROGS_INST="${PROGS_INST} ${PROGS}"
@ -37,7 +37,7 @@ deflink="/home/${USER}/PortWINE/${portname}"
[ $(id -u) -eq 0 ] && echo "Do not run the script from the superuser!" && zenity --error --text "Do not run the script from the superuser!" 2> /dev/null && exit 1 [ $(id -u) -eq 0 ] && echo "Do not run the script from the superuser!" && zenity --error --text "Do not run the script from the superuser!" 2> /dev/null && exit 1
######################################################################## ########################################################################
SET_LANG=`zenity --title "Install $portname" --text "Select the installation language" --list --radiolist \ SET_LANG=`zenity --title "Install $portname" --text "Select the installation language" --list --radiolist \
--column="Set" --column "Language:" \ --column="Set:" --column "Language:" \
TRUE "Russian" \ TRUE "Russian" \
FALSE "English" ` 2> /dev/null FALSE "English" ` 2> /dev/null
if [ $? -eq 1 ];then exit 1; fi if [ $? -eq 1 ];then exit 1; fi
@ -81,7 +81,7 @@ esac
if [ $? -eq 1 ];then echo "error" && exit 1; fi if [ $? -eq 1 ];then echo "error" && exit 1; fi
######################################################################## ########################################################################
case $SET_LANG in case $SET_LANG in
"Русский") "Russian")
zen() { zen() {
zenity --progress --title="Установка..." --text="Настройка ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1 zenity --progress --title="Установка..." --text="Настройка ${portname}" --pulsate --auto-close --auto-kill --width=450 > /dev/null 2>&1
} ;; } ;;
@ -117,7 +117,7 @@ fi
mkdir -p "${PORT_WINE_PATH}/data/tmp" mkdir -p "${PORT_WINE_PATH}/data/tmp"
echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/${portname}_ver" echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/${portname}_ver"
case $SET_LANG in case $SET_LANG in
"Русский") "Russian")
echo "RUS" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;; echo "RUS" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;
"English") "English")
echo "ENG" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;; echo "ENG" > "${PORT_WINE_PATH}/data/tmp/${portname}_loc" ;;