Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ IF(WANT_JACK)
SET(STATUS_JACK "OK (weak linking enabled)")
SET(JACK_INCLUDE_DIRS "")
# use dlsym instead
SET(JACK_LIBRARIES "dl")
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
SET(STATUS_JACK "OK")
ENDIF()
Expand Down
71 changes: 71 additions & 0 deletions buildtools/update_locales
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash
aberr(){ printf "[\e[31mERROR\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
abinfo(){ printf "[\e[96mINFO\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }

function upload_to_tx() {
if ! which tx > /dev/null; then
aberr "You don't have Transifex client installed. \n Run \`pip install transifex-client\` to install it."
exit 1
fi
abinfo "Uploading to transifex..."
if ! tx push -s; then
aberr "Problems occurred when uploading strings to Transifex."
printf "\t Either there are syntax errors in source file or you don't have permission to update the source file."
exit 1
fi
exit 0
}

function validate() {
ERR_LANG=""
ERR_BUF=""
for i in data/locale/*.ts; do
if ! ERR_BUF=$(lconvert-qt5 -i "${i}" -o "/tmp/test.qm" -of qm 2>&1); then
ERR_LANG+="\e[96m$(basename "${i}")\e[0m: \e[93m${ERR_BUF}\e[0m "
printf "\e[31mx\e[0m"
continue
fi
printf "\e[32m.\e[0m"
done
echo ""
if [[ "x${ERR_LANG}" != "x" ]]; then
aberr "The following files failed the validation: "
echo -e "${ERR_LANG}"
fi
}

abinfo "Checking for your environment..."
if ! which lupdate-qt5 > /dev/null; then
aberr "You don't seem to have Qt i18n tools installed."
printf "\tUsually this comes with your Qt installation, or you need to\n"
printf "\tinstall extra packages like \`qt5-tools\` or similar.\n"
exit 1;
fi

abinfo "Scanning directories..."

if test -d src/3rdparty/qt5-x11embed/3rdparty/ECM/; then
# prevent from collecting strings in ECM
rm -rf src/3rdparty/qt5-x11embed/3rdparty/ECM/
fi

if ! lupdate-qt5 -I include/ src/ plugins/ -ts data/locale/en.ts; then
aberr "There are some problems when collecting the strings."
exit 1
fi

abinfo "Validating translations..."
validate

abinfo "Translations successfully updated."
printf "Do you want to upload translations to Transifex? [y/N]: "
read -n 1 -r TX
echo ""

if [[ "$TX" == "y" || "$TX" == "Y" ]]; then
upload_to_tx
fi

abinfo "No upload as required."

exit 0
9 changes: 6 additions & 3 deletions cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ elif ! find "$LINUXDEPLOYQT" -mtime -$DAYSOLD 2>/dev/null|grep -q "." > /dev/nul
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
mv "squashfs-root/usr/bin/appimagetool" "$APPIMAGETOOL"
success "Extracted $APPIMAGETOOL"
mv "squashfs-root/usr/bin/mksquashfs" "$USERBIN/mksquashfs"
success "Extracted $USERBIN/mksquashfs"
mkdir -p "$USERBIN/../lib"
mv "squashfs-root/usr/lib/appimagekit/" "$USERBIN/../lib/"
success "Extracted $USERBIN/../lib/mksquashfs"
mv "squashfs-root/usr/bin/desktop-file-validate" "$USERBIN/desktop-file-validate"
success "Extracted $USERBIN/desktop-file-validate"
rm -rf "squashfs-root/"

else
Expand Down Expand Up @@ -130,7 +133,7 @@ EOL

chmod +x "${APPDIR}usr/bin/lmms"

# Per https://github.com/probonopd/linuxdeployqt/issues/129
# Per https://github.com/probonopd/linuxdeployqt/issues/129
unset LD_LIBRARY_PATH

# Ensure linuxdeployqt can find shared objects
Expand Down
10,968 changes: 6,834 additions & 4,134 deletions data/locale/cs.ts

Large diffs are not rendered by default.

10,871 changes: 6,786 additions & 4,085 deletions data/locale/de.ts

Large diffs are not rendered by default.

Loading