[Catalyst-dev] I18N fallback to i-default

Octavian Rasnita orasnita at gmail.com
Mon Jul 6 09:43:48 GMT 2009


From: "Ton Voon" <ton.voon at opsera.com>
> Hi!
>
> As part of internationalisation for Opsview (http://opsview.org), I've
> come across a limitation in the lookup of translated messages.
>
> We've decided to use arbitrary keys as the message keys, rather than
> the English text, but i-default 
> (http://www.iana.org/assignments/lang-tags/i-default
> ) is not used by Maketext as the basis for all other languages, so we
> get web pages that say "ui.messages.hostIsDown", rather than the
> fallback English translation.
>
> After a lot of debugging through, I've found this is a limitation of
> Locale::Maketext::Simple, which Catalyst::Plugin::I18N uses.
>
> The patch for Locale::Maketext::Simple is raised here: 
> https://rt.cpan.org/Ticket/Display.html?id=47609
>
> I've attached a patch to the tests in Catalyst::Plugin::I18N with a
> tarball containing an i_default.po file which demonstrates the problem.
>
> Is this a valid and/or useful?
>
> Ton

I don't know if this fixes the same issue I had some time ago, but if it 
does, it is really helpful.

I've also used some short keys in the .po files instead of a long message, 
like:

msgid "message1"
msgstr ""
"Here is\n"
"The message\n"
"that should be translated"

or

msgid "message1"
msgstr "A message with [_1] parameters [_2]"

But the translated messages weren't translated as it should.

Octavian








More information about the Catalyst-dev mailing list