Closed Bug 351817 Opened 18 years ago Closed 18 years ago

Implement pref-based search parameters

Categories

(Firefox :: Search, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

(Keywords: fixed1.8.1)

Attachments

(2 files)

For various partner builds we'd like to be able to set search parameters based on the value of a pref, rather than hardcoding the value into the searchplugin. This should use a special prefbranch so that searchplugins installed off the web don't have access to random preferences.

Gavin's proposed syntax:

<MozParam name="fr" condition="pref" pref="yahoo-fr" />

with pref("browser.search.param.yahoo-fr", "moz2");

will produce fr=moz2 as a search parameter.
Per partner-build discussion, would really like to get this in for FF2.
Flags: blocking-firefox2?
Assignee: gavin.sharp → benjamin
Status: NEW → ASSIGNED
Attachment #237342 - Flags: review?(gavin.sharp)
Comment on attachment 237342 [details] [diff] [review]
<MozParam condition="pref">

Please indent all the code under the case and the case itself another 2 spaces, and put the catch on the same line as the closing brace, to match this file's style.

It would also be a good idea to post to m.d.l10n to notify localizers of this change, so they can fix their Yahoo plugins.
Attachment #237342 - Flags: review?(gavin.sharp) → review+
More importantly, schrep should include this fix in the l10n requirements doc.
Where is that doc?
Flags: blocking-firefox2? → blocking-firefox2+
Comment on attachment 237349 [details] [diff] [review]
Fix localized searchplugins, rev. 1

For what I know, the russian yahoo plugin should get the fr= code removed, as it doesn't have the plugin on position 2. Confirm with schrep.

With that, r/a=me, I think we should be good to land that ourselves, if we feel like it. It would certainly take some pressure out of the release process.
Attachment #237349 - Flags: review+
Code bits fixed on trunk. I'm not going to mess with non-English searchplugins for the moment.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: blocking-firefox2+ → blocking-firefox2?
Resolution: --- → FIXED
Attachment #237342 - Flags: approval1.8.1?
Flags: blocking-firefox2? → blocking-firefox2+
1) Doc is here:

http://wiki.mozilla.org/Firefox2/L10n_Requirements

2) What would you like me to add?

3) If Russia is in #3 you can remove the parm

4) You guys rock!


I would think that the requirements doc should have a How-To section similar to the one that Google has, with something like

'''How To:'''
Locales with a dedicated yahoo service should create a yahoo-ab-CD.xml. The <code>fr</code> search param should be implemented as

 <MozParam name="fr" condition="pref" pref="yahoo-fr-cjkt" />

for China, Japan, Korea, or Taiwan, and as

 <MozParam name="fr" condition="pref" pref="yahoo-fr" />

for all other which have Yahoo as second search engine. Locales which don't give an explicit order for Yahoo should not pass a <code>fr</code> parameter.

</end of suggested phrase>

We need to get a confirmation/validation on the Simplified Chinese special search param f=D3_g, or its removal.
Comment on attachment 237342 [details] [diff] [review]
<MozParam condition="pref">

a=schrep for drivers
Attachment #237342 - Flags: approval1.8.1? → approval1.8.1+
Whiteboard: [checkin needed (1.8 branch)]
Blocks: 348024
Blocks: 348099, 348100, 348101
Both attachments fixed on MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: