[PyPalm] 0.20.17 released

26 01 2010

Today I released PyPalm version 0.20.17 and it adds one bugfix and one feature:

The bugfix fixes the issue that one could encode the $L() call with single quotes instead of double quotes – both can now be used. The feature was proposed by Johan in the comments of this entry and adds a default text (which is the key) for each untranslated item and prepends the key with “_%_” so that when preparing your application for translation you see if you found every string that needs localization.

As a last step I added backwards compatibility for all those people without Python 2.6 and no built-in json support. If you have at least simplejson installed everything should be fine.

But please, feel free to report any bugs!





[PyPalm] PyPalm 0.20.10 adds localization support

1 01 2010

As a short new years present I upgraded PyPalm to version 0.20.10 🙂 and added scene and localization support. The first one comes handy when creating new scenes for the application. To add a new scene to your application call the following command from your terminal

pypalm new_scene MySceneName

where MySceneName is the name for your new scene. The second new feature of PyPalm is more important and even more helpful. When developing applications, especially web and mobile applications, customers are often scattered around the globe and localization is a key factor for the success of an application. The Mojo toolkit of Palm supports localization via the $L() method and integrates nicely into the application. But what is still missing is the possibility to extract the referenced keys automatically! PyPalm adds this featured and supports direct language integration with automatic creation and update of the referenced language files.

To configure your application for localization add the “languages” key to your framework_config.json file and add all languages you want to support.

{
  "languages" : ["de_de"]
}

In the example above the configuration supports German in addition to the original language. Now execute PyPalm localize on your command line

>> pypalm localize
Updated de_de
>>

For all configured languages the necessary strings.json file will be created and already existing files will be merged with the updated ones from the current parse run of the application.

The source code is available as open source at Github and if you have any questions or feature requests don’t hesitate to drop me a note. If you want to install PyPalm and need a short introduction, check this blog post.

– Martin (grundprinzip)





PyPalm for Palm webOS development

18 12 2009

In the recent days I had the chance to get my hands on a Palm Pre and sure this device may not be as feature complete as Apples iPhone but the UI is appealing and it brings some new UI concepts into the game. The development environment is really nice since the Palm emulator is not homegrown piece of software but a plain small linux that boots into a browser using VirtualBox as a virtualization solution.

Now the developer can choose between using either his editor of choice and the supplied command line tools or use a plugin for Eclipse that was developed by Palm. From my point of view this gives the developer a real freedom to choose whatever development workflow he likes and does not force him into new IDEs where you have to start learning your work environment from the beginning.

However the command line tools have a little shortcoming as they do not derive information from the appinfo.json that is available in the application directory. For me the first thing I created was a deploy bash script that would allow me to package, build and deploy to the virtual machine in one step. Again the issue was that already available information about the application from config files was not derived.

So I started writing a small command line application called PyPalm in Python that would allow all that what I mentioned above and regroup the Palm tools together.

To install PyPalm just open a terminal and use easy_install or pip to install the package via the command:

sudo easy_install pypalm

As soon as this is completed you can enjoy the full power of PyPalm. Just change to your applications directory and execute

pypalm --help

to get an idea of the supported commands. When you now execute

pypalm deploy

it will automatically determine the current version and ID of the application from the configuration file and package your application plus installing it to the VM or the attached phone.

Neat, isn’t it?

Currently the feature set is kind of small but there can be more (generators,…). If you have any ideas please feel free to leave a comment.

-Martin