Articles tagged with: plugin

A Rails plugin to use core translations

Posted by Andreas on Tuesday, August 11, 2009 at 06:10 (CEST)

If you’re writing an i18n-enabled Rails application, you have to deal with the translation of your own application as well as with the translation of several Rails core strings (like validation error messages, date formats, and so on). You usually don’t need to translate the Rails core strings yourself, since there’s a big repository of user-contributed core translations you can pull into your application. However keeping this translations up to date in your application can quickly become cumbersome.

For this reason, I refactored the rails-i18n(*) repository a while ago and made it a Rails plugin. You could install the plugin to your application and it provided Rails core translations for you. Unfortunately it became annoying to keep the fork up to date with the latest translation changes since every rebase or merge was a pain because of the moved file locations.

So my latest solution is another small plugin called rails-i18n-updater, which does not contain the translations itself but downloads them from the above mentioned repository of core translations.

Read more »

CSS Naked Day 2009: a Rails plugin

Posted by Andreas on Saturday, February 28, 2009 at 13:01 (CET)

On April 9th 2009, the fourth CSS Naked Day event will take place. The idea behind this event is to promote web standards (like proper semantic markup and a good hierarchy structure). On April 9th, participants are encouraged to completely remove all stylesheets from their site, stripping it entirely of its design. If your site has proper semantic markup, it’ll stay well usable and understandable even without styles. If not, you better hide and don’t take part in this event :)

To make it as easy as possible, I created a little Rails plugin that, once installed to an app, simply disables the stylesheet_link_tag helper for the duration of the event. It’s as easy as install and forget (assuming that you used stylesheet_link_tag in your layouts and didn’t add inline styles or stylesheet links manually).

So let’s see how many sites will join this funny but yet expressive event this year. It’s time to show off your <body> ;-)