Created
May 1, 2017 03:23
-
-
Save JosephMillsAtWork/42d2f5588141f026f65378029ed90d21 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 | |
| #args are | |
| # 1= the path to the qmake file | |
| # 2= qmake file (the pro file) | |
| ## debug | |
| set -x | |
| ## where does the lupdate and all the other bins live ? | |
| QTDIR=/home/joseph/Qt/5.8/gcc_64/bin | |
| ## we make the array of langs that we would like to use | |
| mkdir -p $1/translations/ | |
| for i in Arabic German Portuguese Chinese Italian Russian French Japanese Spanish; | |
| do | |
| $QTDIR/lupdate $1/$2 -ts $1/translations/$i.ts | |
| done | |
| ## run over the files and make the .po files | |
| for ii in $(ls $1/translations/); | |
| do | |
| newFile=$(ls $1/translations/$ii | sed "s/.ts/.po/g") | |
| $QTDIR/lconvert $1/translations/$ii -o $newFile | |
| ## lconvert <file>.ts -o <file>.po | |
| done | |
| echo "All ready for the google translations kit " | |
| echo "after translations run the 2nd script" | |
| xdg-open https://translate.google.com/toolkit/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment