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