Commit 37d90fc9 authored by Mikhail Tergoev's avatar Mikhail Tergoev

used EN only for gamescope session

parent ec42b5fa
...@@ -71,39 +71,44 @@ change_locale () { ...@@ -71,39 +71,44 @@ change_locale () {
fi fi
fi fi
[[ ! -f "${pw_yad}" ]] && pw_yad="yad" local GAME_LANGUAGE="$LANGUAGE"
if [[ -z "$LANGUAGE" ]] \ if check_gamescope_session ; then
|| [[ "${PW_FORCE_CHANGE_LOC}" == "1" ]] ; then LANGUAGE="en"
SET_LANG=( else
"${pw_yad}" --list [[ ! -f "${pw_yad}" ]] && pw_yad="yad"
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" if [[ -z "$LANGUAGE" ]] \
--title="Select language for PortProton" || [[ "${PW_FORCE_CHANGE_LOC}" == "1" ]] ; then
--column="Language" --column="" SET_LANG=(
--width=400 --height=200 "${pw_yad}" --list
--window-icon="$PW_GUI_ICON_PATH/portproton.svg"
"Russian (Русский)" ru --title="Select language for PortProton"
"English" en --column="Language" --column=""
"Spanish (Español・Española)" es --width=400 --height=200
)
"Russian (Русский)" ru
out=$("${SET_LANG[@]}") "English" en
if [[ -z $out ]] \ "Spanish (Español・Española)" es
&& [[ -n "$LANGUAGE" ]] ; then )
echo "${LANGUAGE}" > "${PORT_WINE_TMP_PATH}/PortProton_loc"
elif [[ -z $out ]] ; then out=$("${SET_LANG[@]}")
echo "en" > "${PORT_WINE_TMP_PATH}/PortProton_loc" if [[ -z $out ]] \
else && [[ -n "$LANGUAGE" ]] ; then
LANGUAGE=$(echo "$out" | cut -d '|' -f2) echo "${LANGUAGE}" > "${PORT_WINE_TMP_PATH}/PortProton_loc"
echo "${LANGUAGE}" > "${PORT_WINE_TMP_PATH}/PortProton_loc" elif [[ -z $out ]] ; then
create_translations echo "en" > "${PORT_WINE_TMP_PATH}/PortProton_loc"
else
LANGUAGE=$(echo "$out" | cut -d '|' -f2)
echo "${LANGUAGE}" > "${PORT_WINE_TMP_PATH}/PortProton_loc"
create_translations
fi
unset PW_FORCE_CHANGE_LOC
restart_pp
fi fi
unset PW_FORCE_CHANGE_LOC
restart_pp
fi fi
export LANGUAGE export LANGUAGE
case "$LANGUAGE" in case "$GAME_LANGUAGE" in
ru) ru)
check_start_from_steam && export LC_ALL=ru_RU.UTF-8 check_start_from_steam && export LC_ALL=ru_RU.UTF-8
export FULL_LN="russian" export FULL_LN="russian"
...@@ -721,7 +726,6 @@ unpack () { ...@@ -721,7 +726,6 @@ unpack () {
# If gamescope session is active, use PW_TERM for unpack # If gamescope session is active, use PW_TERM for unpack
if check_gamescope_session ; then if check_gamescope_session ; then
yad_info "We wont unpack $1"
$PW_TERM "echo ; echo ; echo \"Unpacking file: $1. Please wait...\" ; $command \"$1\" -C \"$2\"" $PW_TERM "echo ; echo ; echo \"Unpacking file: $1. Please wait...\" ; $command \"$1\" -C \"$2\""
[[ "$?" != 0 ]] && return 1 || return 0 [[ "$?" != 0 ]] && return 1 || return 0
elif [[ "$silent" != "true" ]] ; then elif [[ "$silent" != "true" ]] ; then
......
...@@ -252,9 +252,7 @@ esac ...@@ -252,9 +252,7 @@ esac
pw_check_and_download_plugins pw_check_and_download_plugins
# check skip update # check skip update
if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] \ if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then
|| check_gamescope_session
then
pw_port_update pw_port_update
PW_FILESYSTEM=$(stat -f -c %T "${PORT_WINE_PATH}") PW_FILESYSTEM=$(stat -f -c %T "${PORT_WINE_PATH}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment