From 34b8e0d59cc49a5acdd4e380e77d4208e8746450 Mon Sep 17 00:00:00 2001 From: Htylol Date: Wed, 18 Sep 2024 03:05:31 +0500 Subject: [PATCH] Added IFS= for line --- data_from_portwine/scripts/functions_helper | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 3980b02..a149d5a 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -146,14 +146,13 @@ TRANSLATIONS_VER=$scripts_install_ver declare -A translations=( EOF if [[ $LANGUAGE == "en" ]] ; then - po_file="${PORT_WINE_PATH}/data/locales/ru/LC_MESSAGES/PortProton.po" + po_file="${PORT_WINE_PATH}/data/locales/ru/LC_MESSAGES/PortProton.po" else po_file="${PORT_WINE_PATH}/data/locales/$LANGUAGE/LC_MESSAGES/PortProton.po" fi - while [[ ! "$line" =~ msgid ]]; do - read -r line - while [[ "$line" =~ msgid ]]; do + while IFS= read -r line ; do + while [[ "$line" =~ msgid ]] ; do unset msgid msgid="$line" read -r line