spemmons/i18n-active_record — pull request #2 by afast (2013-04-12 22:10:37+00:00)
Title: Fix issue when using mysql under seamless_database_pool

When using the seamless_database_pool it masks the use of mysql2
This change correctly identifies the translation that should be used
without depending on the hack.

Fast Track Fleet is now using seamless_database_pool so the initial mysql hack you added in translation doesn't work anymore. I don't feel that there is a reliable and robust way to determine the underlying database with this setup. So instead I changed the code a bit to do the same thing conceptually but in a way that looks for all elements in the returned array instead of only the first.

The case is having for example:
```ruby
I18n.t 'Add new'
I18n.t 'Add New'
```
If the registry for 'Add New' is first, mysql will return it first. So when translating 'Add new' it will return 'Add New' first and the key does not match in ruby. But the second record does.

I you have any question please ask and I'll try to explain.