RFC: Rails i18n vs. gettext_i18n_rails

Hugh Brock hbrock at redhat.com
Fri Apr 20 19:52:02 UTC 2012


On Fri, Apr 20, 2012 at 11:27:34AM -0400, Matt Wagner wrote:
> Hi all,
> 
> As we look at sharing portions of our UI with the Katelo project, one
> thing that has come up is that we use different internationalization
> libraries. I wanted to share what I've found and solicit feedback on how
> we should proceed.
> 
> Right now, we use the built-in i18n gem and Rails functionality. Katello
> uses gettext_i18n_rails[1]. There are a few key differences that keep
> them from being interchangeable. They have flat .po files and translate
> text by running something like #{_("Some string to translate")}, versus
> our #{t("some.string.with.dots")} with nested yaml.
> 
> I do think that their method has a few advantages:
> * They use .po files, which should work seamlessly with Zanata. Our
> * language files seem to take some manual effort to import to/export
> * form Zanata.
> * As flat files, their files are less likely to have duplication. We
> * have pools.pools as "Pools", but "breadcrumbs.pools" is also "Pools".
> * (As an arbitrary example.) This isn't the end of the world, though.
> * We would gain similarity with our sister project, and could see
> * benefits such as being able to borrow their Javascript i18n
> * implementation (!).
> 
> Of course, there are also some disadvantages:
> * Changing our libraries would be a lot of work that I really don't look
> * forward to.
> * gettext_i18n_rails is another dependency we'd have to add. (Though
> * it's already packaged, since Katello has been using it for a long
> * time.)
> 
> Right now, the only place this matters is in a couple copyright-type
> strings in the footer, so it seems like an exorbitantly huge amount of
> work just for that. But I think there's also benefit in switching to
> something consistent. The question to me is whether it's worth the large
> switching cost. Anyone want to weigh in?
> 
> -- Matt
> 
> 
> [1] https://fedorahosted.org/katello/wiki/I18N

My off-the-cuff opinion is that we can defer this until it becomes a
real nuisance. We've got enough to do...

--H

-- 
== Hugh Brock, hbrock at redhat.com                                   ==
== Engineering Manager, Cloud BU                                   ==
== Aeolus Project: Manage virtual infrastructure across clouds.    ==
== http://aeolusproject.org                                        ==

"I know that you believe you understand what you think I said, but I’m
not sure you realize that what you heard is not what I meant."
--Robert McCloskey



More information about the aeolus-devel mailing list