Closed Bug 974794 Opened 8 years ago Closed 8 years ago

Add a sophisticated IME-based Vietnamese keyboard to Firefox OS

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.4 affected, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S1 (9may)
Tracking Status
b2g-v1.4 --- affected
b2g-v2.0 --- fixed

People

(Reporter: rudyl, Assigned: tedders1)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #934198 +++

According to bug934198 comment13, Trung suggest to add a sophisticated IME based Vienamese keyboard.

We could keep tracking this work here as another bug, while keeping the original bug to track the work of a basic Vietnamese keyboard.
See Also: → 934198
Hi. I'm a Mozillian with a strong understanding of Vietnamese orthography and input methods. I see that nobody is assigned to this issue, so I decided to work on it.

I've written an IME for Vietnamese. It's based on the traditional AĐERTY layout used for Vietnamese typewriters, which can be seen in this photo: https://www.flickr.com/photos/13712099@N05/1503345730/in/photostream/ . 

(That's not my photo, but I've seen typewriters like it in real life. My grandfather had one.)

You'll see that the AĐERTY layout is similar to the French AZERTY, except it omits the F, J, W, and Z keys and replaces them with keys for Ă, Đ, Ơ, and Ư. It also omits the apostrophe (unused in Vietnamese), while having various dead keys for "hat" (^) and the five tone marks. I've put a hat key where the apostrophe used to be (for typing Â, Ê, and Ô), while the five tone marks show up as IME candidates when they are applicable.

The AĐERTY keyboard is much more intuitive for typing Vietnamese than any of the QWERTY-based input methods because it make the various diacritics much easier to access. Unfortunately, AĐERTY was a victim of the decades when American manufacturers weren't allowed to export products to Vietnam. IBM never made a Vietnam-specific computer, and so US QWERTY became the de facto standard computer keyboard in Vietnam. 

But I see no reason why we can't bring it back for Firefox OS.

I've also included a QWERTY-based layout in my IME, for people who prefer it. It behaves in a way consistent with our other keyboards (i.e. You long press for the diacritics -- no Telex key combinations). But as with all the QWERTY-based methods, it's a bit confusing for newcomers and I'd rather it wasn't the default.
Assignee: nobody → tclancy
Attached file Bug 974794: Vietnamese IME (obsolete) —
Attachment #8402491 - Flags: review?(rlu)
Trung attached a separate IME implementation to bug 934198 before this bug was split out. Other than the AĐERTY layout, how does it compare?
Hi Minh.

I had a look at Trung's patch. Trung's IME is an implementation of the Telex input method. That's an input method where the user uses key combinations to enter diacritics. (For example, to get Ă you type AW. To get Ê you type EE, etc.) Tones are indicated by typing another letter on the end. (For example, to get Ể you type EER. To get Ễ you type EEX. To get Ệ you type EEJ, etc.)

The Telex input method is based on the way Vietnamese was formerly represented in telegrams (hence the name "Telex"). Because it requires memorization, it's one of the least used input methods on computers, although it's popular with professional typists, and it's available on iPhone and Android.

My AĐERTY-based IME doesn't require any learning (the QWERTY variant requires the user to know about long-pressing keys, but that's it), and I think it's better for audience we're targeting. My IME also checks that the entered syllables are valid according to Vietnamese othography and phonemics, and it has some support for auto-capitalization and removing spaces before periods.

There's no reason we can't include both IMEs (indeed, some users might want to use Telex), although in that case, I think Trung's IME should be renamed to "Vietnamese - Telex".

That way, we'd have three options:
* Vietnamese           (mine, AĐERTY)
* Vietnamese - QWERTY  (mine, QWERTY-variant with the long-pressing for diacritics)
* Vietnamese - Telex   (Trung's)

I think the default should be the one that is most friendly to novices, and that would be AĐERTY, so that's why it simply says "Vietnamese". Telex is good for people who want it, but I definitely don't think the Telex should be the default. 

Keep in mind that some of target audience have never owned a computer before. They have no reason to know what Telex is.
Thanks, that makes sense. (I myself use VIQR on the desktop because I find Telex's mneumonics harder to remember.) It sounds like a combination of your patch and Trung's would address both this bug and bug 934198.
This patch combines my AĐERTY-based IME (with a QWERTY long-press variant) and Trung's Telex-based IME into a single patch.
Attachment #8402491 - Attachment is obsolete: true
Attachment #8402491 - Flags: review?(rlu)
Attachment #8403798 - Flags: review?(rlu)
I've combined Trung's code and my code into a single patch, which is now attached to this Bugzilla ticket.

I updated and cleaned up Trung's patch slightly and made sure that it passes jshint. I also renamed his jsbogo.js to jstelex.js, because I think it helps if the purpose of the file is apparent from its name. But I left his copyright notice in place and the name BoGo still appears in the code. I only changed it in places that had to match the file name.

If this patch lands, the following keyboards will be selectable in the Settings app:

* Tiếng Việt
* Tiếng Việt (QWERTY)
* Tiếng Việt (Telex)

I think we can close Bug 934198 now. I don't think having a "plain" (non-IME) Vietnamese keyboard is necessary if we have these IMEs, and I don't think it's desirable or practical either. (Having 18 different O's pop up when you long-press an O isn't easy to use.)

This patch doesn't preclude us from adding word-prediction at a later date.
Sorry that I still don't have time to get to the review.
Please help redirect to another reviewer if it is urgent. If not, I'll try to review this next week.

Thanks for your patience.
Status: NEW → ASSIGNED
Hi Rudy. Have you had a chance to look at this yet?
Whiteboard: [systemsfe]
Comment on attachment 8403798 [details] [review]
Bug 974794: Vietnamese IME. Incorporates Trung Ngo's Telex IME code.

Ted,

Sorry again for the delay.
Generally this looks good.

Please help take a look at this file, and we might want to add some of the newly added layouts to this list, so that they could be enabled after language change.
build/config/keyboard-layouts.json

I might need someone else to look at these layouts since I know nothing about Vietnamese. Can you find one for us or Minh already did this?
BTW, I'd like to set feedback to Trung since this includes his code.

Thanks a lot for your great contribution to Firefox OS!
Attachment #8403798 - Flags: review?(rlu)
Attachment #8403798 - Flags: review+
Attachment #8403798 - Flags: feedback?(ndtrung4419)
Comment on attachment 8403798 [details] [review]
Bug 974794: Vietnamese IME. Incorporates Trung Ngo's Telex IME code.

It's been two weeks and we haven't heard from Trung, so I'm removing the feedback flag. (I sent him an email last week, but didn't get a response.) If he wanted to comment on what I did with his code, I think he would have done so by now.
Attachment #8403798 - Flags: feedback?(ndtrung4419)
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/gaia/commit/dbfd4baee0bfa5f6fa37dafc2fe69605aecb0751
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
Hey - not really sure how to go about this one. 
Vietnamese is requested by partners from 1.4 and onwards. Can we get Vietnamese keyboard added to 1.4 as well please? Please reset flags if needed
blocking-b2g: --- → 2.0?
Flags: needinfo?(timdream)
(In reply to Delphine Lebédel [:delphine - please need info] from comment #13)
> Hey - not really sure how to go about this one. 
> Vietnamese is requested by partners from 1.4 and onwards. Can we get
> Vietnamese keyboard added to 1.4 as well please? Please reset flags if needed

v1.4 is only open for approval patches.

https://wiki.mozilla.org/Release_Management/B2G_Landing#v1.4

Need RM to say if we could add feature to it.
Flags: needinfo?(timdream) → needinfo?(bbajaj)
[Blocking Requested - why for this release]:

[Triage] Considering current 2.0 timing and the need from partner, nom. to 2.1 (or even 2.2?) instead for consideration.
blocking-b2g: 2.0? → 2.1?
Delphine/BD team are still trying to figure how the new locales on 1.4 will be getting added, (most likely will be by partner directly). So for now, I'll clear the NI and nomination.
blocking-b2g: 2.1? → ---
Flags: needinfo?(bbajaj)
You need to log in before you can comment on or make changes to this bug.