If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Add functionality for having brand name in load error messages

RESOLVED DUPLICATE of bug 336029

Status

()

Core
Document Navigation
RESOLVED DUPLICATE of bug 336029
8 years ago
6 years ago

People

(Reporter: zpao, Assigned: zpao)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Specifically: nsDocShell::DisplayLoadError

Most of these error messages have the brand name hard coded in, which isn't so great.

So we should probably do something like nsDocShell::ConfirmRepost to look for a brandShortName in the brand bundle and format accordingly.
Blocks: 518185
Created attachment 426527 [details] [diff] [review]
Patch v0.1 (WIP)

A first pass. There is an opportunity for pulling out some more stuff into a help method (checking for brandname, assigning) that could be reused so that other error types could be changed over with little effort.

Also, it currently breaks if there isn't an override (or maybe because it's still trying to do the formatting). And I think this is leaking unless it's from something else I have applied.

I'm willing to keep moving on this if this is a good start. Otherwise somebody with more familiarity here can take over.
After talking with Axel, he thinks it best to hold off for bug 545699 - the
argument being that just substituting strings sucks, especially when
brandShortName changes gender.

Others disagree. The argument being that since it's brand specific, localizers
could just leave their strings as is (still would need to change the lookup
key) and this just becomes an opt-in for the languages that can handle
substitution easily.

So I'll do more work here (leave l20n blocking for now), and we can file a
followup for whatever l20n specific things come up if need be.
Depends on: 545699
Created attachment 426559 [details] [diff] [review]
Patch v0.2 (WIP)

My 2nd pass. This makes it so (many of) the other strings that have Firefox hard coded can use brand substitution. This is still not quite ideal since there are other strings here that have Firefox hard coded but are also substituting a URL so need additional processing (eg. fileNotFound, protocolNotFound, etc)

I also made nsDocShell::ConfirmRepost use GetPromptAndStringBundles (because it was doing the same thing anyway). Maybe that should be done separately...
Assignee: nobody → paul
Attachment #426527 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 336029
You need to log in before you can comment on or make changes to this bug.