andreazaupa/rails_admin_globalize — pull request #12 by tagliala (2014-12-15 18:32:06+00:00)
Title: fixes not yet translated locales

Apparently, `object.available_locales` only returns translated fields for the specified object.

```rb
[1] pry(main)> I18n.default_locale
=> :it
[2] pry(main)> I18n.available_locales
=> [:it, :en, :de]
[3] pry(main)> Page.first.available_locales
Page Load (0.3ms) SELECT `pages`.* FROM `pages` ORDER BY `pages`.`id` ASC LIMIT 1
Page::Translation Load (0.3ms) SELECT `page_translations`.* FROM `page_translations` WHERE `page_translations`.`page_id` = 1
=> [:it]
```

So in the globalize panel you will never see the "en" and "de" options to translate.

This PR does not use object.available_locales and also maps `@available_locales` to strings for a proper execution of `@not_yet_translated_locales = @available_locales - @already_translated_locales`