Open ChanoSan opened 2 years ago
I also have an issue with Japanese input but with different characteristic, which I have described in another issue.
I'd like to volunteer to debug the issue but I need some supervising on Japanese input, can someone post a link to the Japanese open group channel so I can ask for help?
I think I can reproduce this one. Will take a look.
I'd like to volunteer to debug the issue but I need some supervising on Japanese input, can someone post a link to the Japanese open group channel so I can ask for help?
The Open Group I was using is dedicated to an event I was running, but you want to consult with people in the group for feedback I'm sure that's fine. Link here:
I can observer same behavior with Ubuntu 18.04 + ibus-mozc. I don't know how to activate ibus-anthy so I am not able to test ibus-anthy yet. I'll take a look and see if I can fix the ibus-mozc one first and will ask you to validate it with ibus-anthy.
Seems like a bug in react-mentions. I'll have a look.
I reproduced this bug in Tails.
Can anyone here:
This hack has some obvious issues, it messes up the mentioned highlight, which I'm planning to fix later.
The text input part is working for me when I test with ibus-mozc (Japanese).
It would be great if some native Japanese speakers test it with different browsers + different OSs + different IME and provide me some feedback.
If the feedback is good I'll clean up the patch and propose a proper solution.
Here is the hack for those who are curious: https://github.com/fracting/react-mentions/commit/d245d614866c2f386ce1bf3da36062b7dc1809d2
It would be great if some native Japanese speakers test it with different browsers + different OSs + different IME and provide me some feedback.
I tested the with both desktop (Ubuntu Focal, Firefox) and Mobile (Android, WebView). Desktop test was using ibus-anthy. Android test was using "Mozc for Android" installed as an app and set up as a Japanese keyboard. What the name of the specific IME is (mozc? ibus-mozc? somethingelse-mozc?) I'm not sure, but there it is.
Android functioned normally in both the original react-mentions and the provided hack. This is expected, as Android Session is also unaffected by the original bug.
Firefox Desktop had buggy results in the original react-mentions test. Aside from not correctly converting to Kanji through IME selection, it would also needlessly prepend previous Hiragana entries onto new sentences typed in after the first. Upon hitting the space key, the IME selection menu would show up, however selecting Kanji or Hiragana entries from that list had no effect, and the entry remained Hiragana only.
Your hack, however, allowed normal entry. On Firefox Desktop, the IME displayed the selection menu normally, and successfully converted Hiragana entries into both Katakana and Kanji as expected.
Thanks @ChanoSan ! That's very encouraging and super helpful!
Unfortunately with my current hack, the auto-completion overlay menu is not working in IME composition mode, I still need extra time to come up with a design that supports auto-completion properly. Forgive me for asking for another test next time :-)
Hi @fracting, how did you go fixing the Japanese IME issues? Please feel free to msg me on Session!
@beantaco I have a hack at http://16.170.244.17:8081/ feel free to test and compare with https://react-mentions.vercel.app/
My hack solves the typing problem but it doesn't support auto-completion for Japanese names, if someone called サトシ・ナカモト
, with my hack we can't auto-complete a name using @サ
. Proper support of that would be quite a big change to the react-mention code.
I remember I sent you http://16.170.244.17:8081/
but you had a problem testing it because of SSL warnings?
Hi! I'll see if I can access the link again some time. PS: Sorry I'm not a big GitHub user so didn't notice your comment til now :-p
@beantaco I have a hack at http://16.170.244.17:8081/
@fracting This appears to work fine on Tails (mozc). I didn't compare with https://react-mentions.vercel.app/ but I hope this helps.
@beantaco I have a hack at http://16.170.244.17:8081/ feel free to test and compare with https://react-mentions.vercel.app/
My hack solves the typing problem but it doesn't support auto-completion for Japanese names, if someone called
サトシ・ナカモト
, with my hack we can't auto-complete a name using@サ
. Proper support of that would be quite a big change to the react-mention code.I remember I sent you
http://16.170.244.17:8081/
but you had a problem testing it because of SSL warnings?
@fracting I test this with Rime (A Chinese IME) on Windows 10 too and It also works fine. The issue of message textbox made many Asian language IME tools like crap. I'm looking forward to seeing it's gone.
@fracting I was directed from a ticket on Zendesk. I has same problem with fcitx5/mozc. I can't try this because I can't connect to 16.170.244.17. Are you planning to incorporate this hack?
This Issue is a duplicate of #1497. It should be closed to avoid dispersing the discussion.
This is not just a Japanese language problem. It applies to Chinese, Korean, and Vietnamese as well, so why not rename the Issue from Japanese to the CJKV language?
Oxen has neglected this extremely serious issue for more than two years. Not only have they not fixed it, they haven't even commented on it...Session sucks.
I had a look at this and reached out to some contacts with a bit more info on the problem.
The fundamental issue comes from how different operating systems design their IME system APIs, which cannot be fully abstracted by browsers, leading to inconsistent behavior across various platforms. This issue is compounded by how different IME applications interact with these APIs using various patterns. Libraries like react-mention, which handle raw IME events directly, need to make some assumptions about how other IME applications work. As a result, a vast number of combinations must be tested, and there are always edge cases here and there, some of those patterns are fundamentally incompatible with each other.
In the case of react-mention, there are three type of observable behaviors:
If we want to continue to use react-mention we can patch the third scenario, but it seems this causes regressions which increase the frequency of the first and second behaviors, not sure if there is a way around this. It would be great if this could be addressed upstream however react-mentions isn't the most active package.
Perhaps the better long term solution is for Session to move away from react-mentions entirely and adopt the approach used by Signal Desktop, which supports auto-completion through a different method, using isolated divs for auto-completing text without messing with the entire input area.
Are there any solutions? 😢
This is being tracked on Jira: https://optf.atlassian.net/browse/SES-1699
Describe the bug When inputting Japanese text, I am unable to convert input from Hiragana to Kanji or Katakana. Normally, when inputting Japanese via the IME the text is highlighted, at which point using the space key allows for selection of different Kanji/Katakana/etc variations on the word and the Enter key confirms, like so:
With Session Desktop, however, pressing space after input does not open the standard IME selection menu, but simply puts the raw Hiragana into the text field with no ability to change it, like so:
Being unable to input Kanji, and only being able to input Hiragana, makes communication in Japanese somewhat difficult. The only existing workaround is to type out the sentence in gedit or another writing tool, then copy-paste it into Session's input field. This behavior has been reported by at least two other users in a Japanese language Open Group I use. I believe in both cases it was Linux, though I do not at present know which distro or any other version information for Session Desktop or their IME.
It is worth noting, that the same account logged in via Session Android has no difficult with Japanese IME. This behavior seems isolated to the Desktop version.
To Reproduce Steps to reproduce the behavior: Use a Japanese IME to input text in Session Desktop. Hit space after typing in Hiragana text, resulting in raw Hiragana input (no ability to convert to Kanji or Katakana etc).
Screenshots or Logs see above
Other information (please complete the following information):