. : News | Screen shots | Bugs | TODO

 
Supported cards

Downloads

UMTS info

Authors

Sponsors

Extra docs

Developer's
mailing list





How to work with Internationalisation (i18n) in umtsmon

As you can see to the right, as of version 0.8, umtsmon now can handle internationalisation.

Currently supported

Version 0.8 ships with support for the following languages:

  • US English
  • German (de)
  • Dutch (nl)
  • Brazilian Portugese (pt_BR)
  • Portugese Portugese (pt_PT)

It is up to the users to add support for other languages.

Version 0.9 will have a lot more support: umtsmon_de.ts : 70% German umtsmon_es.ts : 90% Spanish umtsmon_it.ts : 91% Italian umtsmon_nb_NO.ts : 87% Norwegian Bokmal umtsmon_nl.ts : 100% Dutch umtsmon_pl.ts : 98% Polish umtsmon_pt_BR.ts : 0% Brazilian Portugese umtsmon_pt_PT.ts : 10% Portugese umtsmon_sv.ts : 0% Swedish

Use internationalisation

As i18n is in all releases starting 0.8, all you need to do is download and install a release. It should have several *.qm files, the default location to put these would be /usr/share/umtsmon/translations . umtsmon will search the current directory, a directory called i18n and the just mentioned directory on startup.

Now you only need to tell umtsmon to start in your language. The easiest way to do this would be to use an environment value called LANG. First you need to check if it's actually set:

    echo $LANG
    

The output should be something like en_US.UTF-8 or e.g. if you are in Germany de_DE@euro or similar. Essentially, umtsmon only looks at stuff before the dot or the '@'. If you don't see output or if it doesn't define the language you want, you can change the variable and start umtsmon like this:

    export LANG="nl"
    umtsmon 
    

This should be enough to get umtsmon going - if you language is supported. If it doesn't seem to work, look at the output.
If it states something like: ##P1 t=793: aLocale 'lalala' denied, you probably didn't specify a LANG that umtsmon can understand (lalala is not a valid language).
Another case might be where you get an error like: ##P1 t=793: aLocale '(null)' denied This shouldn't happen in releases beyond 0.8, though.
If you don't get your language, but you don't get an error, you need to enable more logging: add the -v5 after the umtsmon command:

    export LANG="nl"
    umtsmon -v5
    

You should now get more logging. It should show something like:

umtsmon version 0.8.90 .
##P1 t=781: setVerbosity: '5'
##P2 t=781: set verbosity level to 5
##P2 t=781: set PPP verbosity level to 2
installing text SIGABRT handler
##P5 t=781: loadTranslator('qt', '(null)')
##P1 t=781: aLocale '(null)' denied
##P5 t=781: loadTranslator('qt', 'it')
##P5 t=781: Translation filename: 'qt_it'
##P5 t=781:  ... NOT FOUND
##P5 t=781: loadTranslator('qt', 'it_it')
##P5 t=781: Translation filename: 'qt_it_IT'
##P5 t=781:  ... NOT FOUND
##P5 t=781: loadTranslator('umtsmon', 'it')
##P5 t=781: Translation filename: 'umtsmon_it'
##P5 t=781:  ... NOT FOUND
##P5 t=781: loadTranslator('umtsmon', 'it_it')
##P5 t=781: Translation filename: 'umtsmon_it_IT'
##P5 t=781:  ... NOT FOUND

As you can see, umtsmon tried really hard to find an Italian translation, but didn't find one. In that case, you'll need to create one.

Modify existing translations

If you want to work on the existing translations, you have to work on the current development version. That will mean first getting the latest CVS snapshot and then work from there:

  • We need to login into the CVS server.
    mkdir sandbox
    cd sandbox
    cvs -d:pserver:anonymous@umtsmon.cvs.sourceforge.net:/cvsroot/umtsmon login
    

    The cvs command will ask you for a password. Just hit return.

  • Now we can get the most recent files:
    cvs -z3 -d:pserver:anonymous@umtsmon.cvs.sourceforge.net:/cvsroot/umtsmon co -P umtsmon
    
  • then do this (in the below example for the dutch language):
    cd umtsmon
    qmake
    lupdate umtsmon.pro
    linguist i18n/umtsmon_nl.ts &
    

    The last command will start QT Linguist, the tool to use for translations. Obviously, you will want to replace the nl with your language ID. Please then go to the help page of Linguist and read the (rather short) explanation on how to do translations.

  • Of course you should test your translations - do all menus and dialog texts still fit? What about the accelerator keys? Is it clear? this is how to do that:
       lupdate umtsmon.pro
       lrelease umtsmon.pro
       export LANG="nl"
       ./umtsmon
    
    (Don't forget to replace "nl" with your language ID)

  • If you think you have enough (you don't have to do everything on your first attempt - AND DON'T TRANSLATE THE GPL LICENSE) you can e-mail your umtsmon_*.ts file to the umtsmon-i18n@lists.sf.net mailing list.

    As translations are usually quite easy to add, they should be in CVS in no-time. You should be notified when that happens.

Adding a new language

If your umtsmon_*.ts file doesn't exist yet, it needs to be in CVS before you can work on it. You will have to e-mail umtsmon-i18n@lists.sf.net and wait for Klaas to create your language file in CVS. If multiple people want to do the same language we'll split the job :-D

Make sure you also supply a line to define how you want to see your contribution in the AUTHORS file.

This is your time to contribute to umtsmon - eternal thankfulness from all umtsmon users will be yours!

Thanks!

Klaas.


 
 
UMTSmon (C) 2006,2007,2008 Klaas van Gend and others, licensed under the GPL v2 license hosted by SourceForge.net: Sponsored by NLNet Foundation:
  Get control/monitor your UMTS card at SourceForge.net. Fast, secure and Free Open Source software downloads NLNet Logo