Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder in Japanese

VERIFIED FIXED in Firefox 63

Status

()

VERIFIED FIXED
5 months ago
5 months ago

People

(Reporter: hidekis, Assigned: flod)

Tracking

({regression})

unspecified
Firefox 65
regression
Points:
---

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox63 verified, firefox64 verified, firefox65 verified)

Details

Attachments

(3 attachments)

(Reporter)

Description

5 months ago
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

When Japanese locale is active, open more than one Firefox window, and then attempt to quit Firefox. (Confirmation in Options should be enabled to show this message.)


Actual results:

The multiple window closing confirmation message contains string placeholders "%1$S 2個のウインドウを閉じようとしています。よろしいですか" when closing Firefox while more than one Window is active.


Expected results:

It should not show such placeholder "%1$S", and should only show pertinent message.
(Reporter)

Comment 1

5 months ago
This happened in both RC build 2 installer and portable for 63.0 and with en-US + ja language pack, as well as ja portable package.
(Reporter)

Comment 3

5 months ago
Yes, that's the one!
(Assignee)

Updated

5 months ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 4

5 months ago
Unfortunately we're past the string freeze for 63. 

While this is not a standard getFormattedString call, because of the plural, the code was designed to accept both %S and %1$S.
https://searchfox.org/mozilla-central/rev/0ec9f5972ef3e4a479720630ad7285a03776cdfc/browser/components/nsBrowserGlue.js#1785

The problem is that the regex is wrong

%(?:1$)?S

The $ sign is not escaped

%(?:1\$)?S
Assignee: nobody → francesco.lodolo
Blocks: 1438499
status-firefox63: --- → affected
status-firefox64: --- → affected
Component: ja / Japanese → General
Flags: needinfo?(h.rayflood)
Flags: needinfo?(chimantaea_mirabilis)
Product: Mozilla Localizations → Firefox
QA Contact: l10n-qa
Summary: Multiple window closing confirmation shows placeholders → Multiple window closing confirmation shows placeholders in Japanese
(Assignee)

Updated

5 months ago
Summary: Multiple window closing confirmation shows placeholders in Japanese → Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder in Japanese

Comment 6

5 months ago
Pushed by francesco.lodolo@mozillaitalia.org:
https://hg.mozilla.org/integration/autoland/rev/6a8240b5c287
Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder r=Gijs
https://hg.mozilla.org/mozilla-central/rev/6a8240b5c287
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox65: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Keywords: regression
status-firefox-esr60: --- → unaffected
(Assignee)

Comment 8

5 months ago
Does this look correct?
Flags: needinfo?(hidekis)
(Reporter)

Comment 9

5 months ago
(In reply to Francesco Lodolo [:flod] from comment #8)
> Created attachment 9019254 [details]
> 65.0a1 (2018-10-22) (64 ビット)
> 
> Does this look correct?

Yes, this looks perfect!
Flags: needinfo?(hidekis)
(Assignee)

Updated

5 months ago
Status: RESOLVED → VERIFIED
(Assignee)

Comment 10

5 months ago
Comment on attachment 9018955 [details]
Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1438499

User impact if declined: Warning displayed when closing multiple windows is incorrect for Japanese, and potentially other locales.

Is this code covered by automated tests?: No

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Correcting incorrect regular expression only used to replace a parameter in this string.

String changes made/needed: None
Attachment #9018955 - Flags: approval-mozilla-release?
Attachment #9018955 - Flags: approval-mozilla-beta?
Comment on attachment 9018955 [details]
Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder

Fixes a broken warning dialog for Japanese locales (and possibly others). Approved for 64.0b4.
Attachment #9018955 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment 12

5 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/f758524d2acd
status-firefox64: affected → fixed
Flags: qe-verify+
Duplicate of this bug: 1501818
I've reproduced the issue on Windows 7 x64, Ubuntu 16.04 x64 and macOS 10.13 using Firefox 63 RC build 2 (ja localization build and en-US + ja language pack).

Verified the issue on Windows 7 x64, Ubuntu 16.04 x64 and macOS 10.13 using latest Nightly 65.0a1 (2018-10-24) with ja, ar, zh-CN, es-ES, de, ru, ko, pt-PT, pl, fr, tr localization builds and with en-US + ja language pack. Everything looks good here.
status-firefox65: fixed → verified
Verified fixed on Windows 7 x64, Ubuntu 16.04 x64 and macOS 10.13 using Firefox 64 Beta 4 (buildID: 20181025233934) with ja, ar, de, fr, es-ES, ko, pt-PT, ru, zh-CN localization builds and with en-US + ja language pack.
status-firefox64: fixed → verified
Flags: qe-verify+

Updated

5 months ago
Duplicate of this bug: 1502695
Comment on attachment 9018955 [details]
Bug 1500823 - Dialog displayed when closing multiple windows shows unreplaced %1$S placeholder

Minimal patch, fixed on nightly a week ago, uplifted to beta, had QA, approved for 63.0.1. Thanks
Attachment #9018955 - Flags: approval-mozilla-release? → approval-mozilla-release+

Comment 18

5 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-release/rev/0dcad68072b5
status-firefox63: affected → fixed
Verified fixed on Windows 7 x64, Ubuntu 16.04 x86 and macOS 10.14 using Firefox 63.0.1 (buildID: 20181030165643) with ja, ar, de, fr, es-ES, ko, pt-PT, ru, zh-CN localization builds and with en-US + ja language pack.
status-firefox63: fixed → verified
You need to log in before you can comment on or make changes to this bug.