Closed Bug 1251289 Opened 9 years ago Closed 9 years ago

Fix chrome.i18n.getAcceptLanguages to *not* replace dashes with underscores in language codes

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Iteration:
47.3 - Mar 7
Tracking Status
firefox47 --- fixed

People

(Reporter: bsilverberg, Assigned: bsilverberg)

References

Details

Attachments

(1 file)

As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1213450#c49 and beyond, Chrome does not replace dashes `-` with underscores `_` in the return value of getAcceptLanguages() so we should also not do that replacement.
Assignee: nobody → bob.silverberg
Blocks: 1246749
Status: NEW → ASSIGNED
Iteration: --- → 47.3 - Mar 7
Flags: blocking-webextensions+
Attachment #8723634 - Flags: review?(kmaglione+bmo) → review+
Comment on attachment 8723634 [details] MozReview Request: Bug 1251289 - Fix chrome.i18n.getAcceptLanguages to *not* replace dashes with underscores in language codes, r?kmag https://reviewboard.mozilla.org/r/36643/#review33163 Thanks! ::: toolkit/components/extensions/ExtensionUtils.jsm:439 (Diff revision 1) > }); `result.trim().split(/\s*,\s*/g)` would be simpler.
Depends on: 1213450
Comment on attachment 8723634 [details] MozReview Request: Bug 1251289 - Fix chrome.i18n.getAcceptLanguages to *not* replace dashes with underscores in language codes, r?kmag Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36643/diff/1-2/
https://reviewboard.mozilla.org/r/36643/#review33163 > `result.trim().split(/\s*,\s*/g)` would be simpler. Nice. :) I don't think I need that initial `trim()` anymore though, do I. I wrote it without it and it seems to return what I want.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: