Closed Bug 1477641 Opened 3 years ago Closed 3 years ago

Add-ons manager search field says 'search on addons.mozilla.org'

Categories

(Thunderbird :: Add-Ons: General, defect)

defect
Not set
normal

Tracking

(thunderbird_esr60 fixed, thunderbird62 wontfix, thunderbird63 fixed)

RESOLVED FIXED
Thunderbird 63.0
Tracking Status
thunderbird_esr60 --- fixed
thunderbird62 --- wontfix
thunderbird63 --- fixed

People

(Reporter: pascalc, Assigned: jorgk-bmo)

Details

Attachments

(3 files)

Thunderbird 60 preview
Built from https://hg.mozilla.org/releases/comm-esr60/rev/abae8941234801d8aa5b6cfd8cc49ef62bc48e62

The addons manager search placeholder says:
"Search on addons.mozilla.org"

instead of 
"Search on addons.thunderbird.net"

https://hg.mozilla.org/l10n/gecko-strings/file/default/toolkit/chrome/mozapps/extensions/extensions.dtd#l6

The string should either be updated in Toolkit with a variable for the site, or the string should be updated in Thunderbird files only.

See screenshot
Component: Theme → General
I have an idea.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
The string comes from here:
mozilla/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
6 <!ENTITY search.placeholder2  "Search on addons.mozilla.org">

And is used here:
mozilla/toolkit/mozapps/extensions/content/extensions.xul
255 placeholder="&search.placeholder2;" maxlength="100"/>

That's all M-C code. We have however code that tweaks that page, adding forward/backward arrows and modifying the context menu, so we can just substitute the string there.

"addons.mozilla.org" as such isn't localised anywhere:
https://dxr.mozilla.org/l10n-central/search?q=search.placeholder2&redirect=false
so straight string substitution will do the trick (I hope).
This JS code is very simple, you can review it ;-)

You can also check all the arguments in comment #2. This will work on all localised strings :-)
Attachment #8995612 - Flags: review?(richard.marti)
Same code applies to ESR 60.
Comment on attachment 8995612 [details] [diff] [review]
1477641-amo-to-atn.patch

This works, thanks.
Attachment #8995612 - Flags: review?(richard.marti) → review+
Comment on attachment 8995612 [details] [diff] [review]
1477641-amo-to-atn.patch

Review of attachment 8995612 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, this works for me.
Assuming the box exists in all cases, whatever the Addon manager "tab" you have displayed.
Attachment #8995612 - Flags: review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/d0fcc2b1f8a8
substitute addons.mozilla.org with addons.thunderbird.net on add-ons page. r=Paenglab,aceman
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
Attachment #8995612 - Flags: approval-comm-esr60+
Attachment #8995612 - Flags: approval-comm-beta+
(In reply to :aceman from comment #7)
> Assuming the box exists in all cases, whatever the Addon manager "tab" you
> have displayed.
Yes, I could have protected it with an |if (textbox) {|, but then it will silently fail when M-C changes the layout of the page. Perhaps better to see that malfunction, no?
Summary: Addons manager search field says 'search on addons.mozilla.org' → Add-ons manager search field says 'search on addons.mozilla.org'
Attachment #8995612 - Flags: approval-comm-beta+
Component: General → Add-Ons: General
You need to log in before you can comment on or make changes to this bug.