From 0ddaeacabdce91cce750f3d350a9237323fcd787 Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Sat, 25 Nov 2017 00:13:34 +0100 Subject: generate-desktop.sh: Use id based translations --- i18n/generate-desktop.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/generate-desktop.sh b/i18n/generate-desktop.sh index f4c8a3e..9296ed1 100755 --- a/i18n/generate-desktop.sh +++ b/i18n/generate-desktop.sh @@ -19,7 +19,7 @@ if [ ! -f "${SRC_DIR}/i18n/${OUTPUT_DESKTOP_FILE}.h" ]; then exit 2 fi -DEFAULT_NAME=`grep -oP 'QObject::tr\("\K[^"]+(?="\);)' ${SRC_DIR}/i18n/${OUTPUT_DESKTOP_FILE}.h` +DEFAULT_NAME=`grep -oP '//% "\K[^"]+(?=")' ${SRC_DIR}/i18n/${OUTPUT_DESKTOP_FILE}.h` if [ -z "$DEFAULT_NAME" ]; then echo "Default name can not be found in ${SRC_DIR}/i18n/${OUTPUT_DESKTOP_FILE}.h" exit 3 @@ -38,7 +38,7 @@ for FILE in ${SRC_DIR}/i18n/*.ts; do fi echo "> Language: $PROCESSED_LANG detected" - TRANSLATION_LINE=`grep -A 2 '' $FILE | grep ' Couldn't find a corresponding desktop.h translation, aborting" continue -- cgit v1.2.3-70-g09d2