Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localisation: Farsi (Persian) #568

Closed
JuliusSweetland opened this issue Jun 7, 2019 · 92 comments
Closed

Localisation: Farsi (Persian) #568

JuliusSweetland opened this issue Jun 7, 2019 · 92 comments

Comments

@JuliusSweetland
Copy link
Member

JuliusSweetland commented Jun 7, 2019

Potential keyboard layouts:

1.Full layout
image

2.Online keyboards:
https://www.branah.com/farsi2
https://www.101languages.net/farsi/keyboard/

3.Transifex: https://www.transifex.com/optikey/optikey/language/fa/

4.Breakdown of required characters: https://github.com/OptiKey/OptiKey/files/3263463/Persian.fa.characters.xlsx

5.Overview doc: https://r12a.github.io/app-charuse/?language=fa

6.Branch: https://github.com/OptiKey/OptiKey/tree/Farsi

7.Persian computing link: http://persian-computing.org/

@JuliusSweetland
Copy link
Member Author

Some comments on general localisation thread:
#148 (comment)
#148 (comment)

@siamakmu
Copy link

siamakmu commented Jun 7, 2019

Hi,
I designed best (in my opinion) useful Persian keyboard according users need from OptiKey. I can review it better after a beta release or a developer version.

Please remember Farsi language has a right to left writing.
I updated the Persian fa characters files. the number of row in excel file is same as I write on photos in red or blue color.
Persian fa characters - Update.xlsx

I put 30 main Persian letters in basis "LETTERS" page and 2 other will show when Shift key is down . Persian doesn't have upper case but has some secondary characters that usually use very slight, so all Persian keyboards put some other secondary letters or characters in Shift down condition. Also I changed the "MULTI-KEY SELECTION" key to Shift down condition cause it has so perplexing use in English for me. I have to test it Persian language and then can say is it useful in Farsi or not.

Main LETTERS page:
image

image

Main LETTERS page when the Shift key is down:
image

image

I put all 32 main Persian letters in basis "CONVERSATION" page. again I changed the "MULTI-KEY SELECTION" key to Shift down condition. And also I did same for "RE-CALIBRATE" key cause I don't know why it always is off. after you telling me its use we can talk about its best position.

Main CONVERSATION page:
image

image

Main CONVERSATION page when the Shift key is down:
image

image

I will wait for your feedback.
Thank you so much.

@JuliusSweetland
Copy link
Member Author

@siamakmu That's excellent, thank you. I have a few suggestions:

1.I think the multi-key selection key should be on all keyboards
2.Could we remove all non-Farsi specific characters from either keyboard, except . (fullstop) and , (comma). The Urdu keyboards include commonly Urdu specific characters, as well as commonly used English punctuation.
3.We could add 2 more keys on each rows if you think it would be useful to include diacritic marks on the first keyboard.

My general thinking is that characters such as », «, <, >, : could be dropped to make space for more useful characters?

Really great design though - I appreciate the effort you've put into this - it will be extremely helpful.

@siamakmu
Copy link

siamakmu commented Jun 7, 2019

  1. but I checked Japanese keyboard too and it doesn't have "MULTI-KEY SELECTION" key too!
    Why you don't think about a very big change in Optikey in long term? except default keyboard, users can set type (put keys order as they want). this will be very useful and most user friendly condition for a keyboard. Anyway how about we start beta version without this key in main page and if we get good reaction from it then change its position?
  2. I didn't remove . (fullstop) but we really don't have , (comma) in Farsi. we have another character for comma (،) that in all physical, or simulation even android keyboards it is in characters page not main letters page. Also we doesn't use it much like English. just sometimes. also we have to believe OptiKey usually for weak people or patient those who can move or talk or both. maybe for who wants to write with eyes there is no important some detailed characters. I think a patient it is important just show his intention to others. but I know Optikey is a big project can cover very weeks but I thinks its most common basis mission is help week people just a little talk.
  3. As you told yesterday, I prefer bigger useful keys to more unuseful keys.

About », «, <, >, : characters, as I told Persian is just in one kind case (lower case) in computer typing. so in Persian keyboards by holding shift key we can type secondary letters and characters. Actually », «, <, > are not very customary but : character sometimes use. Anyway according that there is no upper case in holding down shift page, if you remove these characters you want put empty key there? Anyway I still think details is not so important for a patient. same our main 32 character can help many patients to talk. other details can do in long terms. Also in the future please think more about OptiKey with removable (changeable) keys (if you want to develop it more).

Your welcome. my design inspired from your design. my work was nothing in front of your Idea.

@JuliusSweetland
Copy link
Member Author

@siamakmu Ok I'll try to find some time to work on this.

I want to bring the multi-key selection key back onto the main keyboard - it can greatly speed up typing. It is not included in the Japanese keyboard as they don't combine symbols in the same way. Can you recommend 3 letters from the 2nd keyboard that I can add to the first keyboard (and where you think they should go - one key in the 1st row, one in the 2nd, and one in the 3rd. This will allow me to add the multi-key select key back into the 4th.

I will remove some of the less useful keys from the second keyboard, and attempt to add back in Farsi versions of some useful characters. We can see what that looks like.

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 7, 2019

@JuliusSweetland
Copy link
Member Author

@siamakmu I've listed some Iranian/Farsi fonts above - can you test, or recommend, a font. The way numbers work with Urdu is that they display incorrectly until you use an Urdu specific font. From memory the numbers may display in the Persian forms by default, but ideally we need a Farsi compatible font anyway so everything displays correctly. Take a look at the table in this web page (plus the image int he post above) and tell me if Farsi numbers look correct.

https://en.wikipedia.org/wiki/Arabic_script_in_Unicode

@JuliusSweetland
Copy link
Member Author

Ah, mainly for my benefit: this article https://stackoverflow.com/questions/1676460/in-unicode-why-are-there-two-representations-for-the-arabic-digits explains that there are two sets of unicode points for Arabic numbers:
U+066n: ٠١٢٣٤٥٦٧٨٩
U+06Fn: ۰۱۲۳۴۵۶۷۸۹

My understanding is that the first set are Arabic. The second set are a mixture of Persian and Urdu.

U+06F4 - 'different glyphs in Persian and Urdu'
U+06F5 - 'Persian and Urdu share glyph different from Arabic'
U+06F6 - 'Persian glyph different from Arabic'
U+06F7 - 'Urdu glyph different from Arabic'

Based on this I believe we don't need a Persian/Farsi specific font, per-se, and any Arabic font will probably be fine.

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

Hi,
ok I think you want something like this. right?
now one key added to each row. I try my best to put characters on their standard positions that we usually see in most standards Persian Keyboards.
Please check the Persian fa characters - Update 2.xlsx new file.
Column A first page
Column B Shift down page
Just I repeated two letter in first page and shift down page cause in most standard keyboards these two are in shift down page but.

image

image

image

image

If this is ok please let me know to work on CONVERSATION page.

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 8, 2019 via email

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

@siamakmu Numbers will also need a bit of thought. Is this accurate for Persian:

image

7 free Farsi fonts: https://alefba.us/free-arabic-persian-farsi-urdu-kurdish-fonts/
More Iranian fonts:
https://fontlibrary.org/en/font/iranian-sans
https://fontlibrary.org/en/font/iranian-gui-fonts
https://fontlibrary.org/en/font/iranian-serif

Yes. Persian numbers is exactly same as you shown in middle image. but our people can read and write English numbers. some Persian fonts use English numbers and some other Farsi numbers.
About the font, I always prefer and use Titr Bold font. but now I check it just has a little problem with one of secondary characters. Any way I checked Nazli Bold font it's seems 95% same as Titr Bold but thinner and doesn't have problem on that character. anyway I think Nazli font from "Sharif FarsiWeb Fonts" that you sent is so nice and usful for our work. its numbers are perfectly ok too.
I upload it again for you.
nazli.zip

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

Ah, mainly for my benefit: this article https://stackoverflow.com/questions/1676460/in-unicode-why-are-there-two-representations-for-the-arabic-digits explains that there are two sets of unicode points for Arabic numbers:
U+066n: ٠١٢٣٤٥٦٧٨٩
U+06Fn: ۰۱۲۳۴۵۶۷۸۹

My understanding is that the first set are Arabic. The second set are a mixture of Persian and Urdu.

U+06F4 - 'different glyphs in Persian and Urdu'
U+06F5 - 'Persian and Urdu share glyph different from Arabic'
U+06F6 - 'Persian glyph different from Arabic'
U+06F7 - 'Urdu glyph different from Arabic'

Based on this I believe we don't need a Persian/Farsi specific font, per-se, and any Arabic font will probably be fine.

U+06Fn: ۰۱۲۳۴۵۶۷۸۹ is Persian numbers but if you use same "nazlib" font you don't need to change the numbers unicode. it's very beautiful Persian font also numbers are ok and users are more easy while web browsing cause most of Farsi websites use English numbers unicode behind the scene but with show Persian number font style to users. our people like Persian fonts more than Arabic. I suggest changing font is better and more beautiful and useful against Arabic font and changing numbers unicode.

@JuliusSweetland
Copy link
Member Author

@siamakmu Thanks. The numbers keyboard will allow the user to select from either the Farsi numbers, or English numbers. I'll see what the Farsi font does with both of these.

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

Yes that looks great. There are still some characters on the second keyboard ([]<>{} double angle brackets, /) that could be replaced with Farsi characters. Is there anything else you think would work well? New design looks great though

There is no more Persian characters! thats why I prefer these characters to empty key. You mean we use empty keys or repeat some characters?

@JuliusSweetland
Copy link
Member Author

@siamakmu I believe there are 10 characters that we could remove. How about adding in 0-9 Persian numbers if they can be arranged to be together?

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

@siamakmu Thanks. The numbers keyboard will allow the user to select from either the Farsi numbers, or English numbers. I'll see what the Farsi font does with both of these.

Does it possible for you to use an English font for English numbers?
I checked now that "nazlib" show U+06Fn: ۰۱۲۳۴۵۶۷۸۹ truly .

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

@siamakmu I believe there are 10 characters that we could remove. How about adding in 0-9 Persian numbers if they can be arranged to be together?

Good Idea. please show me which characters you want to delete?

@JuliusSweetland
Copy link
Member Author

Correct me if I'm wrong, but I think we can remove these ones:
[
]
{
}
»
«
<

"
I'm not sure about the 10th character. One possibility it so remove the multi-key selection key from the second keyboard as it doesn't have a lot of use on that keyboard.

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

Are you talking about second keyboard page (like some other language in OptiKey) or Shift On page?
Please check this. removed some abolished characters and add a small numpad?

image

If you are not interested, what's your suggestion?

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 8, 2019 via email

@siamakmu
Copy link

siamakmu commented Jun 8, 2019

I really didn't understand. can you show me by an image (for exam show change by an arrow)?
lets't send excel file after last change you want.

@siamakmu
Copy link

siamakmu commented Jun 9, 2019

Also do I need to change CONVERSATION page too?

@JuliusSweetland
Copy link
Member Author

I really didn't understand. can you show me by an image (for exam show change by an arrow)?
lets't send excel file after last change you want.

I think these two keys should move down like this:
image

The two characters on those keys need to move somewhere - can you find a good new location for them?

And yes, can you update the conversation keyboards to match?

Thanks

@siamakmu
Copy link

siamakmu commented Jun 9, 2019

in all standard keyboard these keys are in same position. but if you want there is no problem cause most of these characters are not so usable. many years ago people used these character. also these are useful for learning to children.
anyway please update me with your decision.
Yes, sure, I will update conversation keyboards too.

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 9, 2019 via email

@siamakmu
Copy link

siamakmu commented Jun 9, 2019

I checked a few standard keyboards again and it's same as I told.
This is On-Screen Keyboard windows 10
image
with your permission I prefer leave it at their standard positions.

@siamakmu
Copy link

siamakmu commented Jun 9, 2019

image
image
image
image

image
image
image
image

please notice me if there is any problem.

Persian fa characters - Update 3.xlsx

And this is Persian words collection:
Persian (Farsi) Words Database.xlsx

@siamakmu
Copy link

Thank you so much for new release and everything,
I had a problem with .NET Framework install for for OptiKey on our patient's laptop. also GazePointer didn't detect the webcam on his laptop!
As you know already I installed GazePointer on my pc with windows 10 to test it and it runs correctly but when I Install it on my patient laptop (windows 8 ) it stack on "Please wait, Camera initialization..." I check with two different camera but nothing change. I tested with "Camera Mouse 2018" and it works fine, so I found there is no problem with camera. Anyway I change its windows with fresh and new windows 10 and update it the last version with .NET Framework 3.5 and 4.8 and install GazePointer and OptiKey. good news OptiKey problem solved but its so strange cause about GazePointer nothing change. I connect and test 3 camera one by one but still same message. also cameras work on other softwares! I asked my brother to install GazePointer on his laptop too and it works fine for him too just like my PC.
Anyway I'm testing another version of windows on our patient's laptop to solve the problem.
If you have any idea please update me.

@JuliusSweetland
Copy link
Member Author

@siamakmu I'm sorry to hear that. No, I don't know how to fix the problem with GazePointer. Would the patient be able to use an eye tracking device? A low cost one such as the Tobii 4C works very well.

@siamakmu
Copy link

unfortunately there is no Tobii products in our country.
I solved the GazePointer "Please wait, Camera initialization..." problem . I had to install "Microsoft Visual C++ Redistributable Package (x86)".
our patient were in hospital today. I will test for him when he come back to home will and update you.

I found a open source project (PyGaze) but it seems it doesn't work with webcam too. you are a programmer and it's good if you have look at it for future. maybe you start an eye tracker project in the future.
http://www.pygaze.org

@JuliusSweetland
Copy link
Member Author

@siamakmu Where exactly are you and what is your position and relationship to the patient? If I understand a bit more I may be able to ask Tobii to let you buy directly from them.

@siamakmu
Copy link

I live in Iran (Tehran).
he is one of my relatives.

@JuliusSweetland
Copy link
Member Author

@siamakmu please try to order from here: https://gaming.tobii.com/product/tobii-eye-tracker-4c/

When I tried to buy the Tobii 4C it seems to allow ordering to Tehran.

@siamakmu
Copy link

Nice and good. Thank you so much Julius.
Does Tobii 4C have nice result or cause it was cheapest you offer to me?

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 26, 2019 via email

@siamakmu
Copy link

ok Thank you so much for everything.

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Jun 26, 2019 via email

@siamakmu
Copy link

Actually I found OptiKey from GazePointer page. it was in recommended applications in GazePointer applications SourceForge page.
About Persian voice, if you mean TTS, there is just one company that has acceptable result after convert text to speech. it is Ariana Persian Text To Speech. I don't how much they want to share their API with you. please give me some technical info about what do you need then I will call them on Sunday.

Yes sure, it is fantastic. Thank you to do it in a short time. I just need a time later to check again all transifex translates.

@JuliusSweetland
Copy link
Member Author

@siamakmu Thank you for the TTS voice. It looks to be an online/locally installed API service, so I don't believe you can use this with OptiKey I'm afraid.

Let me know if you update the Transifex translations and I will integrate your changes into OptiKey.

Thanks again for all your help! I will release this new version asap.

@siamakmu
Copy link

siamakmu commented Jul 1, 2019

Hi Julius,
Sorry for my absent.
I fixed Transifex translations.
I called for TTS. he told our service is cloud you can check our free samples here. he told please check these at first then we can talk more. also I asked for offline without any character limit and he told it's around $100.
Anyway if you think there a way to use this TTS in OptiKey and cooperate with them you can contact them info[AT]farsireader[DOT]com cause I can't understand technical programming informations.
But you can use my help in any other cooperate with them.

I'm waiting for new version...

@siamakmu
Copy link

siamakmu commented Jul 1, 2019

Do you have Tobii 4C yourself?
if yes can you please install and test GazePointer with a good webcam then tell me if there is better performance with Tobii 4C?

@JuliusSweetland
Copy link
Member Author

@siamakmu I've tried to use the GazePointer app with a webcam, but I can't see how to calibrate or control it. I only get this message:

image

@siamakmu
Copy link

siamakmu commented Jul 3, 2019

It's so strange indeed! you don't have "Start Gaze Calibration" and setting gear icon!
image
As you know I had problem with running GazePointer on a fresh windows and finally it solved with installing Microsoft Visual C++ Redistributable Package (x86) (I don't remember with year version but I think 2015 to 2018) maybe it solve your problem too.

Anyway I tested OptiKey with our patient yesterday. he liked it too much specially the attention key with the whistle sound! (LOL).
I told him about you and your helps. he said hello and so much thanks to you for this nice application.
He used Camera Mouse 2018 and OptiKey cause we had a problem with GazePointer on his face. He always has to use a napkin in his mouth and a part of this napkin is our of his mouth. So this napkin made disorder in GazePointer face analyze and performance. so our family told me to ask you if it is possible for you test Tobii 4C performance with a napkin in your mouth with having around 40cm-50cm distance with Tobii Camera. So sorry for our impoliteness.
At all he got good result with Camera Mouse 2018 + OptiKey Persian keyboard. he typed a few sentences. one of them was with contents special hello and thanks to you dear Julius.
Thank you again dear friend.

@JuliusSweetland
Copy link
Member Author

@siamakmu I will try installing C++ package and trying again - thanks.

I'm really glad your patient liked OptiKey. Hello to him! He is very welcome.

I know the 4C works with patients using a napkin as I have seen videos of a user in Poland using OptiKey with the 4C who also uses a napkin to keep her mouth from drying out. I think you will find the performance of the 4C much better than a webcam, but I will try GazePointer again to try and compare first hand.

You're welcome. I'm very pleased OptiKey is helping.

@JuliusSweetland
Copy link
Member Author

@siamakmu I'm afraid reinstalling the C++ redistributable package did not improve anything with GazePointer.

@siamakmu
Copy link

siamakmu commented Jul 4, 2019

ok, thanks for your try to run GazePointer, thanks for your info about patient that used a napkin, it was a useful information for us, thanks for everything great man.

@JuliusSweetland
Copy link
Member Author

@siamakmu I'm afraid reinstalling the C++ redistributable package did not improve anything with GazePointer.

@siamakmu
Copy link

Hi Julius,
How are you dear friend?
I updated the Persian language in transifex to 100%.
Can I ask you update to a new version?
I have a problem in Optikey Pro. when I use Optikey I can change font but in Optikey Pro when I change font nothing change. also default Persian font (Nazli) don't work.
also a little bug (not important just for your inform) is the check box direction in the Optikey Pro management console.
You can check both of these problems here:

### Optikey:
Optikey

### Optikey Pro:
Optikey Pro

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Oct 20, 2020 via email

@siamakmu
Copy link

I'm fine too.
old version 2.24.0.0 allow and new version 3.1.0.0 doesn't.
Yes I mean old version that installed C\Program Files (x86)\OptiKey
When we choose Persian language default font is (Nazli) and in version 2.24.0.0 I can see characters really in this font or if I change Titr font I can see the change but in version 3.1.0.0 fonts are not true. I mean Nazli is not Nazli or Titr is not Titr. nothing change if I change the font. but Font weight works.

Nazli

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Oct 20, 2020 via email

@siamakmu
Copy link

siamakmu commented Oct 23, 2020

Hi,
I hope you are fine.
I wanted to ask you new setting but cause it is small thing I didn't want to open a new issue.
is it possible to add an option with a check box in management console to auto start magnetic cursor always?

@siamakmu
Copy link

Hi,
How are you?
Any update?

@JuliusSweetland
Copy link
Member Author

JuliusSweetland commented Oct 27, 2020 via email

@siamakmu
Copy link

Hi dear Julius,
I hope you are fine.
is it possible to add an option with a check box in management console to auto start magnetic cursor always? it will be very useful for us.
[I'm sorry if I had to post my ask in another topic, if it's wrong show me where please.]

@JuliusSweetland
Copy link
Member Author

@siamakmu Sorry this has taken so long - I've just fixed the two issues and a new pre-release is available here: https://github.com/OptiKey/OptiKey/releases/tag/v3.1.1_pre-release-3

I have created a new issue here for the magnetic cursor setting idea: #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@JuliusSweetland @siamakmu and others