Native language support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Native language support

Nick Doodka
Hi all.
I would like to use Pharo in my native language (Ukrainian in my case or Cyrillic), but I cannot enter some capital letters to Workspace / System Browser because it's fails on letters: CapsLock or Shift+<Keys> -> [~YGJK"V].
That behavior take place only in Pharo ver. 3 and 4. In Pharo 2.0 all keys working good! What is wrong? Platform - Windows XP

Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Marcus Denker-4
I got a mail that suggest a fix:

(I have attached it as a file-out, you can just drag-n-drop it on the pharo
desktop)

We should check if that solves the problem.

On Wed, Mar 4, 2015 at 10:37 AM, Nick Doodka <[hidden email]> wrote:
Hi all.
I would like to use Pharo in my native language (Ukrainian in my case or Cyrillic), but I cannot enter some capital letters to Workspace / System Browser because it's fails on letters: CapsLock or Shift+<Keys> -> [~YGJK"V].
That behavior take place only in Pharo ver. 3 and 4. In Pharo 2.0 all keys working good! What is wrong? Platform - Windows XP




--

HandMorph-generateKeyboardEvent.st (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Nick Doodka
Hello Marcus.
Your patch solves my problem with capital letters. But it raises another trouble - every mouse wheel move or keyboard shortcut like ctrl+key cause next error MessageNotUnderstood:Character>>isArrow.

2015-03-07 12:39 GMT+02:00 Marcus Denker <[hidden email]>:
I got a mail that suggest a fix:

(I have attached it as a file-out, you can just drag-n-drop it on the pharo
desktop)

We should check if that solves the problem.

On Wed, Mar 4, 2015 at 10:37 AM, Nick Doodka <[hidden email]> wrote:
Hi all.
I would like to use Pharo in my native language (Ukrainian in my case or Cyrillic), but I cannot enter some capital letters to Workspace / System Browser because it's fails on letters: CapsLock or Shift+<Keys> -> [~YGJK"V].
That behavior take place only in Pharo ver. 3 and 4. In Pharo 2.0 all keys working good! What is wrong? Platform - Windows XP




--

Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Sean P. DeNigris
Administrator
Nick Doodka wrote
next error MessageNotUnderstood:Character>>isArrow.
What is the exact image version (incl. update number)?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Nick Doodka
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ).

2015-03-10 13:06 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Nick Doodka wrote
> next error MessageNotUnderstood:Character>>isArrow.

What is the exact image version (incl. update number)?



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Native-language-support-tp4809392p4810892.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Sean P. DeNigris
Administrator
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Nick Doodka
After series of trial and error methods I found acceptable solution of my problem. That is chunk of code from Pharo 2.0 should be copy&paste to appropriate place in method HandMorph>>generateKeyboardEvent. This way let me to avoid problems with mouse wheel freezing or generating errors.

i.e.
.....
"Adjustments to provide consistent key value data for different VM's:
- charCode always contains unicode code point.
- keyValue contains 0 if input is outside legacy range"
"If there is no unicode data in the event, assume keyValue contains a correct (<256) Unicode codepoint, and use that"
    (charCode isNil or: [charCode = 0])
        ifTrue: [charCode := keyValue].
"If charCode is not single-byte, we definately have Unicode input. Nil keyValue to avoid garbage values from some VMs."
    charCode > 255 ifTrue: [keyValue := 0].
.....

Full version of patched method I attach as zip-archive for v3 and v4 apart. I suppose developers should correct this method in next releases of Pharo for the sake non-english users support. Thanks for helping and advises.


2015-03-10 16:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean


View this message in context: Re: Native language support

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


HandMorphFixPharo3.zip (1K) Download Attachment
HandMorphFixPharo4.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Guillermo Polito
Hi Nick,

Thanks for chasing the bug down.

Since the code for event handling is probably going to change in favor of SDL2 events soon, I think it should be good to also provide some tests for this, to detect any regression or problem, or at least to document expected behavior. Do you have any pointers of what should be tested? Which are the cases that worked or not and in which keyboard layouts?

Guille

El jue., 12 de mar. de 2015 a la(s) 8:48 a. m., Nick Doodka <[hidden email]> escribió:
After series of trial and error methods I found acceptable solution of my problem. That is chunk of code from Pharo 2.0 should be copy&paste to appropriate place in method HandMorph>>generateKeyboardEvent. This way let me to avoid problems with mouse wheel freezing or generating errors.

i.e.
.....
"Adjustments to provide consistent key value data for different VM's:
- charCode always contains unicode code point.
- keyValue contains 0 if input is outside legacy range"
"If there is no unicode data in the event, assume keyValue contains a correct (<256) Unicode codepoint, and use that"
    (charCode isNil or: [charCode = 0])
        ifTrue: [charCode := keyValue].
"If charCode is not single-byte, we definately have Unicode input. Nil keyValue to avoid garbage values from some VMs."
    charCode > 255 ifTrue: [keyValue := 0].
.....

Full version of patched method I attach as zip-archive for v3 and v4 apart. I suppose developers should correct this method in next releases of Pharo for the sake non-english users support. Thanks for helping and advises.


2015-03-10 16:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean


View this message in context: Re: Native language support

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Ben Coman
Hi Nick,

The best way to ensure this will get included is log an issue and submit a code slice at pharo.fogbugz.com.  Then your code can undergo review and be integrated in a managed way.

Read the "How to Contribute" link from there, and if its not clear, please provide feedback so we can improve it.

cheers -ben

cheers -ben

On Thu, Mar 12, 2015 at 4:37 PM, Guillermo Polito <[hidden email]> wrote:
Hi Nick,

Thanks for chasing the bug down.

Since the code for event handling is probably going to change in favor of SDL2 events soon, I think it should be good to also provide some tests for this, to detect any regression or problem, or at least to document expected behavior. Do you have any pointers of what should be tested? Which are the cases that worked or not and in which keyboard layouts?

Guille

El jue., 12 de mar. de 2015 a la(s) 8:48 a. m., Nick Doodka <[hidden email]> escribió:

After series of trial and error methods I found acceptable solution of my problem. That is chunk of code from Pharo 2.0 should be copy&paste to appropriate place in method HandMorph>>generateKeyboardEvent. This way let me to avoid problems with mouse wheel freezing or generating errors.

i.e.
.....
"Adjustments to provide consistent key value data for different VM's:
- charCode always contains unicode code point.
- keyValue contains 0 if input is outside legacy range"
"If there is no unicode data in the event, assume keyValue contains a correct (<256) Unicode codepoint, and use that"
    (charCode isNil or: [charCode = 0])
        ifTrue: [charCode := keyValue].
"If charCode is not single-byte, we definately have Unicode input. Nil keyValue to avoid garbage values from some VMs."
    charCode > 255 ifTrue: [keyValue := 0].
.....

Full version of patched method I attach as zip-archive for v3 and v4 apart. I suppose developers should correct this method in next releases of Pharo for the sake non-english users support. Thanks for helping and advises.


2015-03-10 16:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean


View this message in context: Re: Native language support

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Thierry Goubier
In reply to this post by Nick Doodka
Hi Nick,

thanks for finding this. I can now, finally, use the compose key on my Linux keyboard to enter characters like Ç, É, À...

Thierry

2015-03-12 8:48 GMT+01:00 Nick Doodka <[hidden email]>:
After series of trial and error methods I found acceptable solution of my problem. That is chunk of code from Pharo 2.0 should be copy&paste to appropriate place in method HandMorph>>generateKeyboardEvent. This way let me to avoid problems with mouse wheel freezing or generating errors.

i.e.
.....
"Adjustments to provide consistent key value data for different VM's:
- charCode always contains unicode code point.
- keyValue contains 0 if input is outside legacy range"
"If there is no unicode data in the event, assume keyValue contains a correct (<256) Unicode codepoint, and use that"
    (charCode isNil or: [charCode = 0])
        ifTrue: [charCode := keyValue].
"If charCode is not single-byte, we definately have Unicode input. Nil keyValue to avoid garbage values from some VMs."
    charCode > 255 ifTrue: [keyValue := 0].
.....

Full version of patched method I attach as zip-archive for v3 and v4 apart. I suppose developers should correct this method in next releases of Pharo for the sake non-english users support. Thanks for helping and advises.


2015-03-10 16:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean


View this message in context: Re: Native language support

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Thierry Goubier
In reply to this post by Ben Coman
Hi Nick, Ben,

2015-03-12 10:17 GMT+01:00 Ben Coman <[hidden email]>:
Hi Nick,

The best way to ensure this will get included is log an issue and submit a code slice at pharo.fogbugz.com.  Then your code can undergo review and be integrated in a managed way.

I've created an issue:



Read the "How to Contribute" link from there, and if its not clear, please provide feedback so we can improve it.

cheers -ben

cheers -ben

On Thu, Mar 12, 2015 at 4:37 PM, Guillermo Polito <[hidden email]> wrote:
Hi Nick,

Thanks for chasing the bug down.

Since the code for event handling is probably going to change in favor of SDL2 events soon, I think it should be good to also provide some tests for this, to detect any regression or problem, or at least to document expected behavior. Do you have any pointers of what should be tested? Which are the cases that worked or not and in which keyboard layouts?

Guille

El jue., 12 de mar. de 2015 a la(s) 8:48 a. m., Nick Doodka <[hidden email]> escribió:

After series of trial and error methods I found acceptable solution of my problem. That is chunk of code from Pharo 2.0 should be copy&paste to appropriate place in method HandMorph>>generateKeyboardEvent. This way let me to avoid problems with mouse wheel freezing or generating errors.

i.e.
.....
"Adjustments to provide consistent key value data for different VM's:
- charCode always contains unicode code point.
- keyValue contains 0 if input is outside legacy range"
"If there is no unicode data in the event, assume keyValue contains a correct (<256) Unicode codepoint, and use that"
    (charCode isNil or: [charCode = 0])
        ifTrue: [charCode := keyValue].
"If charCode is not single-byte, we definately have Unicode input. Nil keyValue to avoid garbage values from some VMs."
    charCode > 255 ifTrue: [keyValue := 0].
.....

Full version of patched method I attach as zip-archive for v3 and v4 apart. I suppose developers should correct this method in next releases of Pharo for the sake non-english users support. Thanks for helping and advises.


2015-03-10 16:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Now it is Pharo3.0 Latest update: #30862 and Pharo4.0 Latest update: #40474, but previous updates worked the same (ignore cyrillic capital letters ЁНПОЛЄМ)
What is the exact image version (incl. update number)?
I meant specifically regarding the #isArrow error. I don’t think you can be having this in 3.0, so you mean #40474 correct? Is it only after you change the language?
Cheers,
Sean


View this message in context: Re: Native language support

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Henrik Sperre Johansen

On 12 Mar 2015, at 10:39 , Thierry Goubier <[hidden email]> wrote:

Hi Nick, Ben,

2015-03-12 10:17 GMT+01:00 Ben Coman <[hidden email]>:
Hi Nick,

The best way to ensure this will get included is log an issue and submit a code slice at pharo.fogbugz.com.  Then your code can undergo review and be integrated in a managed way.

I've created an issue:


There was already a case (with some issues noted to the fix), I linked to that.
Which makes me think, with the duality of communication happening in mailing list/issue tracker, it'd be *really* nice if it were possible to have a field in the issue tracker where you can link to a mailing list thread, and have the tracker post to the thread that an issue has been created...

Cheers,
Henry
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

Thierry Goubier


2015-03-12 14:41 GMT+01:00 Henrik Johansen <[hidden email]>:

On 12 Mar 2015, at 10:39 , Thierry Goubier <[hidden email]> wrote:

Hi Nick, Ben,

2015-03-12 10:17 GMT+01:00 Ben Coman <[hidden email]>:
Hi Nick,

The best way to ensure this will get included is log an issue and submit a code slice at pharo.fogbugz.com.  Then your code can undergo review and be integrated in a managed way.

I've created an issue:


There was already a case (with some issues noted to the fix), I linked to that.

And I closed this one, since this is a duplicate of 

 
Which makes me think, with the duality of communication happening in mailing list/issue tracker, it'd be *really* nice if it were possible to have a field in the issue tracker where you can link to a mailing list thread, and have the tracker post to the thread that an issue has been created...

Why not.

It is also convenient, as it is the case in github, that replying to the email from the issue tracker adds to the issue. (i.e. two way update).

Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Native language support

stepharo
In reply to this post by Nick Doodka
Hi nick

We would love that you can.
Now we need somebody with a non ascii language to help.

Stef



Le 4/3/15 10:37, Nick Doodka a écrit :
> Hi all.
> I would like to use Pharo in my native language (Ukrainian in my case
> or Cyrillic), but I cannot enter some capital letters to Workspace /
> System Browser because it's fails on letters: CapsLock or Shift+<Keys>
> -> [~YGJK"V].
> That behavior take place only in Pharo ver. 3 and 4. In Pharo 2.0 all
> keys working good! What is wrong? Platform - Windows XP
>