Closed Bug 861113 Opened 12 years ago Closed 12 years ago

Text prediction ignores capitalization of Polish letters

Categories

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

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-, b2g18+ fixed)

VERIFIED FIXED
blocking-b2g -
Tracking Status
b2g18 + fixed

People

(Reporter: stas, Unassigned)

References

Details

(Whiteboard: c=auto-suggest)

Attachments

(1 file)

Typing "Swiatl" correctly suggests "Światło", capitalized (among other words).

Typing "Światl", however, suggests "światła", "światło", "światowej".

v1.0.1 is not affected, as it uses a different prediction engine.

This is similar to bug 851565, which seems to have been fixed by bug 860462.
David, is this by any chance related to the auto-correction feature from bug 860462?
Flags: needinfo?(dflanagan)
 > v1.0.1 is not affected, as it uses a different prediction engine.

Then marking it as leo? rather than tef?
blocking-b2g: tef? → leo?
Sorry, my bad, I forgot tracking flags get cloned along with bugs…
FWIW, this doesn't happen with Spanish "Á" at the beginning of "Álbum."
The new autocorrect code I landed restricts its uppercase letters to those in the Latin-1 encoding:

  const UC = /^[A-ZÀ-ÖØ-Þ]+$/;           // all uppercase latin characters

We need to extend this regular expression so that it also includes all Unicode uppercase letters.  Stas: do you happen to know a complete list of Latin-like uppercase letters?
Blocks: 797170
Flags: needinfo?(dflanagan) → needinfo?(stas)
Tracking, not blocking, this looks like a low-risk fix, nominate for uplift when ready.
blocking-b2g: leo? → -
tracking-b2g18: --- → +
Adding whiteboard tags for tracking via srumbu.gs.
Whiteboard: c=keyboard
unicode has information, I found http://www.unicode.org/charts/PDF/U0180.pdf by looking at http://www.unicode.org/charts/charindex.html. There's lots of data there.

I'm wondering if you can just use toLowerCase or toLocaleLowerCase and take it from there? Not sure which logic deals best with non-letter characters.
Flags: needinfo?(stas)
Attached file link to patch on github (deleted) —
Evelyn,

I'm asking for your review here because you worked on a similar bug for the 1.0.1 branch.

In this case, I was defining uppercase letters with a regexp that only included the Latin-1 charset. So it was excluding polish letters and couldn't tell that accented uppercase letters were uppercase.

I've changed that so it defines an uppercase letter as any letter x where x.toLowerCase() is not the same as x.  This is a more general definition and works anywhere that toLowerCase() works.

In my testing, this fixes the bug that Stas reported. Note, however that when I land 865484, that is going to alter the prediction engine, and the results it reports and his particular examples may no longer work.
Attachment #742230 - Flags: review?(ehung)
The code makes sense but I need to verify it. I will test this patch later because I'm working on a leo+ and there is a tef+ review request pending. Sorry!
Landed on master: https://github.com/mozilla-b2g/gaia/commit/58665c2e62206c59356e1a4c040fa81251294e55
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 742230 [details]
link to patch on github

Clearing the review request. I landed this unreviewed because it was a very simple patch that needed to land before a much larger complicated patch in bug 865484.
Attachment #742230 - Flags: review?(ehung)
Whiteboard: c=keyboard → c=auto-suggest
Blocks: 873934
Word Suggestions in the Polish language setting are now being capitalized correctly. 
Tested on b2g/nightly/mozilla-central-unagi/latest

Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/mozilla-central/rev/3c6f2394995d
Gaia: d2ad0f1a5a6be8a2d6df721ba3c2b33e037c423b
Status: RESOLVED → VERIFIED
Please add a testcase for this bug to moztrap for 1.1 testsuite.  If yes, mark this in-moztrap+ when completed.  If not, mark this in-moztrap-.
Flags: in-moztrap?(cschmoeckel)
Added Keyboard Suite Test Case #8450 - [Keyboard] Text prediction text entry in Polish keeps the capitalization entered by the user
Flags: in-moztrap?(cschmoeckel) → in-moztrap+
Uplifted to v1-train in bug 873934
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: