Make Account Provisioner compare providers against general.useragent.locale instead of any values of intl.accept_languages

RESOLVED FIXED in Thunderbird 16.0

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

(Blocks 1 bug)

Trunk
Thunderbird 16.0
x86
All
Dependency tree / graph

Thunderbird Tracking Flags

(thunderbird13 fixed, thunderbird14 fixed, thunderbird15 fixed)

Details

Attachments

(1 attachment)

The Account Provisioner dialog currently compares each returned provider's supported locales against each locale in intl.accept_languages. This way, we only show the providers that support the user's locale.

It turns out that this is meaningless, since en-US is always included in intl.accept_languages.

We should use general.useragent.locale instead.

Also, we should special case "*" to mean that a provider supports all locales.
Posted patch Patch v1Splinter Review
This patch switches us to using general.useragent.locale, and introduces the ability for providers to pass back a wildcard character ("*") to indicate that they support all locales.

I had to fix our tests to account for this change, and also introduced a new test for the wildcard.
Assignee: nobody → mconley
Status: NEW → ASSIGNED
Attachment #632340 - Flags: review?(bwinton)
Comment on attachment 632340 [details] [diff] [review]
Patch v1

>+++ b/mail/test/mozmill/newmailaccount/html/providerListWildcard
>@@ -0,0 +1,37 @@
>+ {"id": "French",
>+  "label": "French Provider",
>+  "paid": false,
>+  "languages" : ["fr-FR"],

As I found out recently, the locale for French is just "fr"…  Who knew?  :)

Other than that, r=me!

Later,
Blake.
Attachment #632340 - Flags: review?(bwinton) → review+
(In reply to Blake Winton (:bwinton - Thunderbird UX) from comment #2)
> Comment on attachment 632340 [details] [diff] [review]
> Patch v1
> 
> >+++ b/mail/test/mozmill/newmailaccount/html/providerListWildcard
> >@@ -0,0 +1,37 @@
> >+ {"id": "French",
> >+  "label": "French Provider",
> >+  "paid": false,
> >+  "languages" : ["fr-FR"],
> 
> As I found out recently, the locale for French is just "fr"…  Who knew?  :)
> 
> Other than that, r=me!
> 
> Later,
> Blake.

Ha! Well, since it's only for tests, I'll leave it in for now. I'll file an easy fix bug to correct those (since that happens in a few other points in our tests).
Comment on attachment 632340 [details] [diff] [review]
Patch v1

a? across the board, since we want to undo sancus's workaround ASAP.
Attachment #632340 - Flags: approval-comm-release?
Attachment #632340 - Flags: approval-comm-beta?
Attachment #632340 - Flags: approval-comm-aurora?
Comment on attachment 632340 [details] [diff] [review]
Patch v1

[Triage Comment]
a=me as it looks like we want this to help with the server side issues. Please land on aurora and beta as well as the closed tree of release (default branch).
Attachment #632340 - Flags: approval-comm-release?
Attachment #632340 - Flags: approval-comm-release+
Attachment #632340 - Flags: approval-comm-beta?
Attachment #632340 - Flags: approval-comm-beta+
Attachment #632340 - Flags: approval-comm-aurora?
Attachment #632340 - Flags: approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.