[Kde-games-devel] Translateable Strings in QtScript (KSudoku)
    Johannes Bergmeier 
    Johannes.Bergmeier at gmx.net
       
    Sat Jan 31 15:35:21 CET 2009
    
    
  
I'm working on a logic-game-engine which should replace the current (difficult 
to maintain) core of KSudoku. While at the beginning the game-rules were 
described in an custom XML-format I decided that Qt-Script is the better 
choice for generating the complex rules.
I have the problem that rule-descriptions can contain dynamic hint-messages 
which will be shown to the user. Are there any KDE-wide policies how to 
generate translated, user-visible text in QtScript? And what is the best 
choice to store them?
I have currently three ideas how to achieve this:
1. create an extractor for i18n-strings in .js files. I think that this is to 
much overhead.
2. add some code for querying translations to the script engine and let it 
search for the translations in a .desktop-file or similar either by the full 
string or keys
3. same as 2. but use XML-files instead of .desktop-files
any suggestions?
Cheers
Josel
    
    
More information about the kde-games-devel
mailing list