Created
May 1, 2017 03:21
-
-
Save JosephMillsAtWork/c5b7f8602fa44c96ba68653c82d77665 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## debug | |
| set -x | |
| ## where does the lupdate and all the other bins live ? | |
| QTDIR=/home/joseph/Qt/5.8/gcc_64/bin | |
| ## run over the files and make the .po files | |
| for i in $(ls $1/translations/ |grep .po); | |
| do newFile=$(ls $1/translations/$i |grep .po |sed "s/.po/.ts/g") | |
| $QTDIR/lconvert -locations relative \ | |
| $1/translations/$i \ | |
| -o $newFile | |
| done | |
| ## loop over the new ts files and use lrelease | |
| for ii in $(ls $1/translations/ |grep .ts); | |
| do | |
| newerFile=$(ls $1/translations/$ii |grep .ts |sed "s/.ts/.qm/g") | |
| touch $newerFile | |
| $QTDIR/lrelease \ | |
| $1/translations/$ii \ | |
| $newerFile | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment