Complex Script is Now Supported? :D AWESOME!

15 views
Skip to first unread message

LeoMoon

unread,
Oct 8, 2011, 2:46:49 AM10/8/11
to Blender translation
Hello,

Now that complex script is now supported with right-to-left (I saw the
Arabic example) I want to start the translation for Farsi. Code for
Farsi is "Fa".

Can somebody point me to the right direction on how to start?

Thank you for your hard work.

Ethan Luo

unread,
Oct 8, 2011, 3:15:18 AM10/8/11
to blender-t...@googlegroups.com
Hi Amin,

I think you can just create a new folder there in branch and start the translation work first. Need to discuss with Dailai how we can process to add a new language in Blender via script. 

FYI

(1) run update_msg.py (it needs compiled Blender)
(2) run update_pot.py - gather the latest strings from Blender
(3) run update_po.py - sync in the new changes from trunk
(4) run clean_po.py - remove the no longer needed msgstr/msgid
(5) run merge_po.py to bring the new .po file into trunk's .po

Regards,
M: (86)158-5051-1795(GMT+8)
@congcong009 #twitter/facebook/新浪围脖
BlenderCN中文社区(www.blendercn.org)

Dalai Felinto

unread,
Oct 8, 2011, 7:30:35 PM10/8/11
to blender-t...@googlegroups.com
Hi,

Blender doesn't support left oriented languages directly. What we are doing for arabic is to "reverse" the "letters" and converting to the char that has the position "hardcoded" (so they write correctly). It's not 100% either.

It seems that Farsi is a variation of Arabic, is that right? If so it should be possible to do the same hack there. I can help with that (or what may be better, you could ask Yousef Hurfoush to adapt the flip arabic to Parsi).

If you want a fresh fa.po to start translating you can get it here:

Once we have the flipping system working for Farsi as well we can make Blender to support fa_IR.

--
Dalai

2011/10/8 Ethan Luo <congc...@gmail.com>

LeoMoon

unread,
Oct 8, 2011, 7:45:13 PM10/8/11
to Blender translation
Yea reversing should work fine. Some characters are different in Farsi
but the general system is the same. Tnx for the PO file. I'll start
translating.

Is the python file below the one that reverses letters?
http://dl.dropbox.com/u/3292898/arabic/arabic_to_utf.py

On Oct 8, 4:30 pm, Dalai Felinto <dfeli...@gmail.com> wrote:
> Hi,
>
> Blender doesn't support left oriented languages directly. What we are doing
> for arabic is to "reverse" the "letters" and converting to the char that has
> the position "hardcoded" (so they write correctly). It's not 100% either.
>
> It seems that Farsi is a variation of Arabic, is that right? If so it should
> be possible to do the same hack there. I can help with that (or what may be
> better, you could ask Yousef Hurfoush to adapt the flip arabic to Parsi).
>
> If you want a fresh fa.po to start translating you can get it here:http://dl.dropbox.com/u/3292898/arabic/fa.po
>
> Once we have the flipping system working for Farsi as well we can make
> Blender to support fa_IR.
>
> --
> Dalai
>
> 2011/10/8 Ethan Luo <congcong...@gmail.com>
>
>
>
>
>
>
>
> > Hi Amin,
>
> > I think you can just create a new folder there in branch and start the
> > translation work first. Need to discuss with Dailai how we can process to
> > add a new language in Blender via script.
>
> > FYI
>
> > (1) run update_msg.py (it needs compiled Blender)
> > (2) run update_pot.py - gather the latest strings from Blender
> > (3) run update_po.py - sync in the new changes from trunk
> > (4) run clean_po.py - remove the no longer needed msgstr/msgid
> > (5) run merge_po.py to bring the new .po file into trunk's .po
>
> > Regards,
> > *罗聪翼/Ethan Luo* <congcong...@gmail.com>
> > *M: (86)158-5051-1795(GMT+8)*
> > ***@congcong009 #twitter/facebook/**新浪围脖*
> > ***BlenderCN**中文社区**(**www.blendercn.org**)*

Dalai Felinto

unread,
Oct 10, 2011, 11:16:20 PM10/10/11
to blender-t...@googlegroups.com
> Is the python file below the one that reverses letters?
http://dl.dropbox.com/u/3292898/arabic/arabic_to_utf.py


This is the one I'm using yes. It differs a bit in the result than the .Net version maintained by the Arabic team. But the results are pretty close.

2011/10/8 LeoMoon <leo...@gmail.com>

Dalai Felinto

unread,
Oct 11, 2011, 12:39:44 AM10/11/11
to blender-t...@googlegroups.com
Hi 

While googling to read more about Farsi I ran into that:

I wonder if this is actually an issue. As in, should we call it Persian instead of Farsi?
And is this the right name of the language in farsi/Persian? فارسی 
I was to add the needed files in blender code but need to figure those out first.

Cheers,
Dalai

2011/10/10 Dalai Felinto <dfel...@gmail.com>

Amin Babaiepanah

unread,
Oct 11, 2011, 12:50:28 AM10/11/11
to blender-t...@googlegroups.com
There are lots of resources that are denying each other but from what I know the real name is "Parsi" then in Arabic became "Farsi" cuz they don't have "P" or "پ" so it became "Farsi" and finally "Persian" is the English version of "Parsi" which originates from the old name "Persia".

In programming the code for it is "fa". But we can display it as "Persian (Farsi)" or "Persian (فارسی)".

Best regards,
Amin Babaeipanah
---------------------------------------------
LeoMoon Studios
http://LeoMoon.com
---------------------------------------------
http://ArtisGeek.com
http://LoveIsComix.com
http://PersianRead.com
---------------------------------------------

Amin Babaiepanah

unread,
Oct 11, 2011, 1:00:30 AM10/11/11
to blender-t...@googlegroups.com
I've also made a map of all the characters in Farsi so we can make another python file (or add the extra characters to the existing one if possible) for Farsi to reverse the characters. Please see the attached text file (It's UTF-8).

Best regards,
Amin Babaeipanah
---------------------------------------------
LeoMoon Studios
http://LeoMoon.com
---------------------------------------------
http://ArtisGeek.com
http://LoveIsComix.com
http://PersianRead.com
---------------------------------------------



On Mon, Oct 10, 2011 at 9:39 PM, Dalai Felinto <dfel...@gmail.com> wrote:
farsi-map.txt

Dalai Felinto

unread,
Oct 12, 2011, 2:21:43 AM10/12/11
to blender-t...@googlegroups.com
Hi Amin, I added Persian (...) there.

For the "Language Selection" interface I flipped both Arabic and Persian names (so they show up correctly). I used the Arabic script for the Persian. Let me know if they look ok:


"I've also made a map of all the characters in Farsi so we can make another python file (or add the extra characters to the existing one if possible) for Farsi to reverse the characters."

Great. Given that there are changes (and not only added letters) I think it's better to keep farsi as a separate script for now.

I was looking here. Is there any other resource you suggest?

The current version of the script is here:

The script should be clear enough for a programmer/farsi speaker.
It takes every letter, calculate their position (isolated, beginning, middle, end) and returns the absolute utf-8 representation of it.

In the beginning of the file we have the unicode/utf-8 representation of the letters in their absolute position (range \ufe81 ~ \ufefc).

The letters used in the long if/elif sequence are the non-absolute form of the letters (\u622 ~ \u644).

Regards,
Dalai

2011/10/10 Amin Babaiepanah <leo...@gmail.com>

Amin Babaiepanah

unread,
Oct 12, 2011, 4:13:47 AM10/12/11
to bf-transl...@blender.org, blender-t...@googlegroups.com
Awesome. I looked at the Arabic python script and it was kinda easy to understand. I'll try to make a Persian one out of that. The best thing about the script is that is using the characters themselves instead of hard coded glyph numbers.

"For the "Language Selection" interface I flipped both Arabic and Persian names (so they show up correctly). I used the Arabic script for the Persian. Let me know if they look ok:"
‫(فارسی) Persian
... is missing the last character "ی".

Right now in that picture the text is like:
‫فارس

Here is the full word:
‫(فارسی) Persian

Or:
‫Persian (فارسی)

Selecting the text above is very hard so I've attached 2 text files so you can just press Ctrl+A and Ctrl+C.

"I was looking here. Is there any other resource you suggest?"

Best regards,
Amin Babaeipanah
---------------------------------------------
LeoMoon Studios
http://LeoMoon.com
---------------------------------------------
http://ArtisGeek.com
http://LoveIsComix.com
http://PersianRead.com
---------------------------------------------



On Tue, Oct 11, 2011 at 11:24 PM, Dalai Felinto <dfel...@gmail.com> wrote:
CC here since this is the new list ...
_______________________________________________
Bf-translations-dev mailing list
Bf-transl...@blender.org
http://lists.blender.org/mailman/listinfo/bf-translations-dev


farsi01.txt
farsi02.txt

Amin Babaiepanah

unread,
Oct 12, 2011, 4:17:32 PM10/12/11
to bf-transl...@blender.org, blender-t...@googlegroups.com, Ali Mohazab
I modified the "arabic_to_utf.py" for Persian. I don't know how to compile Blender in Windows to test it. I've attached the "persian_to_utf.py" to this email with fa.po file at 2%. I'll continue with translation now.

Best regards,
Amin Babaeipanah
---------------------------------------------
LeoMoon Studios
http://LeoMoon.com
---------------------------------------------
http://ArtisGeek.com
http://LoveIsComix.com
http://PersianRead.com
---------------------------------------------



persian_to_utf.py
fa.mo
fa.po
Reply all
Reply to author
Forward
0 new messages