Merge branch 'drop_eval_translations' of github.com:Htylol/PortWINE into Htylol-drop_eval_translations

This commit is contained in:
Mikhail Tergoev 2025-04-07 21:15:36 +03:00
commit ebc76216e8
4 changed files with 57 additions and 62 deletions

@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n"
"POT-Creation-Date: 2025-04-07 19:38+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"
@ -1300,6 +1300,13 @@ msgstr ""
msgid "Change settings gamescope for"
msgstr ""
msgid "Gamescope is not detected on the system, to install it, run the "
"command in the terminal"
msgstr ""
msgid "Can be selected and copied"
msgstr ""
msgid "<b>Gamescope is not detected on the system, please contact the "
"manufacturer of your distribution\\nor search the Internet for "
"information on how to install gamescope on your system.</b>"

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n"
"PO-Revision-Date: 2024-11-13 08:18+0500\n"
"POT-Creation-Date: 2025-04-07 19:32+0500\n"
"PO-Revision-Date: 2025-04-07 19:35+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es_ES\n"
@ -1689,6 +1689,16 @@ msgstr ""
msgid "Change settings gamescope for"
msgstr "Cambiar ajustes gamescope para"
msgid ""
"Gamescope is not detected on the system, to install it, run the command in "
"the terminal"
msgstr ""
"Gamescope no se detecta en el sistema, para instalarlo, ejecute el comando "
"en el terminal"
msgid "Can be selected and copied"
msgstr "Se puede seleccionar y copiar"
msgid ""
"<b>Gamescope is not detected on the system, please contact the manufacturer "
"of your distribution\\nor search the Internet for information on how to "
@ -2183,8 +2193,8 @@ msgstr "BIBLIOTECAS DE TERCEROS"
#~ 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 reiniciar STEAM ahora?"
#~ "Para agregar el acceso directo a STEAM, es necesario reiniciar."
#~ "\\n\\¿Quieres reiniciar STEAM ahora?"
#~ msgid "Restarting STEAM... Please wait."
#~ msgstr "Restarting STEAM... Please wait."
@ -2192,17 +2202,6 @@ msgstr "BIBLIOTECAS DE TERCEROS"
#~ msgid "Please wait. downloading covers for"
#~ msgstr "Por favor, espera. Descargando portadas para"
#~ msgid ""
#~ "<b>Gamescope is not detected on the system, to install it, run the "
#~ "command in the terminal:\\nflatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Can be "
#~ "selected and copied)</b>"
#~ msgstr ""
#~ "<b>Gamescope no se detecta en el sistema, para instalarlo, ejecute el "
#~ "comando en el terminal:\\n flatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n (Se puede "
#~ "seleccionar y copiar)</b>"
#, sh-format
#~ msgid ""
#~ "PortProton v. ${install_ver}\n"

@ -7,17 +7,17 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-20 21:49+0300\n"
"PO-Revision-Date: 2025-03-20 21:50+0300\n"
"POT-Creation-Date: 2025-04-07 19:32+0500\n"
"PO-Revision-Date: 2025-04-07 19:33+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.5\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.4.4\n"
msgid ""
"A running PortProton session was detected.\\nDo you want to end the previous "
@ -1677,6 +1677,16 @@ msgstr ""
msgid "Change settings gamescope for"
msgstr "Изменить настройки Gamescope для"
msgid ""
"Gamescope is not detected on the system, to install it, run the command in "
"the terminal"
msgstr ""
"Gamescope не найден в системе, для его установки выполните команду в "
"терминале"
msgid "Can be selected and copied"
msgstr "Можно выделить и скопировать"
msgid ""
"<b>Gamescope is not detected on the system, please contact the manufacturer "
"of your distribution\\nor search the Internet for information on how to "
@ -2171,17 +2181,6 @@ msgstr "БИБЛИОТЕКИ"
#~ msgid "Please wait. downloading covers for"
#~ msgstr "Пожалуйста, подождите. Загрузка обложек для"
#~ msgid ""
#~ "<b>Gamescope is not detected on the system, to install it, run the "
#~ "command in the terminal:\\nflatpak install -y runtime/org.freedesktop."
#~ "Platform.VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Can be "
#~ "selected and copied)</b>"
#~ msgstr ""
#~ "<b>Gamescope не найден в системе, для его установки выполните команду в "
#~ "терминале:\\nflatpak install -y runtime/org.freedesktop.Platform."
#~ "VulkanLayer.gamescope/x86_64/$%{GAMESCOPE_VERSION}%\\n(Данный текст можно "
#~ "выделить и скопировать)</b>"
#, sh-format
#~ msgid ""
#~ "PortProton v. ${install_ver}\n"
@ -2353,9 +2352,6 @@ msgstr "БИБЛИОТЕКИ"
#~ msgid "MIT License"
#~ msgstr "Лицензия Массачусетского технологического института (MIT License)"
#~ msgid "(Can be selected and copied)"
#~ msgstr "(можно выделить и скопировать)"
#~ msgid "Copyright"
#~ msgstr "Авторские права"

@ -203,8 +203,7 @@ generate_pot () {
local FILES_FOR_GETTEXT i
FILES_FOR_GETTEXT=(functions_helper start.sh setup.sh add_in_steam.sh)
for i in "${FILES_FOR_GETTEXT[@]}" ; do
sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' -e 's/eval_translations/gettext/g' \
"${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
sed -e 's/{translations\[/(gettext \"/g' -e 's/]}/")/g' "${PORT_SCRIPTS_PATH}/$i" > "${PORT_SCRIPTS_PATH}/${i}_tmp"
done
#Когда присходит предупреждение: синтаксис $"..." запрещен по соображениям безопасности; используйте eval_gettext
#и ругается на строку в которой нет перевода, можно использовать sed -i '//d' и убрать эту строку
@ -240,15 +239,6 @@ generate_pot () {
}
export -f generate_pot
eval_translations () {
# Для того чтобы раскрывать переменную уже после создания массива
# Вместо {translations[\$TEST text]} нужно (eval_translations "\$%TEST% text" "TEST=test"), перевод должен быть с %% тоже
# В остальных случаях можно использовать {translations[\$TEST text]} ,но переменную нужно обьявлять до создания массива
# до source "${PW_CACHE_LANG_PATH}/$LANGUAGE" или можно использовать команды {translations[\$(cat file.txt) text]}
# но тогда выполнение команды будет происходить во время создания массива всегда, а не там где это требуется
echo "${translations[$1]//\$*"%"/${2//*=/}}"
}
create_translations () {
local po_file msgid msgstr
[[ ! -d $PW_CACHE_LANG_PATH ]] && create_new_dir "$PW_CACHE_LANG_PATH"
@ -5881,19 +5871,21 @@ gui_gamescope () {
PW_GS_EXPOSE_WAYLAND PW_GS_REALTIME_SCHEDULING
)
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--mangoapp' ]] && add_to_array "PW_GS_LIST" PW_GS_MANGOAPP
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--backend' ]] && add_to_array "PW_GS_LIST" PW_GS_BACKEND_SDL
check_wayland_session && add_to_array "PW_GS_LIST" PW_GS_SDL_VIDEODRIVER_X11
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--cursor-scale-height' ]] && add_to_array "PW_GS_LIST" PW_GS_CURSOR_SCALE_HEIGHT
if [[ $GAMESCOPE_INSTALLED == "1" ]] ; then
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--mangoapp' ]] && add_to_array "PW_GS_LIST" PW_GS_MANGOAPP
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--backend' ]] && add_to_array "PW_GS_LIST" PW_GS_BACKEND_SDL
check_wayland_session && add_to_array "PW_GS_LIST" PW_GS_SDL_VIDEODRIVER_X11
[[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '--cursor-scale-height' ]] && add_to_array "PW_GS_LIST" PW_GS_CURSOR_SCALE_HEIGHT
#debian bookworm fix
if [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '-U, --fsr-upscaling' ]] ; then
GS_FILTER_CB="fsr!nis"
export PW_GS_FILTER_MODE_OLD="true"
rm_from_array "PW_GS_LIST" PW_GS_FORCE_GRAB_CURSOR PW_GS_FORCE_GRAB_KEYBOARD PW_GS_HDR_ENABLE PW_GS_HDR_FORCE_SUPPORT \
PW_GS_HDR_FORCE_OUTPUT
else
GS_FILTER_CB="linear!nearest!fsr!nis!pixel"
#debian bookworm fix
if [[ $(<"${PW_TMPFS_PATH}/gamescope.tmp") =~ '-U, --fsr-upscaling' ]] ; then
GS_FILTER_CB="fsr!nis"
export PW_GS_FILTER_MODE_OLD="true"
rm_from_array "PW_GS_LIST" PW_GS_FORCE_GRAB_CURSOR PW_GS_FORCE_GRAB_KEYBOARD PW_GS_HDR_ENABLE PW_GS_HDR_FORCE_SUPPORT \
PW_GS_HDR_FORCE_OUTPUT
else
GS_FILTER_CB="linear!nearest!fsr!nis!pixel"
fi
fi
PW_GS_FULLSCREEN_INFO=${translations[Make the window fullscreen]}
@ -5917,11 +5909,11 @@ gui_gamescope () {
PW_GS_CURSOR_SCALE_HEIGHT_INFO=${translations[if specified, sets a base output height to linearly scale the cursor against.]}
unset ADD_CHK_BOX_GS
if [[ "${GAMESCOPE_INSTALLED}" == 1 ]] ; then
if [[ $GAMESCOPE_INSTALLED == "1" ]] ; then
GAMESCOPE_NEED_INSTALL="${translations[Change settings gamescope for]} <b>$PW_NAME_DESKTOP_PROXY</b>\n ${translations[<b>NOTE:</b> To display help for each item, simply hover your mouse over the text]}"
GS_CB="CB" && GS_CBE="CBE" && GS_NUM="NUM" && GS_NUMN="NUMN"
for int_to_boole in "${PW_GS_LIST[@]}" ; do
if [[ "${!int_to_boole}" == "1" ]]
if [[ ${!int_to_boole} == "1" ]]
then export "$int_to_boole"="TRUE"
else export "$int_to_boole"="FALSE"
fi
@ -5933,7 +5925,8 @@ gui_gamescope () {
else
if check_flatpak ; then
GAMESCOPE_VERSION="$(grep 'VERSION_ID=' /etc/os-release)"
GAMESCOPE_NEED_INSTALL=$(eval_translations "<b>Gamescope is not detected on the system, to install it, run the command in the terminal:\\nflatpak install -y runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/\$%{GAMESCOPE_VERSION}%\\n(Can be selected and copied)</b>" "GAMESCOPE_VERSION=${GAMESCOPE_VERSION//VERSION_ID=/}")
GAMESCOPE_VERSION="${GAMESCOPE_VERSION//VERSION_ID=/}"
GAMESCOPE_NEED_INSTALL="<b>${translations[Gamescope is not detected on the system, to install it, run the command in the terminal]}:\\nflatpak install -y runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/$(echo "$GAMESCOPE_VERSION")\\n(${translations[Can be selected and copied]})</b>"
YAD_TEXT_SELECTION="--selectable-labels"
else
GAMESCOPE_NEED_INSTALL="${translations[<b>Gamescope is not detected on the system, please contact the manufacturer of your distribution\\nor search the Internet for information on how to install gamescope on your system.</b>]}"
@ -7150,7 +7143,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE." "DATE=$(date +%Y)" 2>/dev/null &
SOFTWARE." 2>/dev/null &
"${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=3 \
--text-info --show-uri --scroll \