Tuesday, November 18, 2008

wxBanker 0.4 released!

Today I released a new version of wxBanker, which is a lightweight personal finance manager. It is basically a digital checkbook register for multiple accounts; think of GnuCash but easier and more lightweight. It is written in Python/wxPython and runs on Linux, OSX, and Windows. Check out my previous post on wxBanker for a slightly more in depth functionality overview and screen shots.

The main focus of this new version was localization. It now ships with translations for 8 languages (4 of them basically complete, thanks translators!), and also supports displaying the amounts in currencies other than USD including EUR and GBP. It also sports a few of the typical bug fixes / usability improvements you would expect in a new release.

Another feature new to 0.4 is a setup.py, which allows Linux users to install it easily by running "sudo python setup.py install" in the folder, and wxBanker will install itself including a shortcut in Applications -> Office in Gnome, and store your data in ~/.wxbanker. If you are upgrading from a previous release, I recommend moving your bank.db file to ~/.wxbanker/bank.db for the easiest transition, which will also future-proof you from needing to shuffle it around in the future!

I also thought I'd highlight the launchpad integration I added awhile ago in 0.3, since I saw a recent planet post regarding Inkscape doing something similar. In the Help menu I've added convenient links to view and ask questions, and report bugs:


If you have been looking to start taking control of your finances, give wxBanker a try: https://launchpad.net/wxbanker/trunk/0.4 (or 'bzr co lp:wxbanker -r 86' for the seasoned). If you find problems or have ideas, please let me know via launchpad bugs/blueprints, blog comments, or email; if you know another language, help translate by following the Translations link on Launchpad! And remember, when you use wxBanker to count your pennies, the dollars will follow!

Tuesday, November 11, 2008

Zen and the Art of Memes

I wouldn't normally have participated in the nearest book meme going around on Planet Ubuntu, except that sentence 5 of page 56 of the nearest book happened to be divine! From Alan Watts' "The Way of Zen":

Suffering alone exists, none who suffer;
The deed there is, but no doer thereof;
Nirvana is, but no one seeking it;
The Path there is, but none who travel it.

It happened to stumble perfectly on the closing quote of that particular paragraph! If you want to participate:
  1. Grab the nearest book.
  2. Open it to page 56.
  3. Find the fifth sentence.
  4. Post the text of the sentence in your journal along with these instructions.
  5. Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

Wednesday, November 5, 2008

Microphones (and Rosetta Stone 3) in Wine

Recently I had an urge to brush up on my Spanish and thought I would try Rosetta Stone, however there is no Linux version. I thought instead of "messing around" with Wine I'd just install VirtualBox and use an XP Pro instance. Everything worked alright but the memory and CPU overhead was a little too much for my machine (1.7GHz Pentium M, 1GB DDR). It would run out of memory and thrash the HDD like crazy if almost any other program was running in Linux, defeating a large part of the advantage of virtualizing Windows in the first place.

So then I read in Wine's AppDB that Rosetta 3 seemed to work alright with recent versions, so I gave it a shot and it indeed installed perfectly with Wine 1.1.7 (using the PPA in Intrepid). The best part is that Rosetta uses a single sqlite3 database to track users' progress, so all I had to do was copy that over from the VM and all my progress and history was there in my Wine install!

But then came the problem: I couldn't get my microphone to work! It worked fine in the VirtualBox setup so I knew my hardware was fundamentally compatible. I then tried as many permutations of the follow settings as I could think of:
  • changing Wine to ALSA or OSS drivers
  • enabling and disabling all sorts of ALSA and OSS levels and captures in Volume Control
  • running Wine via `padsp`
Finally I came across an ubuntuforums thread where someone's solution to getting their microphone working with Wine was setting Wine to use OSS and then:
  1. killall pulseaudio
  2. aoss wine program.exe
And that worked for me! I was so full of joy. However, I am a little worried about what consequences killing pulse will have on the system for the duration of the session, and I don't really understand what aoss does. Can anyone enlighten me on why pulseaudio is a part of the problem here, and why aoss is necessary? This was a very helpful solution to me and thought it might be useful to others as well, but does anyone know of a better way that might co-exist with pulseaudio?

Sunday, November 2, 2008

L10N: Integrating translations into your project

This post is the second half of my series on internationalization and localization; that is, making applications accessible to non-English speakers. I am going to assume now that you have followed the instructions in the first post , and have internationalized your source, put the translation template up on Launchpad, and hopefully have a translation or two.

Since my last post, many people donated their time to translate my project wxBanker, and I have 7 translations in Launchpad now! (If anyone wants to add more, please do so, and I'll put you in the credits.) Now I'll outline the steps for actually integrating these translations into your project.

  1. Download the translations. Visit the translations page for your project in Launchpad, and click the "Download translations" link on the right. From here ensure "Everything" is selected, and change the Format to "MO format". This format is what the gettext framework we are using utilizes. Now click "Request Download". They won't typically be available immediately, but you should receive an e-mail in an hour or so with a link to the file.

  2. Once you receive the email from Launchpad, download the linked file. You should now have launchpad-export.tar.gz. Right click on it and "Extract Here". Rename the resulting "launchpad-export" folder to something like "locales", and put it in your project directory.

  3. Now all you have to do is tell gettext where the translations are. Previously we installed gettext via a line like gettext.install("wxbanker"), and now all we need to do is pass in the directory as a second argument. So assuming you renamed the launchpad-export directory to "locales" and put it in the directory of your source code, you'll change it to gettext.install("wxbanker", "locales"). This isn't the most robust and flexible way to do this, and I would recommend checking out my localization.py link below for a better example, especially if you are going to be doing this for a python application.
Now, assuming you followed all the steps in the previous post and this one, your application should be completely localized and run in the native language of the person using it! If you want to see the translation yourself, check out my own version of localization.py, which allows you to pass in the language code corresponding to the subdirectory of the locales directory, such as "--lang=es" for Spanish.

In a day or two I will also add a post on how to actually install other locales in Ubuntu and run your application in it, so that you can ensure you are seeing exactly what someone from that locale sees.

Congratulations on a localized application! Any questions?