[Rt-devel] Fwd: Changing digits

Mostafa Hajizadeh mostafa.h at gmail.com
Mon Aug 24 12:46:31 EDT 2009


>> 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.)
>
> 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 :/
>
I'm glad that you care that much about i18n. I don't have any concrete
idea about what to do with the numbers, but I'll try to find things
out and see if I could do something. I will surely send you a patch if
I came up with anything useful.

> 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.
>
Sure thing, but my translation isn't finished yet. I was planning to
submit it after I've finished all the messages. It's almost done now
and I'll submit in a few days.

Also, I've done a few other things that I'd like to submit, if they're
useful to anyone and could be accepted by RT:

1. Persian (like Arabic and Hebrew) is a right-to-left script and
displaying RTL scripts in a LTR manner isn't acceptable. I made a new
theme, named 'web2-rtl' that's a RTL version of the default theme.

2. I added a new date format, named Persian, and added a new file,
Date_Local.pm, with the Persian function that would show Persian
dates. I also changed CalPopup.html so that it'll draw Persian
calendar if the date format is set to 'Persian'. By clicking on any
date it'll insert it's equivalent Gregorian in the related text box.

Also I'm planning on adding a direction (LTR, RTL) button to the
WYSIWYG editor, but I've not done that yet.

BR,
Mostafa

> Best,
>
> Jesse
>>
>> Mostafa
>


More information about the Rt-devel mailing list