Commit 94e171dd authored by Mandy Chen's avatar Mandy Chen Committed by Commit Bot

DevTools: Localize Service Worker Version Running Status

ServiceWorkerVersionRunningStatus is sent through CDP and displayed
directly to the user in DT. This CL localizes the running status strings
in the frontend.

Location of the running status strings: https://imgur.com/pIZZCqo
ServiceWorkerVersionRunningStatus: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus

Bug: 941561
Change-Id: I14142f6fa0e95d6392e26676e450041b8207929c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814501Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#699425}
parent 938b37a6
...@@ -471,9 +471,9 @@ Resources.ServiceWorkersView.Section = class { ...@@ -471,9 +471,9 @@ Resources.ServiceWorkersView.Section = class {
if (active) { if (active) {
this._updateSourceField(active); this._updateSourceField(active);
const localizedRunningStatus = SDK.ServiceWorkerVersion.RunningStatus[active.runningStatus];
const activeEntry = this._addVersion( const activeEntry = this._addVersion(
versionsStack, 'service-worker-active-circle', versionsStack, 'service-worker-active-circle', ls`#${active.id} activated and is ${localizedRunningStatus}`);
Common.UIString('#%s activated and is %s', active.id, active.runningStatus));
if (active.isRunning() || active.isStarting()) { if (active.isRunning() || active.isStarting()) {
this._createLink(activeEntry, Common.UIString('stop'), this._stopButtonClicked.bind(this, active.id)); this._createLink(activeEntry, Common.UIString('stop'), this._stopButtonClicked.bind(this, active.id));
......
...@@ -443,6 +443,16 @@ SDK.ServiceWorkerVersion = class { ...@@ -443,6 +443,16 @@ SDK.ServiceWorkerVersion = class {
} }
}; };
/**
* @type {!Object<string, string>}
*/
SDK.ServiceWorkerVersion.RunningStatus = {
[Protocol.ServiceWorker.ServiceWorkerVersionRunningStatus.Running]: ls`running`,
[Protocol.ServiceWorker.ServiceWorkerVersionRunningStatus.Starting]: ls`starting`,
[Protocol.ServiceWorker.ServiceWorkerVersionRunningStatus.Stopped]: ls`stopped`,
[Protocol.ServiceWorker.ServiceWorkerVersionRunningStatus.Stopping]: ls`stopping`,
};
/** /**
* @enum {string} * @enum {string}
*/ */
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
<message name="IDS_DEVTOOLS_1a4157cb54ce78ee862a88ecd1a66916" desc="Tooltip to explain why a cookie was blocked"> <message name="IDS_DEVTOOLS_1a4157cb54ce78ee862a88ecd1a66916" desc="Tooltip to explain why a cookie was blocked">
This set-cookie used the &quot;__Secure-&quot; or &quot;__Host-&quot; prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05. This set-cookie used the &quot;__Secure-&quot; or &quot;__Host-&quot; prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05.
</message> </message>
<message name="IDS_DEVTOOLS_1ee85f6c60017a7f0646ba8dc5824de6" desc="Service worker running status displayed in the Service Workers view in the Application panel">
starting
</message>
<message name="IDS_DEVTOOLS_21070fd87b02611a5426d726a70a5502" desc="Text in Server Timing"> <message name="IDS_DEVTOOLS_21070fd87b02611a5426d726a70a5502" desc="Text in Server Timing">
No value found for parameter &quot;<ph name="PARAMNAME">$1s<ex>https</ex></ph>&quot;. No value found for parameter &quot;<ph name="PARAMNAME">$1s<ex>https</ex></ph>&quot;.
</message> </message>
...@@ -72,6 +75,9 @@ ...@@ -72,6 +75,9 @@
<message name="IDS_DEVTOOLS_38fe155e13d77298cfd5688c3378fa85" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu"> <message name="IDS_DEVTOOLS_38fe155e13d77298cfd5688c3378fa85" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu">
Emulate CSS screen media type Emulate CSS screen media type
</message> </message>
<message name="IDS_DEVTOOLS_3b2a3c8ed19fc3647432e72885d633e7" desc="Service worker running status displayed in the Service Workers view in the Application panel">
stopping
</message>
<message name="IDS_DEVTOOLS_3b563524fdb17b4a86590470d40bef74" desc="Text in DOMDebugger Model"> <message name="IDS_DEVTOOLS_3b563524fdb17b4a86590470d40bef74" desc="Text in DOMDebugger Model">
Media Media
</message> </message>
...@@ -168,6 +174,9 @@ ...@@ -168,6 +174,9 @@
<message name="IDS_DEVTOOLS_7121afd196f5c52bef488d5a0f4c097b" desc="Text in the Event Listener Breakpoints Panel of the JavaScript Debugger in the Sources Panel"> <message name="IDS_DEVTOOLS_7121afd196f5c52bef488d5a0f4c097b" desc="Text in the Event Listener Breakpoints Panel of the JavaScript Debugger in the Sources Panel">
Script First Statement Script First Statement
</message> </message>
<message name="IDS_DEVTOOLS_75101dcdfc88455bcafc9e53e0b06689" desc="Service worker running status displayed in the Service Workers view in the Application panel">
running
</message>
<message name="IDS_DEVTOOLS_77454122d17d16885c51c0d57f5c7bd3" desc="Tooltip to explain why a cookie was blocked"> <message name="IDS_DEVTOOLS_77454122d17d16885c51c0d57f5c7bd3" desc="Tooltip to explain why a cookie was blocked">
This cookie had the &quot;SameSite=Strict&quot; attribute and the request was made on on a different site. This includes navigation requests initiated by other sites. This cookie had the &quot;SameSite=Strict&quot; attribute and the request was made on on a different site. This includes navigation requests initiated by other sites.
</message> </message>
...@@ -327,6 +336,9 @@ ...@@ -327,6 +336,9 @@
<message name="IDS_DEVTOOLS_eff8d530f562a22a45fbf1ee83299353" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu"> <message name="IDS_DEVTOOLS_eff8d530f562a22a45fbf1ee83299353" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu">
Show scroll performance bottlenecks Show scroll performance bottlenecks
</message> </message>
<message name="IDS_DEVTOOLS_f0a0bfe6bc7d2c58d2989034f83183e0" desc="Service worker running status displayed in the Service Workers view in the Application panel">
stopped
</message>
<message name="IDS_DEVTOOLS_f107ac919ab14339cdb22cd00fccd215" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu"> <message name="IDS_DEVTOOLS_f107ac919ab14339cdb22cd00fccd215" desc="Title of a setting under the Rendering category that can be invoked through the Command Menu">
Show paint flashing rectangles Show paint flashing rectangles
</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