forked from CastroFidel/PortWINE
Merge branch 'Htylol-added-trans-for-cli' into devel
This commit is contained in:
commit
ab28d846b7
@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr "Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-31 19:55+0500\n"
|
||||
"POT-Creation-Date: 2024-11-01 02:46+0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1682,3 +1682,38 @@ msgstr ""
|
||||
|
||||
msgid "Please wait. downloading covers for"
|
||||
msgstr ""
|
||||
|
||||
msgid "use"
|
||||
msgstr ""
|
||||
|
||||
msgid "Forces all scripts to be updated to a working state\n"
|
||||
" (helps if "
|
||||
"PortProton is not working)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reinstalls PortProton and resets all settings to default"
|
||||
msgstr ""
|
||||
|
||||
msgid "Creates a files with translations .pot and .po"
|
||||
msgstr ""
|
||||
|
||||
msgid "Debug scripts for PortProton\n"
|
||||
" (saved log in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check update scripts for PortProton"
|
||||
msgstr ""
|
||||
|
||||
msgid "Launches the application immediately, requires the path to the .exe "
|
||||
"file"
|
||||
msgstr ""
|
||||
|
||||
msgid "After the variable, the path to the .exe file is required and then "
|
||||
"the variables.\n"
|
||||
" (List their "
|
||||
"variables and values for example PW_MANGOHUD=1 PW_VKBASALT=0, etc.)"
|
||||
msgstr ""
|
||||
|
||||
msgid "--autoinstall and the name of what needs to be installed is given in "
|
||||
"the list below:"
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-31 19:54+0500\n"
|
||||
"POT-Creation-Date: 2024-11-01 02:43+0500\n"
|
||||
"PO-Revision-Date: 2024-10-26 13:58+0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -2181,6 +2181,47 @@ msgstr ""
|
||||
msgid "Please wait. downloading covers for"
|
||||
msgstr "Por favor, espera. Descargando portadas para"
|
||||
|
||||
msgid "use"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Forces all scripts to be updated to a working state\n"
|
||||
" (helps if PortProton is "
|
||||
"not working)"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Reinstalls PortProton and resets all settings to default"
|
||||
msgstr "Restaurar configuraciones predeterminadas"
|
||||
|
||||
msgid "Creates a files with translations .pot and .po"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Debug scripts for PortProton\n"
|
||||
" (saved log in"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Check update scripts for PortProton"
|
||||
msgstr "Espere la actualización PortProton"
|
||||
|
||||
msgid ""
|
||||
"Launches the application immediately, requires the path to the .exe file"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"After the variable, the path to the .exe file is required and then the "
|
||||
"variables.\n"
|
||||
" (List their variables "
|
||||
"and values for example PW_MANGOHUD=1 PW_VKBASALT=0, etc.)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"--autoinstall and the name of what needs to be installed is given in the "
|
||||
"list below:"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "A higher number of duplicate desktop files were found for this file."
|
||||
#~ "\\nShould I delete the extra ones or not?"
|
||||
|
@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-31 19:54+0500\n"
|
||||
"PO-Revision-Date: 2024-10-31 19:55+0500\n"
|
||||
"POT-Creation-Date: 2024-11-01 02:43+0500\n"
|
||||
"PO-Revision-Date: 2024-11-01 02:44+0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: ru_RU\n"
|
||||
@ -2168,6 +2168,55 @@ msgstr "SteamGridDB не отвечает, принудительно отклю
|
||||
msgid "Please wait. downloading covers for"
|
||||
msgstr "Пожалуйста, подождите. Загрузка обложек для"
|
||||
|
||||
msgid "use"
|
||||
msgstr "использовать"
|
||||
|
||||
msgid ""
|
||||
"Forces all scripts to be updated to a working state\n"
|
||||
" (helps if PortProton is "
|
||||
"not working)"
|
||||
msgstr ""
|
||||
"Принудительно обновляет все скрипты до рабочего состояния.\n"
|
||||
" (помогает, если "
|
||||
"PortProton не работает)"
|
||||
|
||||
msgid "Reinstalls PortProton and resets all settings to default"
|
||||
msgstr "Переустанавливает PortProton и сбрасывает все настройки по умолчанию"
|
||||
|
||||
msgid "Creates a files with translations .pot and .po"
|
||||
msgstr "Создает файлы с переводами .pot и .po"
|
||||
|
||||
msgid ""
|
||||
"Debug scripts for PortProton\n"
|
||||
" (saved log in"
|
||||
msgstr ""
|
||||
"Скрипты отладки для PortProton\n"
|
||||
" (сохраняет лог в"
|
||||
|
||||
msgid "Check update scripts for PortProton"
|
||||
msgstr "Проверьте скрипты обновления для PortProton"
|
||||
|
||||
msgid ""
|
||||
"Launches the application immediately, requires the path to the .exe file"
|
||||
msgstr "Запускает приложение сразу, требует путь к exe-файлу"
|
||||
|
||||
msgid ""
|
||||
"After the variable, the path to the .exe file is required and then the "
|
||||
"variables.\n"
|
||||
" (List their variables "
|
||||
"and values for example PW_MANGOHUD=1 PW_VKBASALT=0, etc.)"
|
||||
msgstr ""
|
||||
"После переменной необходимо указать путь к файлу .exe, а затем переменные.\n"
|
||||
" (Перечислите их "
|
||||
"переменные и значения, например PW_MANGOHUD=1 PW_VKBASALT=0 и т. д.)"
|
||||
|
||||
msgid ""
|
||||
"--autoinstall and the name of what needs to be installed is given in the "
|
||||
"list below:"
|
||||
msgstr ""
|
||||
"--autoinstall и название того, что необходимо установить, указано в списке "
|
||||
"ниже:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "A higher number of duplicate desktop files were found for this file."
|
||||
#~ "\\nShould I delete the extra ones or not?"
|
||||
|
@ -200,28 +200,17 @@ change_locale () {
|
||||
export -f change_locale
|
||||
|
||||
generate_pot () {
|
||||
sed 's/{translations\[/(gettext \"/g' functions_helper > functions_helper_tmp
|
||||
sed -i 's/]}/")/g' functions_helper_tmp
|
||||
sed -i 's/eval_translations/gettext/g' functions_helper_tmp
|
||||
|
||||
sed 's/{translations\[/(gettext \"/g' start.sh > start.sh_tmp
|
||||
sed -i 's/]}/")/g' start.sh_tmp
|
||||
sed -i 's/eval_translations/gettext/g' start.sh_tmp
|
||||
|
||||
sed 's/{translations\[/(gettext \"/g' setup.sh > setup.sh_tmp
|
||||
sed -i 's/]}/")/g' setup.sh_tmp
|
||||
sed -i 's/eval_translations/gettext/g' setup.sh_tmp
|
||||
|
||||
sed 's/{translations\[/(gettext \"/g' add_in_steam.sh > add_in_steam.sh_tmp
|
||||
sed -i 's/]}/")/g' add_in_steam.sh_tmp
|
||||
sed -i 's/eval_translations/gettext/g' add_in_steam.sh_tmp
|
||||
|
||||
local FILES_FOR_GETTEXT i
|
||||
FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh help_info)
|
||||
for i in ${FILES_FOR_GETTEXT[@]} ; do
|
||||
sed 's/{translations\[/(gettext \"/g' "${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
|
||||
sed -i 's/]}/")/g' "${PORT_SCRIPTS_PATH}/${i}_tmp"
|
||||
sed -i 's/eval_translations/gettext/g' "${PORT_SCRIPTS_PATH}/${i}_tmp"
|
||||
done
|
||||
#Когда присходит предупреждение: синтаксис $"..." запрещен по соображениям безопасности; используйте eval_gettext
|
||||
#и ругается на строку в которой нет перевода, можно использовать sed -i '//d' и убрать эту строку
|
||||
#либо отредактировать сам код, чтобы не было такой ошибки (к примеру вместо двойных ковычек использовать в таком месте одинарные)
|
||||
|
||||
for lang in $LANGUAGES_LIST
|
||||
do
|
||||
for lang in $LANGUAGES_LIST ; do
|
||||
echo "${lang}"
|
||||
create_new_dir "${PORT_WINE_PATH}/data/locales/${lang}/LC_MESSAGES/"
|
||||
LANG_PO="${PORT_WINE_PATH}/data/locales/${lang}/LC_MESSAGES/PortProton.po"
|
||||
@ -233,6 +222,7 @@ generate_pot () {
|
||||
"data/scripts/setup.sh_tmp" \
|
||||
"data/scripts/functions_helper_tmp" \
|
||||
"data/scripts/add_in_steam.sh_tmp" \
|
||||
"data/scripts/help_info_tmp" \
|
||||
-o "$TEMPLATE_POT"
|
||||
popd 1>/dev/null || fatal
|
||||
if [[ -f "$LANG_PO" ]] ; then
|
||||
@ -248,6 +238,7 @@ generate_pot () {
|
||||
try_remove_file "${PORT_SCRIPTS_PATH}/setup.sh_tmp"
|
||||
try_remove_file "${PORT_SCRIPTS_PATH}/functions_helper_tmp"
|
||||
try_remove_file "${PORT_SCRIPTS_PATH}/add_in_steam.sh_tmp"
|
||||
try_remove_file "${PORT_SCRIPTS_PATH}/help_info_tmp"
|
||||
try_remove_dir "${PW_CACHE_LANG_PATH}"
|
||||
}
|
||||
export -f generate_pot
|
||||
@ -2534,7 +2525,7 @@ pw_check_command () {
|
||||
unset TIMEOUT_CMD
|
||||
return 1
|
||||
else
|
||||
print_info "$S_CMD - found"
|
||||
# print_info "$S_CMD - found"
|
||||
unset TIMEOUT_CMD
|
||||
return 0
|
||||
fi
|
||||
|
18
data_from_portwine/scripts/help_info
Executable file
18
data_from_portwine/scripts/help_info
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
files_from_autoinstall=$(ls "${PORT_SCRIPTS_PATH}/pw_autoinstall")
|
||||
echo -e "${translations[use]}: [--repair] [--reinstall] [--autoinstall]
|
||||
|
||||
--repair ${translations[Forces all scripts to be updated to a working state
|
||||
(helps if PortProton is not working)]}
|
||||
--reinstall ${translations[Reinstalls PortProton and resets all settings to default]}
|
||||
--generate-pot ${translations[Creates a files with translations .pot and .po]}
|
||||
--debug ${translations[Debug scripts for PortProton
|
||||
(saved log in]} $PORT_WINE_PATH/scripts-debug.log)
|
||||
--update ${translations[Check update scripts for PortProton]}
|
||||
--launch ${translations[Launches the application immediately, requires the path to the .exe file]}
|
||||
--edit-db ${translations[After the variable, the path to the .exe file is required and then the variables.
|
||||
(List their variables and values for example PW_MANGOHUD=1 PW_VKBASALT=0, etc.)]}
|
||||
--autoinstall ${translations[--autoinstall and the name of what needs to be installed is given in the list below:]}
|
||||
|
||||
$(echo $files_from_autoinstall | awk '{for (i = 1; i <= NF; i++) {if (i % 10 == 0) {print ""} printf "%s ", $i}}')
|
||||
"
|
@ -18,7 +18,6 @@ echo '
|
||||
██║░░░░░╚█████╔╝██║░░██║░░░██║░░░██║░░░░░██║░░██║╚█████╔╝░░░██║░░░╚█████╔╝██║░╚███║
|
||||
╚═╝░░░░░░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░░░░╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░░╚════╝░╚═╝░░╚══╝
|
||||
'
|
||||
|
||||
$PW_DEBUG
|
||||
|
||||
if [[ $(id -u) = 0 ]] \
|
||||
@ -366,68 +365,50 @@ fi
|
||||
### CLI ###
|
||||
|
||||
case "$1" in
|
||||
'--help' )
|
||||
files_from_autoinstall=$(ls "${PORT_SCRIPTS_PATH}/pw_autoinstall")
|
||||
echo -e "
|
||||
use: [--repair] [--reinstall] [--autoinstall]
|
||||
|
||||
--repair forces all scripts to be updated to a working state
|
||||
(helps if PortProton is not working)
|
||||
--reinstall reinstall files of the portproton to default settings
|
||||
--autoinstall [script_frome_pw_autoinstall] autoinstall from the list below:
|
||||
"
|
||||
echo ${files_from_autoinstall}
|
||||
|
||||
echo "
|
||||
--generate-pot generated pot file
|
||||
"
|
||||
echo "
|
||||
--debug debug scripts for PortProton
|
||||
(saved log in $PORT_WINE_PATH/scripts-debug.log)
|
||||
"
|
||||
echo "
|
||||
--update check update scripts for PortProton
|
||||
"
|
||||
exit 0 ;;
|
||||
|
||||
'--reinstall' )
|
||||
--help)
|
||||
# shellcheck source=/dev/null
|
||||
source "${PORT_SCRIPTS_PATH}/help_info"
|
||||
exit 0
|
||||
;;
|
||||
--reinstall)
|
||||
export PW_REINSTALL_FROM_TERMINAL=1
|
||||
pw_reinstall_pp ;;
|
||||
|
||||
'--autoinstall' )
|
||||
pw_reinstall_pp
|
||||
;;
|
||||
--autoinstall)
|
||||
export PW_YAD_SET="$2"
|
||||
pw_autoinstall_from_db
|
||||
exit 0 ;;
|
||||
|
||||
'--generate-pot' )
|
||||
exit 0
|
||||
;;
|
||||
--generate-pot)
|
||||
generate_pot
|
||||
exit 0 ;;
|
||||
|
||||
'--debug' )
|
||||
exit 0
|
||||
;;
|
||||
--debug)
|
||||
clear
|
||||
export PW_DEBUG="set -x"
|
||||
/usr/bin/env bash -c ${pw_full_command_line[@]} 2>&1 | tee "$PORT_WINE_PATH/scripts-debug.log" &
|
||||
exit 0 ;;
|
||||
|
||||
'--server-file-access' )
|
||||
exit 0
|
||||
;;
|
||||
--server-file-access)
|
||||
echo
|
||||
curl -s --list-only "https://cloud.linux-gaming.ru/log/$(date +20%y_%m)_file_access.log" | sort -V -k 2,2 \
|
||||
| sed 's/count=//g' | awk '{a=$1; $1=$2; $2=a} 1' | awk 'BEGIN {print "Count: Name:"} {print}' | column -t
|
||||
echo
|
||||
exit 0 ;;
|
||||
|
||||
'--update' )
|
||||
gui_pw_update ;;
|
||||
|
||||
'--launch' )
|
||||
exit 0
|
||||
;;
|
||||
--update)
|
||||
gui_pw_update
|
||||
;;
|
||||
--launch)
|
||||
portwine_launch
|
||||
stop_portwine ;;
|
||||
|
||||
'--edit-db' )
|
||||
stop_portwine
|
||||
;;
|
||||
--edit-db)
|
||||
# --edit-db /полный/путь/до/файла.exe PW_MANGOHUD=1 PW_VKBASALT=0 (и т.д) для примера
|
||||
set_several_variables ${@:3}
|
||||
edit_db_from_gui $keys_all
|
||||
exit 0 ;;
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
### GUI ###
|
||||
|
Loading…
Reference in New Issue
Block a user