Open Bug 1122592 Opened 8 years ago Updated 7 years ago

Simplify strings and use PluralForm.jsm for the "cancel downloads" confirmation dialog

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

People

(Reporter: Paolo, Unassigned)

References

Details

For the messages shown using DownloadUIHelper.jsm, we should look into using PluralForm.jsm (like we do with kDownloadsStringsRequiringPluralForm), and split the long strings in order to simplify localization and avoid excessive repetition. For example:

Window title (no PluralForm, same everywhere):
  Cancel Downloads
Message Line 1 (no PluralForm, based on action to clarify why we're asking):
  You're closing the last Private Browsing window. / You're about to exit. / ...
Message Line 2 (PluralForm, different only for Private Browsing):
  1 download will be canceled if you continue.
  1 download started in a private window will be canceled if you continue.
OK Button (PluralForm):
  Cancel Download
  Cancel Downloads
Cancel Button:
  Don't Exit / Stay Online / Stay in Private Browsing / ...

The reason for separating line 1 and 2 is that some locales may have three or four plural forms, this reduces the number of combinations to translate.

Line 1 is to make super clear why we're asking, but we maybe we can make the button serve the purpose. In fact, this dialog is always user-triggered and synchronous, so maybe we can get rid of that line completely, saving our localizers some work.

We may want to remove the string referenced from nsDownloadManager.cpp first, but it isn't a blocker for landing as we're decommissioning the old Download Manager in bug 851471 anyways.
Flags: firefox-backlog+
For the "Cancel Downloads" button that does not include the number in the string, we should put a special note in the localization file, because some locales might need to add back the number because of a limitation of PluralForm (see for example bug 784122).

Francesco, are there any other issues we need to take care about in localization?
Flags: needinfo?(francesco.lodolo)
Philipp, what do you think about the changes to this confirmation dialog? Do you think we can remove Line 1 completely and save some localization time, or should we keep it for clarity?
Flags: needinfo?(philipp)
Hm, I can't seem to find the dialogs you're referring to in the product.
Could you post a screen shot just to make sure we're thinking about the same thing? Thanks!
Flags: needinfo?(philipp) → needinfo?(paolo.mozmail)
Yeah sorry, see https://bugzilla.mozilla.org/attachment.cgi?id=8541711 for an example on Windows. This is shown just after you click the close button on a private window, but there are other user-initiated cases as well, like closing the last normal browser window or going offline.
Flags: needinfo?(paolo.mozmail) → needinfo?(philipp)
There's a lot of repetition in this dialog and we'd like to make things easier for the localizers and simpler for the user.
(In reply to :Paolo Amadini from comment #1)
> Francesco, are there any other issues we need to take care about in
> localization?

Not that I can think of, besides having one localization comment for each plural form as discussed.
Flags: needinfo?(francesco.lodolo)
Well, the only part of that window that seems a bit redundant is the second sentence in the main message (»Are you sure you want to leave private browsing mode«).

When this dialog shows up, the user intent was probably closing a window/tab or quitting Firefox. Cancelling the downloads is an unintended side effect that the user isn't aware of (hence the dialog). So if we would strike the first part of the message, all the user would be left with are a generic »Are you sure« message and two buttons. So I think we need to retain that part.
Flags: needinfo?(philipp)
(In reply to Philipp Sackl [:phlsa] please use needinfo to make me respond from comment #7)
> So if we would strike the
> first part of the message, all the user would be left with are a generic
> »Are you sure« message and two buttons.

Hm, it seems you're referring to the first sentence in the current dialog in the screenshot, while my question was about line 1 in the reworked message in comment 0, and actually what I was asking for was a review of the changes proposed there.
Flags: needinfo?(philipp)
Oh, it seems like I have completely misread what you were asking for, sorry!

So, would the dialog you are aiming for look something like this: http://cl.ly/image/3X0g3L0G1e3t ?
That would be absolutely fine :)
Flags: needinfo?(philipp)
(In reply to Philipp Sackl [:phlsa] please use needinfo to make me respond from comment #9)
> So, would the dialog you are aiming for look something like this:
> http://cl.ly/image/3X0g3L0G1e3t ?

That's right, thanks for the mockup!
You need to log in before you can comment on or make changes to this bug.