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

Please add the automatic vowel forming feature. #1

Closed
Mahmudul-hasan613 opened this issue Aug 18, 2022 · 60 comments
Closed

Please add the automatic vowel forming feature. #1

Mahmudul-hasan613 opened this issue Aug 18, 2022 · 60 comments
Assignees
Labels
enhancement New feature or request

Comments

@Mahmudul-hasan613
Copy link

Automatic vowel forming helps speed up writing. So for those who do a lot of Bengali writing, this feature is very necessary.
The function of the feature is to determine where Independent vowels will sit and where Dependent vowel signs or Vowel Diacritics will sit. The feature then performs the task itself.

@mike-fabian
Copy link
Owner

I guess there is never a need to switch this feature off, i.e. changing bn-national-jatiya.mim so that automatic vowel forming is always done is good enough.

@mike-fabian
Copy link
Owner

Discussion originally started in: ibus/ibus#2420

@mike-fabian mike-fabian self-assigned this Aug 18, 2022
@mike-fabian mike-fabian added the enhancement New feature or request label Aug 18, 2022
@Mahmudul-hasan613
Copy link
Author

I guess there is never a need to switch this feature off, i.e. changing bn-national-jatiya.mim so that automatic vowel forming is always done is good enough.

If there is an option to turn it off, that's fine. Although the matter is not so important. But many times Dependent vowel signs may need to be written separately, if any writing is about Bengali language education...
Of course, the Bengali keyboard layout is already there by default in the Linux system to do that.

@mike-fabian
Copy link
Owner

If there is an option to turn it off, that's fine. Although the matter is not so important.

Great!

But many times Dependent vowel signs may need to be written separately, if any writing is about Bengali language education...

I thought so that this would be mainly for education

Of course, the Bengali keyboard layout is already there by default in the Linux system to do that.

Good, so maybe this input method does not have to do it.

I cannot add an option to switch it off, but I could add a second input method

bn-national-jatiya-automatic-vowel-forming-off.mim

which does behave like the old one.

But maybe we do not need to do it. If we really want both options, we should probably also think about a better name of bn-national-jatiya-automatic-vowel-forming-off.mim which is more concise but still makes the purpose clear.

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Aug 18, 2022

which does behave like the old one.

But maybe we do not need to do it. If we really want both options, we should probably also think about a better name of bn-national-jatiya-automatic-vowel-forming-off.mim which is more concise but still makes the purpose clear.

I suggest the name bn-n-j-no-a-v-f.mim as short and meaningful.

@mike-fabian
Copy link
Owner

I have pushed an improved version with automatic vowel forming to the “main” branch.

Can you please try to download the latest

https://github.com/mike-fabian/m17n-db-bn-national-jatiya/blob/main/bn-national-jatiya.mim

again and test whether it works correctly?

If there are still problems, reopen this issue and tell me what the problems are.

@Mahmudul-hasan613
Copy link
Author

If there are still problems, reopen this issue and tell me what the problems are.

I found an error. You have listed three characters, which cannot be associated with Dependent vowel signs. The letters are => ড় ঢ় য়. But the fact is that in Bengali those three letters also use Dependent vowel signs. So I suggest that you delete the code you wrote for those three characters and re-upload the file.

2022-08-19 00-10-29 হতে স্ক্রিনশট

@mike-fabian mike-fabian reopened this Aug 18, 2022
@mike-fabian
Copy link
Owner

What about the fourth character at the top of your screenshot?

@Mahmudul-hasan613
Copy link
Author

What about the fourth character at the top of your screenshot?

Dependent vowel signs are not used with the fourth letter .

@mike-fabian
Copy link
Owner

What about the fourth character at the top of your screenshot?

Dependent vowel signs are not used with the fourth letter .

That means I should treat all these four characters the same way, right?

@Mahmudul-hasan613
Copy link
Author

That means I should treat all these four characters the same way, right?

No, the four letters cannot be treated the same, only the fourth letter does not use Dependent vowel signs.

If your code looks good, see the screenshot below...

2022-08-19 01-40-19 হতে স্ক্রিনশট

@mike-fabian
Copy link
Owner

I have pushed a new version which fixes the problem you found.

@mike-fabian
Copy link
Owner

I pushed another improvement to be able to choose betweeen automatic vowel forming or not.

The latest version now has a variable like this:

(variable
 (use-automatic-vowel-forming
  (_"If this variable is 1 (the default), automatic vowel forming is used.
For example, a dependent vowel like া is automatically converted to
the independent form আ if it is not typed after a consonant.")
  1 0 1)) ; ((NAME [DESCRIPTION DEFAULT-VALUE VALID-VALUE ...])

And one can now choose whether to use automatic vowel forming or not by editing the config file ~/.m17n.d/config.mic in the home directory and fill it with content like this:

;; -*- mode:lisp; coding:utf-8 -*-
((input-method bn national-jatiya)
 (variable
  (use-automatic-vowel-forming nil 1)))

If the file ~/.m17n.d/config.mic does not yet exist, you can create it and fill it with the above content. If the value of the variable is 1, automatic vowel forming is used, if the value is 0, automatic vowel forming is not used.

The file ~/.m17n.d/config.mic may contain other settings for other input methods, for example I currently have this file:

;; -*- mode:lisp; coding:utf-8 -*-
((input-method t unicode)
 (variable
  (prompt nil
   "U+")))
((input-method t nil global)
 (variable
  (fallback-input-method nil
   "unicode, lsymbol")))
((input-method zh quick)
 (variable
  (candidates-group-size nil 10)))
((input-method zh tonepy)
 (variable
  (candidates-group-size nil 10)))
((input-method hi itrans)
 (variable
  (trim-last-halant nil 1)))
((input-method si wijesekera)
 (variable
  (use-surrounding-text nil 0)))
((input-method vi telex)
 (variable
  (tone-mark-on-last nil 0)
  (backspace-is-undo nil 0)))
((input-method bn national-jatiya)
 (variable
  (use-automatic-vowel-forming nil 1)))

@Mahmudul-hasan613
Copy link
Author

I have pushed a new version which fixes the problem you found.

Thank you very much for solving the problem. I will be eternally grateful to you for working on such an important project.

@Mahmudul-hasan613
Copy link
Author

And one can now choose whether to use automatic vowel forming or not by editing the config file ~/.m17n.d/config.mic in the home directory and fill it with content like this:

;; -*- mode:lisp; coding:utf-8 -*-
((input-method bn national-jatiya)
 (variable
  (use-automatic-vowel-forming nil 1)))

If the file ~/.m17n.d/config.mic does not yet exist, you can create it and fill it with the above content. If the value of the variable is 1, automatic vowel forming is used, if the value is 0, automatic vowel forming is not used.

That configuration is not working for me. Even after giving 0, automatic vowel forming is working.

2022-08-19 15-17-09 হতে স্ক্রিনশট

@mike-fabian
Copy link
Owner

I think you need to restart ibus, it becomes effective only after an ibus restart.

When not using gnome, you can type ibus restart into a teminal, when using Gnome you need to log out and log in again.

@Mahmudul-hasan613
Copy link
Author

I think you need to restart ibus, it becomes effective only after an ibus restart.

When not using gnome, you can type ibus restart into a teminal, when using Gnome you need to log out and log in again.

I restarted the computer. But it's not working.

@mike-fabian
Copy link
Owner

Hm, it worked for me.
Your screenshot looks correct ... I don't know at the moment why this isn't work for you.

@mike-fabian
Copy link
Owner

Stupid question, but did you really install the latest version of bn-national-jatiya.mim which has the support for this variable?

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Aug 19, 2022

Stupid question, but did you really install the latest version of bn-national-jatiya.mim which has the support for this variable?

Sorry about that. I was trying to config without downloading the latest updated file. Now it's working...

@mike-fabian
Copy link
Owner

Video showing that changing the option works for me.

In the video, I am using bn-national-jatiya.mim with ibus-m17n.

First I type a and get ‌ . In the gnome-terminal on the right the contests of the setup file are shown, use-automatic-vowel-forming is set to 1.

Now I open the setup tool of ibus-m17n.

I go to the "Advanced" Tab.

Then I change the input to the English keyboard to be able to type a 0 into the setup tool.

I change the value of the use-automatic-vowel-forming option to 0.

I close the setup tool.

Then I check in the gnome-terminal the contents of ~/.m17n.d/config.mic again.

Now the contents have changed, doing the change in the ibus-m17n setup tool edited the config.mic file.

It doesn’t matter whether one uses the setup tool to do this change or edits the config file manually with an editor.

Now I type a again in gedit without restarting the ibus-daemon. I still get because the change is not active.

Now I stop the ibus-daemon, which I have started manually in the left gnome-terminal by killing it with Control+C.

Then I start ibus-daemon -rx again in the left gnome terminal.

Now I type a again in gedit and now I get U+09C3 BENGALI VOWEL SIGN VOCALIC R, i.e. the changed option is now active.

(I am doing this manual stopping and starting of ibus-daemon because I cannot use “ibus restart” in a Gnome session and I want to avoid having to log out and log in again just to restart the ibus-daemon)

See the video:

Peek.2022-08-19.12-27.mp4

@mike-fabian
Copy link
Owner

Stupid question, but did you really install the latest version of bn-national-jatiya.mim which has the support for this variable?

Sorry about that. I was trying to config without downloading the latest updated file. Now it's working...

Great!

As you can see in the video, if one is using ibus-m17n, one can even change the value of that variable using the setup tool. But a restart of ibus is necessary.

If one is using ibus-typing-booster (much better in my opinion!), there is currently no way to change options for m17n input methods using the ibus-typing-booster setup tool, so one has to use a text editor and edit ~/.m17n.d/config.mic manually. And of course restart ibus after doing that.
It is not very difficult to edit that file, but I thin it would be nice if these settings could also be changed using the ibus-typing-booster setup tool.

When an input method is selected in ibus-typing-booster, the “Input method help” button becomes active. You can use that for example to display the help text for bn-national-jatiya.mim from the ibus-typing-booster setup tool.

I think I should add another button there to set options for input methods. Using a text editor is OK, but being able to do this in the setup tool would be nicer.

And I think I could probably make changing input method options work in ibus-typing-booster without needing an ibus restart.

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Aug 21, 2022

I found another problem with bn-national-jatiya.mim. I am unable to send messages using bn-national-jatiya.mim on WhatsApp. But I can do that using m17n's other Bengali keyboard layout. Again if I try to message using bn-national-jatiya.mim layout in ibus-typing-booster, I can do that.

@mike-fabian
Copy link
Owner

Which other Bengali keyboard layout?

@mike-fabian
Copy link
Owner

Do you mean something like this?:

Peek.2022-08-23.17-47.mp4

@mike-fabian
Copy link
Owner

In this video, I am using ibus-m17n with bn-national-jatiya.mim.

First I type a b and I get ‌ঋ ন . That is OK.

Then I type b a and I get only . After typing only b, I see but when typing the space the vanishes again. This seems to happen only at the beginning of a line.

I am doing this in the firefox browser. I also tried this in the Telegram webclient, also in firefox and did not find the problem there.

@mike-fabian
Copy link
Owner

It is the same when using web.whatsapp.com in google-chrome.

@mike-fabian
Copy link
Owner

This reminds me of this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1850832

Maybe it is the same problem.

@Mahmudul-hasan613
Copy link
Author

Which other Bengali keyboard layout?

The screenshot shows all the layouts being typed correctly.

2022-08-23 21-56-56 হতে স্ক্রিনশট

@mike-fabian
Copy link
Owner

My guess at the moment is, that it has nothing to do with bn-national-jatiya.mim, even for bn-national-jatiya.mim there seem to be problems only with certain letters and this seems to be more an accident.

@Mahmudul-hasan613
Copy link
Author

Do you mean something like this?:
Peek.2022-08-23.17-47.mp4

Yes, I am talking about this problem... But when I try to write one letter, two letters appear. I tried to show that in the video.

23-8-22.10.06.02.+06.mp4

@mike-fabian
Copy link
Owner

Oh, very weird! And with ibus-typing-booster, this works fine, right?

ibus-m17n still seems to have many weird bugs which are very hard to track down, usually ibus-typing-booster works better and I know the code much better and can fix things more easily.

I will try to debug ibus-m17n in detail to find out what happens there in web.whatsapp.com, will take a few days though, I still feel a bit ill because of a corona virus infection.

@Mahmudul-hasan613
Copy link
Author

I still feel a bit ill because of a corona virus infection.

Is there still corona virus in your country...? But the coronavirus has left our country long ago. I pray to God that you get well soon.

@Mahmudul-hasan613
Copy link
Author

Oh, very weird! And with ibus-typing-booster, this works fine, right?

Yes.

@mike-fabian
Copy link
Owner

I feel much better already, Sunday was very bad, on Monday I had a positive PCR test but already felt much better. Still feeling a bit weird today, but maybe I am OK tomorrow already.

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Aug 23, 2022

I feel much better already, Sunday was very bad, on Monday I had a positive PCR test but already felt much better. Still feeling a bit weird today, but maybe I am OK tomorrow already.

This is good news.

@mike-fabian
Copy link
Owner

I added some new internal functions to ibus-typing-booster to be able to get and set m17n options:

mike-fabian/ibus-typing-booster@c2de7cd

This is a big step towards fixing:

mike-fabian/ibus-typing-booster#360

I have the needed functions now and just need to add more stuff to the setup ui to use them.

So soon one will be able to change options like whether to use automatic vowel formation for bn-national-jatiya.mim in the setup tool of ibus-typing-booster ....

@Mahmudul-hasan613
Copy link
Author

I added some new internal functions to ibus-typing-booster to be able to get and set m17n options:

mike-fabian/ibus-typing-booster@c2de7cd

You are working so hard to add Automatic Vowel Forming Switching option to ibus-typing-booster! It really inspires me a lot.

@Mahmudul-hasan613
Copy link
Author

This is a big step towards fixing:

mike-fabian/ibus-typing-booster#360

I have the needed functions now and just need to add more stuff to the setup ui to use them.

So soon one will be able to change options like whether to use automatic vowel formation for bn-national-jatiya.mim in the setup tool of ibus-typing-booster ....

It is not only for Bengali language. If the Automatic Vowel Forming option is added to the keyboard of any other language, then the feature will come in handy. Especially for Hindi or languages similar in writing to the Hindi language.

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Sep 1, 2022

Translation update from Weblate (bn added 42% complete)

I am actually a bit lazy. That is why it is so late to finish the Bengali translation of ibus-typing-booster. Also, translating technical words into Bengali is comparatively difficult. So I am doing the translation work with a little more time.

@mike-fabian
Copy link
Owner

2.18.11 test builds for Fedora to fix https://github.com/mike-fabian/ibus-typing-booster/issues/360`
are now available at: https://copr.fedorainfracloud.org/coprs/mfabian/ibus-typing-booster/builds/

The video here:

mike-fabian/ibus-typing-booster#360 (comment)

shows that you can now select the bn-national-jatiya input method in the ibus-typing-booster setup tool, then the button 🛠️ at the bottom becomes active, clicking that button then gives you a dialog to change the option

use-automatic-vowel-forming between 0 and 1.

If anything else apart from the allowed values 0 and 1 is typed into the entry, it is automatically changed into the default value 1.

To be able to input a 0 you see me switching to the English keyboard layout because if I try to type into that entry while ibus-typing-booster with bn-national-jatiya is active I get U+09E6 BENGALI DIGIT ZERO which is neither of the allowed values 0 and 1 and therefore it gets replaced by the default 1 again.

Contrary to ibus-m17n I managed to make changing these options to have an immediate effect, no ibus restart is needed.

@Mahmudul-hasan613
Copy link
Author

Mahmudul-hasan613 commented Sep 3, 2022

2.18.11 test builds for Fedora to fix https://github.com/mike-fabian/ibus-typing-booster/issues/360`
are now available at: https://copr.fedorainfracloud.org/coprs/mfabian/ibus-typing-booster/builds/

How to download, install and use the test version...?

@mike-fabian
Copy link
Owner

I have just pushed a release-candidate-2.18.12 branch:

https://github.com/mike-fabian/ibus-typing-booster/tree/release-candidate-2.18.12

If you want to try a build and install from source you can checkout that branch.

Instructions on how to build are here:
https://mike-fabian.github.io/ibus-typing-booster/docs/dev/

@mike-fabian
Copy link
Owner

I think the work on this issue is finished, closing.

@mike-fabian
Copy link
Owner

I have opened a new issue for the disappearing characters problem in https://web.whatsapp.com :

ibus/ibus-m17n#54

@Mahmudul-hasan613
Copy link
Author

I saw that ibus/ibus-m17n#54 bug report. It seems to be a very complicated problem! Thank you very much for working on the issue.

@Mahmudul-hasan613
Copy link
Author

By the way, from your screenshots I see that you are using your user interface in Bengali.

ibus-m17n and ibus-typing-booster unfortunately do not have Bengali translations yet.

Maybe you are interested in contributing translations?

Translations can be contributed here:

https://translate.fedoraproject.org/projects/ibus-m17n/app/

I took 55 days to complete the Bengali translation of ibus-typing-booster. The time is really taken too much. Still I managed to finish the job. This is the most important thing.

https://translate.fedoraproject.org/projects/ibus-typing-booster/app/

@mike-fabian
Copy link
Owner

I took 55 days to complete the Bengali translation of ibus-typing-booster. The time is really taken too much. Still I managed to finish the job. This is the most important thing.

No problem! It is great that you did it! Thank you very much!

I already pushed your translations to the main branch in git.

So the next release will have 100% complete Bengali translations ☺

@mike-fabian
Copy link
Owner

https://github.com/mike-fabian/ibus-typing-booster/releases/tag/2.19.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants