diff options
author | Florent Revest <revestflo@gmail.com> | 2017-11-25 00:13:34 +0100 |
---|---|---|
committer | Florent Revest <revestflo@gmail.com> | 2017-11-25 00:13:34 +0100 |
commit | 0ddaeacabdce91cce750f3d350a9237323fcd787 (patch) | |
tree | 97d05fde86ce29870712246c375fe3aa83022dc9 /i18n | |
parent | 7d9833420965888a6e02160634e709e947a22db0 (diff) |
generate-desktop.sh: Use id based translations
Diffstat (limited to 'i18n')
-rwxr-xr-x | i18n/generate-desktop.sh | 4 |
1 files 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 '<location.*desktop\.h" ' $FILE | grep '<translation'` + TRANSLATION_LINE=`grep -A 3 '<message id=\"id-app-launcher-name\">' $FILE | grep '<translation'` if [ -z "$TRANSLATION_LINE" ]; then echo "> Couldn't find a corresponding desktop.h translation, aborting" continue |