Closed
Bug 1237149
Opened 10 years ago
Closed 10 years ago
Incorrect search engines are shown for zh-CN
Categories
(Firefox for iOS :: General, defect)
Tracking
()
VERIFIED
FIXED
1.4
Tracking | Status | |
---|---|---|
fxios | 1.4+ | --- |
People
(Reporter: st3fan, Assigned: st3fan)
References
Details
Attachments
(2 files, 1 obsolete file)
For zh-CN we show an alternative list of search engines and a different default.
The files in Client/Assets/SearchPlugins/zh-CN/ look correct but when I change my iPhone to Simplified Chinese and China as the Region, I still get the US specific search engines and Yahoo as a default.
I checked NSLocale.currentLocale().localeIdentifier and it is correctly set to zh_CN.
I also checked the built .ipa file and all the SearchPlugins/zh-CN files are correctly included.
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(bnicholson)
Assignee | ||
Comment 1•10 years ago
|
||
Oh so when we use
let language = NSLocale.preferredLanguages().first!
We get zh-Hans-CN back.
So that will not match any of the directories in SearchPlugins.
Is there a reason we don't use NSLocale.currentLocale().localeIdentifier here?
Comment 2•10 years ago
|
||
Since this is related I figured I should ask here and get some additional verification. While I was uplifting the patches for the search engine .xml changes there were conflicts. Who would be the best person to NI to double check these?
https://github.com/mozilla/firefox-ios/tree/v1.x/Client/Assets/SearchPlugins/zh-CN
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8704857 -
Flags: review?(bnicholson)
Assignee | ||
Comment 4•10 years ago
|
||
Patch comment:
This patch introduces a `directoriesForLanguageIdentifier()` function that returns a list of `SearchPlugins` directories to search for the given *language identifier*.
This change was made so that we correctly handle the `zh-Hans-CN` *language identifier* which does not map to any of the `SearchPlugins` subdirectories but should default to the `zh-CN` one.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → sarentz
Comment 5•10 years ago
|
||
Comment on attachment 8704857 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1409
Looks good, a couple minor comments in the PR.
Flags: needinfo?(bnicholson)
Attachment #8704857 -
Flags: review?(bnicholson) → review+
Assignee | ||
Updated•10 years ago
|
Whiteboard: [needsuplift]
Assignee | ||
Comment 6•10 years ago
|
||
Merged.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 8•10 years ago
|
||
Reopen it because it still shows the incorrect search engine on iOS 8.4.1.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 9•10 years ago
|
||
Attachment #8705916 -
Flags: review?(sarentz)
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8705916 [details] [review]
Pull request for comment 8
I am ok with this change, but:
Please fix the testDirectoriesForLanguageIdentifier() test, which currently fails because directoriesForLanguageIdentifier() now returns a different preference for language identifiers.
Attachment #8705916 -
Flags: review?(sarentz) → review+
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(dxue)
Assignee | ||
Updated•10 years ago
|
Attachment #8705916 -
Flags: review?(bnicholson)
Assignee | ||
Comment 11•10 years ago
|
||
This is an alternative for the existing pull request that renames the directories.
I think I would prefer to just normalize the language identifier to get some commonality between iOS 8 and iOS 9. Specially because the search engine directories are generated by a script and are based on the Android ones. So I would prefer to keep the same locale identifiers in their names.
Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8705916 [details] [review]
Pull request for comment 8
See newly attached pull request with new and simpler approach.
Attachment #8705916 -
Flags: review+ → review?
Assignee | ||
Updated•10 years ago
|
Attachment #8706161 -
Flags: review?(dxue)
Attachment #8706161 -
Flags: review?(bnicholson)
Assignee | ||
Updated•10 years ago
|
Attachment #8705916 -
Attachment is obsolete: true
Attachment #8705916 -
Flags: review?(bnicholson)
Attachment #8705916 -
Flags: review?
Comment 14•10 years ago
|
||
Comment on attachment 8706161 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1427
LGTM. Might be worth exploring using currentLocale soon so we can properly handle other languages that have similar IDs.
Attachment #8706161 -
Flags: review?(bnicholson) → review+
Assignee | ||
Updated•10 years ago
|
Whiteboard: [needsuplift]
Assignee | ||
Comment 15•10 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 17•10 years ago
|
||
Verified on v1.4(1404).
It can shows the right search engines for zh-CN both on iOS 8.4.1 and iOS 9.2.
Comment 18•10 years ago
|
||
Changing the status to Verified based on the previous comment
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
Attachment #8706161 -
Flags: review?(dxue) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•