Last Comment Bug 741842 - Improve BCP 47 language tag support (extension, singleton, privateuse)
: Improve BCP 47 language tag support (extension, singleton, privateuse)
Status: RESOLVED FIXED
[bcp47]
:
Product: Core
Classification: Components
Component: Spelling checker (show other bugs)
: Trunk
: All All
: -- minor (vote)
: mozilla14
Assigned To: Gordon P. Hemsley [:GPHemsley]
:
: Jet Villegas (:jet)
Mentors:
Depends on: 730209
Blocks: 739861
  Show dependency treegraph
 
Reported: 2012-04-03 09:37 PDT by Gordon P. Hemsley [:GPHemsley]
Modified: 2012-06-14 10:00 PDT (History)
3 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Improve support for extension and privateuse subtags (17.02 KB, patch)
2012-04-03 10:05 PDT, Gordon P. Hemsley [:GPHemsley]
gavin.sharp: review+
Details | Diff | Splinter Review
Improve support for extension and privateuse subtags (v2) (17.38 KB, patch)
2012-04-03 17:39 PDT, Gordon P. Hemsley [:GPHemsley]
no flags Details | Diff | Splinter Review

Description Gordon P. Hemsley [:GPHemsley] 2012-04-03 09:37:07 PDT
I realized that bug 730209 doesn't support BCP 47 language tags that make use of extensions or private use subtags. At present, if such a language tag is the name of a dictionary, it will (I believe) display the entire language tag raw. A better behavior, I think, would be to simply ignore the extension and privateuse subtags if they are unsupported (which they currently are).

In addition, the tests included in that bug are not as exhaustive as they could be, so that should also be improved.

(I have code for this already; patch will be attached shortly.)
Comment 1 Gordon P. Hemsley [:GPHemsley] 2012-04-03 10:05:10 PDT
Created attachment 611861 [details] [diff] [review]
Improve support for extension and privateuse subtags

Updates the regexp and adds a bunch of tests.
Comment 2 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-04-03 13:17:26 PDT
Comment on attachment 611861 [details] [diff] [review]
Improve support for extension and privateuse subtags

rs=me
Comment 3 Gordon P. Hemsley [:GPHemsley] 2012-04-03 13:23:58 PDT
Pushed to try:
https://tbpl.mozilla.org/?tree=Try&rev=ba49a841ccef
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-04-03 17:14:59 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/62e4dcb92be0
Comment 5 Gordon P. Hemsley [:GPHemsley] 2012-04-03 17:25:05 PDT
Ugh, I forgot to mention explicitly that this code presupposes the code for bug 716321. Since that code is not yet in m-i/m-c, I think we'll wind up with a failing test.

The test on line 106 of toolkit/content/tests/browser/browser_InlineSpellChecker.js ('es-419') should be marked as todo_is.
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-04-03 17:34:10 PDT
Changed the test to todo_is.
https://hg.mozilla.org/integration/mozilla-inbound/rev/031f54b05818
Comment 7 Gordon P. Hemsley [:GPHemsley] 2012-04-03 17:39:09 PDT
Created attachment 612041 [details] [diff] [review]
Improve support for extension and privateuse subtags (v2)

Here's the patch with the change integrated into, in case it's needed.
Comment 8 Marco Bonardo [::mak] 2012-04-04 05:07:33 PDT
https://hg.mozilla.org/mozilla-central/rev/62e4dcb92be0
Comment 9 Marco Bonardo [::mak] 2012-04-04 05:07:55 PDT
and https://hg.mozilla.org/mozilla-central/rev/031f54b05818

Note You need to log in before you can comment on or make changes to this bug.