Commit b78d1736 authored by Vladislav's avatar Vladislav

Fixes

parent 1b7dcf3c
......@@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 12:43+0500\n"
"POT-Creation-Date: 2024-10-26 03:57+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"
......@@ -65,6 +65,9 @@ msgstr ""
msgid "Delete shortcut for select file..."
msgstr ""
msgid "Launching"
msgstr ""
msgid "Base settings"
msgstr ""
......@@ -227,9 +230,6 @@ msgstr ""
msgid "Downloading"
msgstr ""
msgid "Launching"
msgstr ""
msgid "day"
msgstr ""
......@@ -1426,6 +1426,9 @@ msgstr ""
msgid "The shortcut will be created in the PortProton directory."
msgstr ""
msgid "Name"
msgstr ""
msgid "Add shortcut to MENU -> GAMES"
msgstr ""
......@@ -1435,13 +1438,6 @@ msgstr ""
msgid "Add shortcut to STEAM library"
msgstr ""
msgid "Name"
msgstr ""
msgid "A higher number of duplicate desktop files were found for this file."
"\\nShould I delete the extra ones or not?"
msgstr ""
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 13:48+0500\n"
"POT-Creation-Date: 2024-10-26 03:57+0500\n"
"PO-Revision-Date: 2024-10-24 13:51+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
......@@ -70,6 +70,9 @@ msgstr "ELIMINAR ACCESO DIRECTO"
msgid "Delete shortcut for select file..."
msgstr "Eliminar el acceso directo del archivo seleccionado..."
msgid "Launching"
msgstr "Lanzamiento"
msgid "Base settings"
msgstr "Configuración básica"
......@@ -247,9 +250,6 @@ msgstr ""
msgid "Downloading"
msgstr "Descargando"
msgid "Launching"
msgstr "Lanzamiento"
msgid "day"
msgstr "día"
......@@ -1858,6 +1858,9 @@ msgstr "¿Realmente deseas restablecer la configuración de"
msgid "The shortcut will be created in the PortProton directory."
msgstr "El acceso directo se creará en el directorio de PortProton."
msgid "Name"
msgstr "Nombre"
msgid "Add shortcut to MENU -> GAMES"
msgstr "Agregar acceso directo a MENU -> JUEGOS"
......@@ -1867,16 +1870,6 @@ msgstr "Agregar acceso directo al escritorio"
msgid "Add shortcut to STEAM library"
msgstr "Agregar acceso directo a la biblioteca de STEAM"
msgid "Name"
msgstr "Nombre"
msgid ""
"A higher number of duplicate desktop files were found for this file."
"\\nShould I delete the extra ones or not?"
msgstr ""
"Se encontraron un mayor número de archivos de escritorio duplicados para "
"este archivo.\\n¿Debería eliminar los adicionales o no?"
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr ""
"Para agregar el acceso directo a STEAM, es necesario reiniciar.\\n\\¿Quieres "
......@@ -2173,6 +2166,13 @@ msgstr ""
msgid "Please wait. downloading covers for"
msgstr "Por favor, espera. Descargando portadas para"
#~ msgid ""
#~ "A higher number of duplicate desktop files were found for this file."
#~ "\\nShould I delete the extra ones or not?"
#~ msgstr ""
#~ "Se encontraron un mayor número de archivos de escritorio duplicados para "
#~ "este archivo.\\n¿Debería eliminar los adicionales o no?"
#~ msgid "Forced activation of vertical sync"
#~ msgstr "Activación forzada de la sincronización vertical"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-24 12:43+0500\n"
"POT-Creation-Date: 2024-10-26 03:57+0500\n"
"PO-Revision-Date: 2024-10-24 12:45+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
......@@ -70,6 +70,9 @@ msgstr "УДАЛИТЬ ЯРЛЫК"
msgid "Delete shortcut for select file..."
msgstr "Удалить ярлык для выбранного файла..."
msgid "Launching"
msgstr "Запуск"
msgid "Base settings"
msgstr "Основные настройки"
......@@ -249,9 +252,6 @@ msgstr ""
msgid "Downloading"
msgstr "Загружается"
msgid "Launching"
msgstr "Запуск"
msgid "day"
msgstr "день"
......@@ -1836,6 +1836,9 @@ msgstr "Вы действительно хотите сбросить настр
msgid "The shortcut will be created in the PortProton directory."
msgstr "Ярлык будет создан в каталоге PortProton."
msgid "Name"
msgstr "Имя"
msgid "Add shortcut to MENU -> GAMES"
msgstr "Добавить ярлык в МЕНЮ -> ИГРЫ"
......@@ -1845,14 +1848,6 @@ msgstr "Добавить ярлык на рабочий стол"
msgid "Add shortcut to STEAM library"
msgstr "Добавить ярлык в библиотеку STEAM"
msgid "Name"
msgstr "Имя"
msgid ""
"A higher number of duplicate desktop files were found for this file."
"\\nShould I delete the extra ones or not?"
msgstr "Найдены дубликаты создаваемого ярлыка.\\nУдалить лишние ярлыки?"
msgid "For adding shortcut to STEAM, needed restart.\\n\\nRestart STEAM now?"
msgstr ""
"Для добавления ярлыка в STEAM требуется перезапуск.\\n\\nПерезапустить STEAM "
......@@ -2157,6 +2152,11 @@ msgstr "SteamGridDB не отвечает, принудительно отклю
msgid "Please wait. downloading covers for"
msgstr "Пожалуйста, подождите. Загрузка обложек для"
#~ msgid ""
#~ "A higher number of duplicate desktop files were found for this file."
#~ "\\nShould I delete the extra ones or not?"
#~ msgstr "Найдены дубликаты создаваемого ярлыка.\\nУдалить лишние ярлыки?"
#~ msgid "Forced activation of vertical sync"
#~ msgstr "Принудительное включение вертикальной синхронизации"
......
......@@ -850,8 +850,9 @@ debug_timer () {
# Поиск нужного .desktop файла по $portwine_exe (для показа в комментариях нужного времени)
# Параллельное создание базы по времени после завершения приложения
search_desktop_file () {
local desktop_file desktop_file_new EXEC_DESKTOP EXEC_DESKTOP_NEW TIME_TOTAL line1 line2 ENTRY_POINT_FIND
unset TIME_CURRENT
local desktop_file desktop_file_new EXEC_DESKTOP EXEC_DESKTOP_NEW TIME_TOTAL count line1 line2 ENTRY_POINT_FIND
unset TIME_CURRENT DESKTOP_FILES_ARRAY
count=0
for desktop_file in "$PORT_WINE_PATH"/* ; do
desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}"
if [[ $desktop_file_new =~ .desktop$ ]] ; then
......@@ -866,44 +867,53 @@ search_desktop_file () {
fi
done < "$desktop_file"
while IFS=" " read -r -a line2 ; do
if [[ ${line2[0]} == ${portwine_exe// /#@_@#} ]] ; then
if [[ ${line2[0]} == "${portwine_exe// /#@_@#}" ]] ; then
TIME_CURRENT=${line2[2]}
fi
if [[ ${line2[1]} =~ ^$ENTRY_POINT ]] ; then
ENTRY_POINT_FIND=$ENTRY_POINT
if [[ ${line2[1]} == "$ENTRY_POINT" ]] ; then
ENTRY_POINT_FIND=1
break
fi
done < "$PW_DATABASE_PATH/times_current"
EXEC_DESKTOP_NEW=${EXEC_DESKTOP//\"/}
if [[ $portwine_exe == "$EXEC_DESKTOP_NEW" ]] ; then
DESKTOP_SEARCH_FILE=$desktop_file
break
if [[ $portwine_exe == "${EXEC_DESKTOP//\"/}" ]] ; then
DESKTOP_FILES_ARRAY["$count"]="$desktop_file"
(( count++ ))
fi
fi
fi
done
IFS="$orig_IFS"
if [[ $PW_NEW_DESKTOP == 1 ]] && [[ -z ${line2[3]} ]] ; then
if [[ -n $TIME_CURRENT ]] ; then
sed -i "s|${line2[1]} ${line2[2]}|${line2[1]} ${line2[2]} NEW_DESKTOP|g" "$PW_DATABASE_PATH/times_current"
else
TIME_CURRENT=0
echo "${portwine_exe// /#@_@#} $ENTRY_POINT $TIME_CURRENT NEW_DESKTOP" >> "$PW_DATABASE_PATH/times_current"
fi
fi
unset PW_NEW_DESKTOP
if [[ -n $PW_TIME_IN_GAME ]] ; then
if [[ -n $TIME_CURRENT ]] ; then
TIME_TOTAL=$(( TIME_CURRENT + PW_TIME_IN_GAME ))
sed -i "s|${portwine_exe// /#@_@#} $ENTRY_POINT $TIME_CURRENT|${portwine_exe// /#@_@#} $ENTRY_POINT $TIME_TOTAL|g" "$PW_DATABASE_PATH/times_current"
sed -i "s|${line2[1]} ${line2[2]}|${line2[1]} $TIME_TOTAL|g" "$PW_DATABASE_PATH/times_current"
else
TIME_TOTAL=$(( 0 + PW_TIME_IN_GAME ))
TIME_CURRENT=0
TIME_TOTAL=$(( $TIME_CURRENT + PW_TIME_IN_GAME ))
echo "${portwine_exe// /#@_@#} $ENTRY_POINT $TIME_TOTAL" >> "$PW_DATABASE_PATH/times_current"
fi
else
if [[ -n $ENTRY_POINT_FIND ]] ; then
TIME_CURRENT=${line2[2]}
if [[ $ENTRY_POINT_FIND == 1 ]] ; then
[[ -z $TIME_CURRENT ]] && TIME_CURRENT=0
if [[ -n $PW_TIME_IN_GAME ]]
then TIME_TOTAL=$(( TIME_CURRENT + PW_TIME_IN_GAME ))
else TIME_TOTAL=$TIME_CURRENT
fi
sed -i "s|${line2[0]} ${line2[1]} ${line2[2]}|${portwine_exe// /#@_@#} $ENTRY_POINT_FIND $TIME_TOTAL|g" "$PW_DATABASE_PATH/times_current"
sed -i "s|${line2[0]} ${line2[1]} ${line2[2]}|${portwine_exe// /#@_@#} ${line2[1]} $TIME_TOTAL|g" "$PW_DATABASE_PATH/times_current"
else
TIME_CURRENT=0
fi
fi
export TIME_CURRENT DESKTOP_SEARCH_FILE
export TIME_CURRENT
}
create_name_desktop () {
......@@ -918,8 +928,9 @@ create_name_desktop () {
elif [[ -n $name_desktop ]] ; then
DESKTOP_NAME_FILE="$name_desktop"
unset name_desktop
elif [[ -n $DESKTOP_SEARCH_FILE ]] ; then
DESKTOP_NAME_FILE="${DESKTOP_SEARCH_FILE//"$PORT_WINE_PATH/"/}"
elif [[ -n ${DESKTOP_FILES_ARRAY[0]} ]] \
&& [[ -z ${DESKTOP_FILES_ARRAY[1]} ]] ; then
DESKTOP_NAME_FILE="${DESKTOP_FILES_ARRAY[0]//"$PORT_WINE_PATH/"/}"
DESKTOP_NAME_FILE="${DESKTOP_NAME_FILE//.desktop/}"
fi
......@@ -5591,8 +5602,10 @@ portwine_create_shortcut () {
edit_user_conf_from_gui PW_SHORTCUT_MENU PW_SHORTCUT_DESKTOP PW_SHORTCUT_STEAM
if [[ -n $DESKTOP_SEARCH_FILE && $name_desktop != "$DESKTOP_NAME_FILE" ]] ; then
rm -f "$DESKTOP_SEARCH_FILE"
if [[ -n ${DESKTOP_FILES_ARRAY[0]} && $name_desktop != "$DESKTOP_NAME_FILE" ]] || [[ -n ${DESKTOP_FILES_ARRAY[1]} ]] ; then
for rm in "${DESKTOP_FILES_ARRAY[@]}" ; do
rm -f "$rm"
done
else
try_remove_file "${PORT_WINE_PATH}/${name_desktop}.desktop"
fi
......@@ -5665,8 +5678,7 @@ portwine_create_shortcut () {
unset PW_SKIP_RESTART_STEAM
fi
# Когда новый .desktop файл
echo "#NEW_DESKTOP" >> "$PORT_WINE_PATH/$name_desktop.desktop"
export PW_NEW_DESKTOP="1"
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] ; then
print_info "Restarting PP..."
......
......@@ -626,16 +626,8 @@ else
fi
fi
[[ $line1 =~ ^Icon= ]] && PW_ICON_PATH["$AMOUNT_GENERATE_BUTTONS"]=${line1//Icon=/}
[[ $line1 =~ ^#NEW_DESKTOP ]] && NEW_DESKTOP=1
done < "$desktop_file"
PW_ALL_DF["$AMOUNT_GENERATE_BUTTONS"]="$desktop_file_new"
if [[ $SORT_WITH_TIME == enabled ]] && [[ $NEW_DESKTOP == 1 ]] ; then
unset NEW_DESKTOP
sed -i '/^#NEW_DESKTOP/d' "$desktop_file"
PW_AMOUNT_NEW_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
else
PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
fi
# Для конвертации существующих .desktop файлов flatpak в натив и наоборот
if [[ ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} =~ ^"Exec=flatpak run ru.linux_gaming.PortProton " ]] ; then
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=flatpak run ru.linux_gaming.PortProton /}
......@@ -644,15 +636,22 @@ else
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /}
sed -i "s|Exec=env \"$PORT_SCRIPTS_PATH/start.sh\"|Exec=flatpak run ru.linux_gaming.PortProton|" "$desktop_file"
fi
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//\"/}
while IFS=" " read -r -a line2 ; do
if [[ ${line2[0]//#@_@#/ } == ${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]} ]] ; then
if [[ \"${line2[0]//#@_@#/ }\" == "${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]}" ]] ; then
[[ ${line2[3]} == NEW_DESKTOP ]] && NEW_DESKTOP=1
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=${line2[2]}
break
else
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=0
fi
done < "$PW_DATABASE_PATH/times_current"
if [[ $SORT_WITH_TIME == enabled ]] && [[ $NEW_DESKTOP == 1 ]] ; then
unset NEW_DESKTOP
sed -i "s/${line2[1]} ${line2[2]} ${line2[3]}/${line2[1]} ${line2[2]}/" "$PW_DATABASE_PATH/times_current"
PW_AMOUNT_NEW_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
else
PW_AMOUNT_OLD_DESKTOP+=($AMOUNT_GENERATE_BUTTONS)
fi
(( AMOUNT_GENERATE_BUTTONS++ ))
fi
fi
......@@ -687,8 +686,9 @@ else
for dp in "${PW_AMOUNT_NEW_DESKTOP[@]}" "${PW_AMOUNT_OLD_DESKTOP[@]}" ; do
PW_NAME_D_ICON_48="${PW_ICON_PATH[dp]%.png}_48"
PW_NAME_D_ICON_128="${PW_ICON_PATH[dp]%.png}"
resize_png "$PW_NAME_D_ICON" "${PW_NAME_D_ICON_48//"${PORT_WINE_PATH}/data/img/"/}" "48"
resize_png "$PW_NAME_D_ICON" "${PW_NAME_D_ICON_128//"${PORT_WINE_PATH}/data/img/"/}" "128"
PW_NAME_D_ICON_NEW="${PW_NAME_D_ICON[dp]//\"/}"
resize_png "$PW_NAME_D_ICON_NEW" "${PW_NAME_D_ICON_48//"${PORT_WINE_PATH}/data/img/"/}" "48"
resize_png "$PW_NAME_D_ICON_NEW" "${PW_NAME_D_ICON_128//"${PORT_WINE_PATH}/data/img/"/}" "128"
PW_DESKTOP_FILES="${PW_ALL_DF[$dp]}"
PW_DESKTOP_FILES_SHOW="$PW_DESKTOP_FILES"
......
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