Closed
Bug 906058
Opened 11 years ago
Closed 11 years ago
Make snippet locale matching check all locales, not just the first one
Categories
(Snippets :: Service, defect)
Snippets
Service
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: osmose, Unassigned)
Details
Currently, when Snippets is trying to match a snippet to a client's locale, it finds the first locale that is a prefix of the client's locale and filters by that. For example, if a user came in with es-MX and the first locale found was `es`, they'd only receive snippets that are set to go out to the `es` locale. If a snippet was specifically targeted to es-MX, they wouldn't see it. This should change so that both `es` and `es-MX` are used when matching snippets to a user with a locale like es-MX.
Comment 1•11 years ago
|
||
Question - so if I ran a snippet in Spain with two locales 'es' and 'es-ES', are you saying that the users would only see the 'es'?
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to jcollings from comment #1) > Question - so if I ran a snippet in Spain with two locales 'es' and 'es-ES', > are you saying that the users would only see the 'es'? A single snippet with the two locales es-ES and es would be seen by all users with the es-ES locale. It would also be seen by some users in other es- locales, like es-MX. Where the bug comes in is that some users in es-MX may not see it because we match them as es-MX instead of just es, and the snippet doesn't have the es-MX locale. For now the best bet is to include all es- locales when you want to target every Spanish-speaking locale. Same with other locales: when you want an English snippet to go to every English locale, you add all of the en- locales to the list. This bug really only affects a corner case that we don't normally run into.
Comment 3•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/snippets-service https://github.com/mozilla/snippets-service/commit/b3888f8b3fbe0a199b264a654a1687124575df27 Fix bug 906058: Include every matching locale in locale filter.
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•11 years ago
|
||
Verified that requests for snippets in es-MX are now returning snippets in es and in es-MX.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•