Closed Bug 842592 Opened 11 years ago Closed 11 years ago

Adding Bangla Input Method for B2G

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

defect
Not set
normal

Tracking

(b2g-v1.2 fixed, b2g-v1.3 fixed)

RESOLVED FIXED
Tracking Status
b2g-v1.2 --- fixed
b2g-v1.3 --- fixed

People

(Reporter: tuxboy, Assigned: tuxboy)

References

Details

Attachments

(3 files, 2 obsolete files)

Attached file Pull request from GitHub (obsolete) —
User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17

Steps to reproduce:

Tried to type in Bangla (bn_BD, indic language).


Actual results:

No Input Method supporting Bangla was found.


Expected results:

I should have had a keyboard supporting Bangla characters popped up!
I'm curious about the choice of keyboard layout here - it seems quite different to the Bangla layouts I have on either OS X or Windows. Are there widely-established compact layouts in use on mobile devices in the Indian and/or Bangladeshi markets?
The most popular keyboard layout "Bijoy" is copyrighted and patented. The Probhat layout is the most popular among the open source community and comes by default with GNOME/KDE and iBus.
Almost none of the people here don't use the IMEs bundled with Windows or OSX. They use third party applications for providing IMEs.
Comment on attachment 716339 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8222

I think this patch (the attachment 715523 [details] [review]) is OK to merge.
However, we could not see the key character shown on the device, possibly because of the font issue. Will need to create an follow-up for that.

--
Just submitted a follow-up pull request to address some minor issues in https://github.com/mozilla-b2g/gaia/pull/8151.

    1. Remove using type in keyboard layout.
    2. Add l10n string in settings for "indic".


Hi Tim,
Could you please help review this, that is only this commit
https://github.com/RudyLu/gaia/commit/f0cd9cb09d8cc98c6048785b63435cf64b61e0b5
Attachment #716339 - Flags: review?(timdream)
Comment on attachment 715523 [details] [review]
Pull request from GitHub

Looks good.
I'll just send another pull request which is based on this.

Aniruddha,
Thank you for the good work!
Attachment #715523 - Flags: review+
Comment on attachment 716339 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8222

Hi Stas,

Please be informed we added a new key, "indic", into settings,
apps/settings/locales/settings.en-US.properties

Thanks.
Attachment #716339 - Flags: review?(stas)
However, I can see the font render in r2d2b2g!
Comment on attachment 716339 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8222

> Could you please help review this, that is only this commit
> https://github.com/RudyLu/gaia/commit/f0cd9cb09d8cc98c6048785b63435cf64b61e0b5

This part looks good. However the commits are not squashed. Rudy, could you help the contributors on the chores?
Attachment #716339 - Flags: review?(timdream) → review+
Comment on attachment 716339 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/8222

I'm giving this an r-, we shouldn't add keyboards that our fonts can't render.

And yes, MozTT at least is missing out on 63 glyphs for bn.
Attachment #716339 - Flags: review?(stas) → review-
Can external fonts be added which are licensed under the Open Font License or GPL? Or do we have to wait for designers to add Bengali glyphs to MozTT?
(In reply to Aniruddha Adhikary from comment #11)
> Can external fonts be added which are licensed under the Open Font License
> or GPL? Or do we have to wait for designers to add Bengali glyphs to MozTT?

Josh?
Flags: needinfo?(jcarpenter)
In principle, we should not expect that MozTT will ever include the glyphs for -all- the world's languages. (There are technical barriers to that, in addition to the design challenges it would entail.)

Rather, we should be shipping separate fonts on the devices to provide glyph coverage for other (non-Latin) scripts - e.g. the Lohit collection for Indic scripts. Probably worth filing a separate bug specifically on that issue. Once the fonts are in place, we could then add this keyboard, as well as similar ones for the other Indic scripts.
Just filed a new bug for the font issue: https://bugzilla.mozilla.org/show_bug.cgi?id=843592
Depends on: 843592
(In reply to Jonathan Kew (:jfkthame) from comment #13)
> In principle, we should not expect that MozTT will ever include the glyphs
> for -all- the world's languages. (There are technical barriers to that, in
> addition to the design challenges it would entail.)
> 
> Rather, we should be shipping separate fonts on the devices to provide glyph
> coverage for other (non-Latin) scripts - e.g. the Lohit collection for Indic
> scripts. Probably worth filing a separate bug specifically on that issue.
> Once the fonts are in place, we could then add this keyboard, as well as
> similar ones for the other Indic scripts.

OTH, we're explicitly referencing MozTT in CSS throughout gaia, https://github.com/search?p=1&q=moztt+repo%3Amozilla-b2g%2Fgaia&ref=searchresults&type=Code. Is that bad?

We're having bugs where we don't fall back to anything useful, like bug 828299
Blocks: 919988
Ping.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(rlu)
I think the font support is ready to land in bug 843592.

I don't think that the current PR still merges to master, though.
Flags: needinfo?(jcarpenter)
I found out that the moztt repo added Lohit fonts, so Bengali script is now supported. *ping*!
Attachment mime type: text/plain → text/x-github-pull-request
Marking as koi as we are shipping in 1.2 and there is currently Keyboard to test in Bengali
blocking-b2g: --- → koi?
Hi Aniruddha,

I am sorry that this bug went attended for weeks. Make sure there is always a needinfo?, feedback?, and/or review? pointing to someone next time.

Your patch cannot be r+'d because according to Travis CI you got lint errors in the code. Please fix them and re-request for review (to :rudyl or me, :timdream) on this attachment.
Attachment #715523 - Attachment is obsolete: true
Attachment #716339 - Attachment is obsolete: true
Attachment #824501 - Flags: review-
Flags: needinfo?(aniruddha)
(In reply to delphine from comment #20)
> Marking as koi as we are shipping in 1.2 and there is currently Keyboard to
> test in Bengali

Having been working in the l10n community, as much as I like to get our i18n and l10n up and ready, we don't decide blocking status this way. Blocking means Mozilla is really going to ship a phone to the mess public with our partner in the given locale/market.

This bug is marking good progress and I can see it gets resolved by Aniruddha before v1.3 ships.
Also, v1.2 will be shipped with 3rd-party keyboard support enabled, so even if this layout not getting into v1.2, we could surely install an external one for v1.2 phones.
Flags: needinfo?(rlu)
BTW, you could reuse your pull request (thus reset the review flag on the same attachment) by amend the comment and force push to the same branch on Github. It seems that you have not realized that yet :)
blocking-b2g: koi? → -
Tim: not sure I understand your comment 22
Mozilla is required to ship in Bengali for 1.2 (it's a partner requirement), which is why I don't understand Comment 22. Bengali currently has no keyboard, is this not the bug for creating one?
Thanks
blocking-b2g: - → koi?
Flags: needinfo?(timdream)
Oops didn't mean to reset koi? there...
We're blocking on other missing keyboards for v1.2 shipping locales, which is why I'm wondering why we're not blocking on this one.
blocking-b2g: koi? → ---
Sorry Just understood your comment, wasn't clear at the first reads.
Excuse the noise
Flags: needinfo?(timdream)
I am sorry that this bug does not land in time. However because of bug 884752 you would need to rebase your patch.

I've updated the documentation for you on that.
https://wiki.mozilla.org/Gaia/System/Keyboard/Layout
Assignee: nobody → aniruddha
Okay, working on it! Thanks :)
Flags: needinfo?(aniruddha)
(In reply to Aniruddha Adhikary from comment #29)
> https://github.com/mozilla-b2g/gaia/pull/13263

Hi Aniruddha,

Please attach the patch in Bugzilla by the way described here, other wise I will not be able to set any review flag.
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking#Submitting_a_patch

Also, there seems to be some syntax issue with the file in your pull request. Did you really tested it locally?
Flags: needinfo?(aniruddha)
Syntax issues fixed! Issued a new pull request: https://github.com/mozilla-b2g/gaia/pull/13328

Test didn't succeed, the the keyboard app of gaia didn't get built before or after adding my patches!
Flags: needinfo?(aniruddha)
(In reply to Aniruddha Adhikary from comment #31)
> Syntax issues fixed! Issued a new pull request:
> https://github.com/mozilla-b2g/gaia/pull/13328
> 
> Test didn't succeed, the the keyboard app of gaia didn't get built before or
> after adding my patches!

I am guessing you didn't test your keyboard. Here is how you test the keyboard using desktop b2g build or firefox nightly.

Checkout my branch: https://github.com/arky/gaia/tree/Bengali-FxOS-Keyboard

$ cd gaia 

$ GAIA_KEYBOARD_LAYOUTS=en,bn make

$ b2g -profile ./profile

Enable the keyboard in Settings and you can test it with apps
Attached image Bangala-Keyboard.png
The keyboard is all skewed. :(
I have recently ran a poll in the Mozilla Bangladesh Facebook Group about the input method of their choice for being used on mobile phones. The one I was trying to implement was the "Probhat" fixed keyboard layout. However, the community voted for a more widely used Complex IME named Avro Phonetic. Here is the link to the poll: https://www.facebook.com/groups/MozillaBD/permalink/642602415790645/ From x people, 22 voted for Avro Phonetic (a latin -> Bengali transliteration IME), 5 for Probhat, 3 for Unijoy and 1 for National Keyboard layout.

Aside from being the most popular input method for Bangla in Bangladesh, this allows easy input which most fixed keyboard layouts cannot provide, especially on mobile devices. Since you just have to type how the word is pronounced in latin, and the word gets transliterated to Bangla script, the ease of use is clearly visible.

Avro Phonetic (and the javascript port of Avro Phonetic), a project of the Omicronlab (http://www.omicronlab.com) is licensed under the Mozilla Public License 1.1. (See my repo for the code: https://github.com/aniruddha-adhikary/gaia/commit/fc75c06db0e0920bb45354cdfba7d38d51787555) I have tested the IME multiple times on Desktop and my Keon, works fine! (https://archive.org/details/AvroPhoneticOnFirefoxOS)
Great! Can you please attach a patch to this bug and request review from RudyL.
AFAIK, Bengali script is same for Bn-BD and Bn-IN. Suggest using 'bn' instead of 'bn-BD' in the patch.
Attachment #8337389 - Flags: review?(rlu)
Comment on attachment 8337389 [details] [review]
Avro and Probhat Bangla Input Methods

1. As mentioned before, the library, jsavrophonetic.js, itself cannot pass jslint, which will fail the travis process.

If it is not required to pass lint since it is an external library, you may add this file into '.jshintignore'. 


2. Please help check the comments on the pull request about the copy right statement.

3. It would be great if you can help to add these new layout entries into shared/resources/keyboard_layouts.json under "bn-BD".
   (Could be a follow-up that I can help with.)

Thanks for your work!

--
I'll clear the review flag first, please flag me back so I'll be notified.
Attachment #8337389 - Flags: review?(rlu)
Aniruddha, I hope these keyboards were tested by the Mozilla Bangla Community. Such user testing would be key to wider adoption.
Flags: needinfo?(aniruddha)
Comment on attachment 8337389 [details] [review]
Avro and Probhat Bangla Input Methods

Aniruddha,

r=me.
Thanks for your contribution.
Please help to squash the commits into a single one, and let me know if you need any help.
Attachment #8337389 - Flags: review+
Yes :arky, the keyboards were tested by some of my friends and specifically by Mahay Alam Khan (at least), he confirmed it to work fine!
Flags: needinfo?(aniruddha)
(In reply to Rudy Lu [:rudyl] from comment #40)
> Comment on attachment 8337389 [details] [review]
> Avro and Probhat Bangla Input Methods
> 
> Aniruddha,
> 
> r=me.
> Thanks for your contribution.
> Please help to squash the commits into a single one, and let me know if you
> need any help.

Done! Squashed into a single commit.
Merged to Gaia master,
https://github.com/mozilla-b2g/gaia/commit/47161c8a657c25ee7b29c84ce3b4e4df191c09a0

--
Thanks for the contribution to Firefox OS!
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
\o/ Awesome guys!
Comment on attachment 8337389 [details] [review]
Avro and Probhat Bangla Input Methods

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): n/a, this is a new keyboard layout.
[User impact] if declined: The users in Bangla cannot try this new layout with v1.2 on some develoer preview phones.
[Testing completed]: yes, manually.
[Risk to taking this patch] (and alternatives if risky): N/A, these layouts would be opted in in build script, so won't be able to affect other builds without those layouts enabled.
[String changes made]: N/A.
Attachment #8337389 - Flags: approval-gaia-v1.2?(timdream)
Attachment #8337389 - Flags: approval-gaia-v1.2?(timdream) → approval-gaia-v1.2+
Uplifted 47161c8a657c25ee7b29c84ce3b4e4df191c09a0 to:
v1.3 already had this commit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: