[nvda] Re: Where went the messages files to?

Hi Cleverson,

NVDA is currently moving over to using gettext (a commonly-used way of managing internationalization in free/open-source software).

I ended up finding out that my old lang implementation had some problems with the encoding of files etc, it just got too messy.

In the source code of NVDA, now all strings that should be translated are surrounded by a _() function, for example _("this should be translated").

Then the python gettext module at run-time replaces these strings with the appropriate translation.

For all this to work, a file of strings to translate must be produced, then this file must be filled in with the appropriate translations, and then a binary version of this file must be generated for gettext to actually use at run-time.

To generate a file of current translation strings,

run pygettext.py *.py *\*.py

When in the NVDA source directory.

pygettext.py is in the tools/I18N directory with in your python installation.

This will create a file called messages.pot.

You then edit this file with your translations and save it as a .po file which you then compile in to a .mo file with msgfmt.py which is also in the tools/I18N directory.

I can't really say too much more on this because I myself havn't really used this much before, but because a lot of software uses this way, I would suggest that hopefully in the long run it will be much much easier to keep translations up to date, plus there should be plenty of documentation around to explain how to do it all.

I think this way also you will have control over what character set you use to write the translations because I assume that msgfmt.py can convert your specified character set in to unicode, or perhaps gettext does it at run-time, I'm not sure.

Have a play with it and see if you have any success.

I'm also not sure exactly where you end up putting the .mo files, but I'll have a bit of an investigate, or if you find out anything, please let me know.

Mick






----- Original Message ----- From: "Cleverson" <clever92000@xxxxxxxxxxxx>
To: "NVDA" <nvda@xxxxxxxxxxxxx>
Sent: Friday, December 01, 2006 11:44 AM
Subject: [nvda] Where went the messages files to?


Hello,

Some weeks ago, I translated the files in the old lang directory to
Brazilian Portuguese, my native language.

After all the last changes, I didn't find where are the NVDA messages
spoken at the menus, dialogues, etc. Should these files be created
again? How can I translate those messages?

Thanks,
Cleverson



_______________________________________________________
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!
http://br.mobile.yahoo.com/mailalertas/


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To unsubscribe from the list send a blank message to:
nvda-request@xxxxxxxxxxxxx
with 'unsubscribe' in the Subject field.
Thank you for your continued support of Nonvisual Desktop Access, an open source free screen reader for Microsoft Windows:
http://www.kulgan.net/nvda/


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To unsubscribe from the list send a blank message to:
nvda-request@xxxxxxxxxxxxx
with 'unsubscribe' in the Subject field.
Thank you for your continued support of Nonvisual Desktop Access, an open 
source free screen reader for Microsoft Windows:
http://www.kulgan.net/nvda/

Other related posts: