[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)




10 responses

4 01 2010

Nice job on the videos, I’ll be playing around with this tool.

Might I ask what OSX plugin you are using to automatically blur the non-focused windows on your desktop?

4 01 2010

I made the screencast with ScreenFlow. When you are editing the video you can add a special video action to dim the background windows and apply a blur filter.

22 01 2010
Dirk Bergstrom

Thanks, this is great news. I was going to write a localization helper script this weekend, since two people have offered to translate Keyring into German. Now I don’t have to, and I can get things moving that much faster.

I’ll have a look at your code, and send you a patch if there’s anything useful I can add.

22 01 2010

Thank you, if you have any feature requests let me know.

26 01 2010

A feature that would be really cool would be to allow creation of ‘xx’ stub translations, (that is, same string but a few characters prepended) as a step in verifying that all strings are translated before sending it off to the person doing the translations.

26 01 2010

That’s a nice idea. I think I can work it into the code. I’ll keep you posted as soon as it is available.

26 01 2010

Also noticed that your regexp only matches on $L(“”) and excludes $L(‘ ‘).

Love your tool, thanks!

26 01 2010

@Johan, I fixed the bugs and now every string to be localized is prepended with _%_ so that it is easier to see.

26 01 2010
[PyPalm] 0.20.17 released « Punch Card

[…] 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 […]

29 07 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: