Last Comment Bug 626626 - Password manager references removed strings (saveLoginText, saveLoginTextNoUsername)
: Password manager references removed strings (saveLoginText, saveLoginTextNoUs...
: regression
Product: Toolkit
Classification: Components
Component: Password Manager (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla9
Assigned To: Felix Fung (:felix)
: Matthew N. [:MattN] (PM if requests are blocking you)
Depends on:
Blocks: 594572
  Show dependency treegraph
Reported: 2011-01-18 06:00 PST by Mark Banner (:standard8)
Modified: 2011-09-14 12:17 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Reference Correct Strings in Password Manager (2.26 KB, patch)
2011-09-07 16:26 PDT, Felix Fung (:felix)
dolske: review-
Details | Diff | Splinter Review
Reference Correct Strings in Password Manager (4.34 KB, patch)
2011-09-08 12:38 PDT, Felix Fung (:felix)
dolske: review+
Details | Diff | Splinter Review

Description User image Mark Banner (:standard8) 2011-01-18 06:00:21 PST
I was just looking at some l10n stuff for Thunderbird and noticed the following in mozilla-central:

        if (aLogin.username) {
            var displayUser = this._sanitizeUsername(aLogin.username);
            dialogText = this._getLocalizedString(
                                 [brandShortName, displayUser, displayHost]);
        } else {
            dialogText = this._getLocalizedString(
                                 [brandShortName, displayHost]);
Both those strings are no longer defined in l10n land. I'm not sure if this code will really be hit (probably not frequently) but I suspect it isn't going to give good results if it does.

This is a regression from bug 594572.
Comment 1 User image Justin Dolske [:Dolske] 2011-01-18 13:15:19 PST
Fuuuuuu... :/

Oh, but we can't actually hit this in Firefox-land because this code only gets invoked if it can't figure out how to get at a doorhanger or notification bar. [Well, ok, we probably could if an addond created a non-<browser> thing in which a user could browser and submit forms, but that's rather edge-caseish.]
Comment 2 User image Felix Fung (:felix) 2011-09-07 16:26:56 PDT
Created attachment 558993 [details] [diff] [review]
Reference Correct Strings in Password Manager

Restored the changes produced by the patch to
Comment 3 User image Justin Dolske [:Dolske] 2011-09-07 19:27:26 PDT
Comment on attachment 558993 [details] [diff] [review]
Reference Correct Strings in Password Manager

Review of attachment 558993 [details] [diff] [review]:

I went through the other strings changed in bug 594572...

2 other strings -- in _showChangeLoginDialog() -- are also broken. (passwordChangeText, passwordChangeTextNoUser).

Let's go ahead and fix those too.

::: toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -956,5 @@
>              (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) +
>              (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
> -        var brandShortName =
> -                this._brandBundle.GetStringFromName("brandShortName");

This was the only use of ._brandBundle, so go ahead and delete that getter (line ~268).
Comment 4 User image Felix Fung (:felix) 2011-09-08 12:38:50 PDT
Created attachment 559250 [details] [diff] [review]
Reference Correct Strings in Password Manager

Addressed above comments
Comment 6 User image :Margaret Leibovic 2011-09-14 12:17:43 PDT

Note You need to log in before you can comment on or make changes to this bug.