Commit 050ddbf4 authored by Mandy Chen's avatar Mandy Chen Committed by Commit Bot

DevTools: Convert concatenated string and link to embedded link in string in...

DevTools: Convert concatenated string and link to embedded link in string in debugging terminated screen

Use UI.formatLocalize to embed a link inside a localizable string.
This is a sequent patch to https://crrev.com/c/1658750

No visual change in UI:
Before: https://i.imgur.com/Tbxkwe1
After: https://imgur.com/hcfsuwf

Bug: 941561
Change-Id: I0d7d8e42a83b9b4f18c6b928a5af706d21f0f85a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658593Reviewed-by: default avatarAlexei Filippov <alph@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#669064}
parent 69f124d6
...@@ -10,8 +10,9 @@ UI.RemoteDebuggingTerminatedScreen = class extends UI.VBox { ...@@ -10,8 +10,9 @@ UI.RemoteDebuggingTerminatedScreen = class extends UI.VBox {
super(true); super(true);
this.registerRequiredCSS('ui/remoteDebuggingTerminatedScreen.css'); this.registerRequiredCSS('ui/remoteDebuggingTerminatedScreen.css');
const message = this.contentElement.createChild('div', 'message'); const message = this.contentElement.createChild('div', 'message');
message.createChild('span').textContent = Common.UIString('Debugging connection was closed. Reason: '); const reasonElement = message.createChild('span', 'reason');
message.createChild('span', 'reason').textContent = reason; reasonElement.textContent = reason;
message.appendChild(UI.formatLocalized('Debugging connection was closed. Reason: %s', [reasonElement]));
this.contentElement.createChild('div', 'message').textContent = this.contentElement.createChild('div', 'message').textContent =
Common.UIString('Reconnect when ready by reopening DevTools.'); Common.UIString('Reconnect when ready by reopening DevTools.');
const button = UI.createTextButton(Common.UIString('Reconnect DevTools'), () => window.location.reload()); const button = UI.createTextButton(Common.UIString('Reconnect DevTools'), () => window.location.reload());
......
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
<message name="IDS_DEVTOOLS_44ac014b674d7d86a04702e6fd1fa858" desc=""> <message name="IDS_DEVTOOLS_44ac014b674d7d86a04702e6fd1fa858" desc="">
Reconnect when ready by reopening DevTools. Reconnect when ready by reopening DevTools.
</message> </message>
<message name="IDS_DEVTOOLS_471566447bf928c469d32014791036cc" desc="">
Debugging connection was closed. Reason: <ph name="REASONELEMENT">$1s</ph>
</message>
<message name="IDS_DEVTOOLS_47df0ee8f6dc4f553c907c49e686216c" desc=""> <message name="IDS_DEVTOOLS_47df0ee8f6dc4f553c907c49e686216c" desc="">
Memory Panel Memory Panel
</message> </message>
...@@ -108,9 +111,6 @@ ...@@ -108,9 +111,6 @@
<message name="IDS_DEVTOOLS_52ebc26c2921d5b84fc670dff9891821" desc=""> <message name="IDS_DEVTOOLS_52ebc26c2921d5b84fc670dff9891821" desc="">
Zoom out Zoom out
</message> </message>
<message name="IDS_DEVTOOLS_534d1b2eaff704d4888de7c4a5e282c0" desc="">
Debugging connection was closed. Reason: '''
</message>
<message name="IDS_DEVTOOLS_5372591390f99dcf8e0467c671abbc23" desc=""> <message name="IDS_DEVTOOLS_5372591390f99dcf8e0467c671abbc23" desc="">
Switch to rotate mode Switch to rotate mode
</message> </message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment