Simple WxRuby application


Update: This application uses the old wxRuby, for a more up to date example see the editor in wxRuby series. However, the RubyScript2Exe parts should still apply as is since that logic is separate from the GUI logic.

Download source here.

This is an example of a small desktop app that will make your life easier if you are doing a lot of multi language sites with the Zend Framework. It will parse your project for instances of _(”language_key”) in *.php files and instances of {insert name=”tr” key=”language_key”} in Smarty templates with the extension *.tpl. It will update your *.csv files with new translation keys and remove unused keys.

It uses Wxruby and WxSugar to render the interface and RubyScript2Exe to create a standalone executable. I haven’t included RubyScript2Exe in the zip, just use the link above and put the script in the same folder with the rest of the source.

When you have all you need you can run the following in the extracted directory to create the executable:

ruby rubyscript2exe.rb main.rb –rubyscript2exe-rubyw

After running that the app should show, just close it and wait for the ruby2exe script to finish.

The sources should be commented so you can follow what is going on.

Enjoy!

Related Posts

Tags: , , , , , ,