From ee4195547ab1222ac470812d3d8658e524608363 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 4 Aug 2017 10:39:08 +0200 Subject: [PATCH 1/2] Handle update-translated-strings.sh being run from a different directory update-source-strings.sh was already solving the same problem in the same way. --- Languages/update-translated-strings.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Languages/update-translated-strings.sh b/Languages/update-translated-strings.sh index 26cf4c2328..7183627aae 100755 --- a/Languages/update-translated-strings.sh +++ b/Languages/update-translated-strings.sh @@ -5,5 +5,6 @@ # script before committing changes to the .po files, otherwise the .po # files might get modified the next time you try to build using cmake. +cd ${0/update-translated-strings.sh/}/.. POTFILE=./Languages/po/dolphin-emu.pot find ./Languages/po -name '*.po' -exec msgmerge --quiet --update --backup=none -s {} $POTFILE \; From 0db63cefc0e4bc7448b393c9bc09c24ca39aa136 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 4 Aug 2017 19:09:12 +0200 Subject: [PATCH 2/2] Use dirname $0 in localization scripts --- Languages/update-source-strings.sh | 2 +- Languages/update-translated-strings.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Languages/update-source-strings.sh b/Languages/update-source-strings.sh index ed8629f4d9..66bdaf39be 100755 --- a/Languages/update-source-strings.sh +++ b/Languages/update-source-strings.sh @@ -3,7 +3,7 @@ # This script updates the dolphin-emu.pot file to match the strings in # the source code. -cd ${0/update-source-strings.sh/}/.. +cd "$(dirname "$0")/.." SRCDIR=Source find $SRCDIR -name '*.cpp' -o -name '*.h' -o -name '*.c' | \ xgettext -d dolphin-emu -s --keyword=_ --keyword=wxTRANSLATE --keyword=SuccessAlertT \ diff --git a/Languages/update-translated-strings.sh b/Languages/update-translated-strings.sh index 7183627aae..82679860cf 100755 --- a/Languages/update-translated-strings.sh +++ b/Languages/update-translated-strings.sh @@ -5,6 +5,6 @@ # script before committing changes to the .po files, otherwise the .po # files might get modified the next time you try to build using cmake. -cd ${0/update-translated-strings.sh/}/.. +cd "$(dirname "$0")/.." POTFILE=./Languages/po/dolphin-emu.pot find ./Languages/po -name '*.po' -exec msgmerge --quiet --update --backup=none -s {} $POTFILE \;