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

RESOLVED FIXED in Thunderbird 16.0

Status

Thunderbird
Account Manager
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 16.0
x86
All

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.
Created attachment 632340 [details] [diff] [review]
Patch v1

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+
comm-central: https://hg.mozilla.org/comm-central/rev/cf6384197101
comm-aurora: https://hg.mozilla.org/releases/comm-aurora/rev/83b420f93ba6
comm-beta: https://hg.mozilla.org/releases/comm-beta/rev/2d4b4998b70b
comm-release: https://hg.mozilla.org/releases/comm-release/rev/3978ae2bc252
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
status-thunderbird13: --- → fixed
status-thunderbird14: --- → fixed
status-thunderbird15: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
You need to log in before you can comment on or make changes to this bug.