[OSM-dev] osm.org userpage broken with farsi localization?

Claudius claudius.h at gmx.de
Wed Apr 7 13:56:12 BST 2010


Am 07.04.2010 14:42, Tom Hughes:
> On 07/04/10 13:23, Claudius wrote:
>
>>> The day names we have are:
>>>
>>> ["ی", "د", "س", "چ", "پ", "ج"]
>>>
>>> for Sunday through Friday - can you let me know if those are right, and
>>> what the name for Saturday should be? Then I can fix it...
>>
>> Thanks for looking into it. Saturday is "شنبه" so the full list should be:
>>
>> ["ی", "د", "س", "چ", "پ", "ج","ش"]
>>
>> Mind that this array is to be accessed right-to-left and I don't know if
>> that's preserved over this ML. So the first day (Sunday) would be "ی"
>> and the last "ش".
>
> OK, the whole LTR vs RTL thing is getting confusing here ;-)
>
> The array should be sun, mon, tue, wed, thu, fri, sat. The corresponding
> full names that we have are:
>
> ["یکشنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه"]
>
> so I need to add "ش" but the only question is which end I add it at?
>
> You can see it in context at vendor/plugins/rails-i18n/locale/fa.yml in
> the rails port code.

That line should run:

     abbr_day_names: [ی, د, س, چ, پ, ج, ش]

Can we somehow push that fix upstream or is this a local plugin?

>> And while you're at it: In app/views/layouts/site.html.erb the html-tag
>> on the second line has a parameter for the text direction:
>>
>> dir="<%= t'html.dir' %>"
>>
>> in the output this is filled with "ltr" but I cannot find that string
>> "html.dir" in the locales YML nor in the translatewiki. Where does it
>> come from?
>
> There should be an html.dir key - it exists in the en version...

Indeed. It seems all localizations except the english base file are 
missing these first lines:

   html:
     dir: ltr
   time:
     formats:
       friendly: "%e %B %Y at %H:%M"

Any idea how to get this pushed to translatewiki?

Claudius





More information about the dev mailing list