How to translate your column fields and values with gettext in ruby on rails


I am proud to have published my first useful ruby gem.
It is called gettext_column_mapping, you can check out the code in my github repository.
I already released it as a gem through gemcutter/rubygems

It is based upon Masao Mutoh (gettext and gettext_active_record) and Michael Grosser (fast_gettext and gettext_i18n_rails) works.

Thanks to them :)

History

In my company we need a mean to translate bad written fields/table name in our database. Why ? because our applications are internationalized and we need to have cleaner name than “libelle” (the french word standing for label) to send to translators.

We also have some “constants” name saved in our tables so we need to translate them.

Then started this library a year ago.

Formerly, it was a library that depends on Rails … But I decided that it ccould be nice if it reaches these requirements :

  • Use of Rubygem to spread it more easily
  • Must be Rails agnostic
  • Can use either mutoh’s gettext or grosser/fast_gettext
  • Can be implemented easily on rails 2.3.x and 3.0 or other ruby web framework
  • Can have some built-in configurable rake tasks

All is done!

But now I would like to improve this gems (API, tests, documentation, implementation) , so if someone who reads this post can help … I must remind you that this project is open source. Partly, it has been developped at work but I burnt most many hours of my sparetime than at work

TODO ?

  • other database implementation (only mysql for now)
  • ORM agnosticism ?
  • More testing
  • More documentation
  • Rails < 2.3 compatibility backward
  • … and so many

Try it and give me feedback

, , , , , , , , , , ,

  1. No comments yet.
(will not be published)