[Rt-devel] Fwd: Changing digits

Jesse Vincent jesse at bestpractical.com
Sun Aug 23 18:04:29 EDT 2009


> Hi Jesse,
> 
> In some applications, everything's done at the module that loads
> translations and renders variables into messages. We usually add a few
> lines of code to that section. (In Perl it's just tr/0-9/۰-۹/)
> 
> The part that renders variables into messages (like %1 in "%1
> tickets") checks for the language and if it's "fa" changes the digits
> of the number variables from default to Persian.
> 
> I guess that's the way that it should be done for RT too, but since RT
> is using a templating system I don't know where all these things
> happen. I tried changing digits at Interface::Web::loc, but it doesn't
> change all the numbers because some numbers aren't passed to
> the loc. (They're just numbers, no text.)
> 
> FYI, there was a game which had 10 messages for "0" to "9" that would
> be translated by the translator! I don't remember exactly, but I guess
> it was Frozen Bubble!

It's a fascinating problem. Locale::Maketext::Lexicon is the right level
to fix this, rather than loc() in RT::Interface::Web. But you're right.
we don't currently localize output of all integers. I'd take patches
toward improving that. I'm sorry it hasn't ever come up before :/

In the meantime, would you be up for submitting your base translations
to rosetta? I'm betting that an all-but-numbers transation is better
than no translation.

Best,

Jesse
> 
> Mostafa


More information about the Rt-devel mailing list