Active Topics

 


Reply
Thread Tools
Posts: 329 | Thanked: 505 times | Joined on Jul 2008 @ Israel
#1
Posted a blog about it and thought it should also be published here.

Basically it deals with translating texts and also allow a QML event to change the language - all in pure QML.

If you'd like to see the code in a formatted form, it is available: translator.js Translator.qml QwazerSettings.qml qwazer.qml qwazer.he.js

Edit:
I forgot to mention that I added a bash script that scans the qml files and create new translations file (similar to lupdate) as a comment at the beginning of translator.js.

Last edited by damagedspline; 2011-07-02 at 21:18. Reason: Utility script
 

The Following 4 Users Say Thank You to damagedspline For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#2
Interesting approach. My only concern would be that it makes it more difficult for users to provide translations (unless the developer takes all the translated strings from the .ts file provided by the translator and puts them into a JS object, which again equals more work). I suppose you could write a script that automates that process.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 
Posts: 329 | Thanked: 505 times | Joined on Jul 2008 @ Israel
#3
Originally Posted by marxian View Post
I suppose you could write a script that automates that process.
the script is not completed yet - i still need to scan the previous file and perserve the texts that were already translated so it will only add the new entries that dont exist yet. further more, i can make a script parses the actual ts files, but thats not the main project i' working on
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:14.