Bug 1589610 - Make about:networking fluent IDs have a specific namespace r=valentin,fluent-reviewers,flod

Differential Revision: https://phabricator.services.mozilla.com/D66114

--HG--
extra : moz-landing-system : lando
This commit is contained in:
anjali1903 2020-03-12 07:17:38 +00:00
Родитель 84b17f83cd
Коммит fa2de4bbc5
3 изменённых файлов: 253 добавлений и 118 удалений

Просмотреть файл

@ -0,0 +1,135 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
import fluent.syntax.ast as FTL
from fluent.migrate.helpers import transforms_from
def migrate(ctx):
"""Bug 1589610 - Make about:networking fluent IDs have a specific namespace, part {index}"""
ctx.add_transforms(
'toolkit/toolkit/about/aboutNetworking.ftl',
'toolkit/toolkit/about/aboutNetworking.ftl',
transforms_from(
"""
about-networking-http = {COPY_PATTERN(from_path, "http")}
about-networking-title = {COPY_PATTERN(from_path, "title")}
about-networking-sockets = {COPY_PATTERN(from_path, "sockets")}
about-networking-dns = {COPY_PATTERN(from_path, "dns")}
about-networking-dns-suffix = {COPY_PATTERN(from_path, "dnssuffix")}
about-networking-websockets = {COPY_PATTERN(from_path, "websockets")}
about-networking-refresh = {COPY_PATTERN(from_path, "refresh")}
about-networking-auto-refresh = {COPY_PATTERN(from_path, "auto-refresh")}
about-networking-hostname = {COPY_PATTERN(from_path, "hostname")}
about-networking-port = {COPY_PATTERN(from_path, "port")}
about-networking-http-version = {COPY_PATTERN(from_path, "http-version")}
about-networking-ssl = {COPY_PATTERN(from_path, "ssl")}
about-networking-active = {COPY_PATTERN(from_path, "active")}
about-networking-idle = {COPY_PATTERN(from_path, "idle")}
about-networking-host = {COPY_PATTERN(from_path, "host")}
about-networking-tcp = {COPY_PATTERN(from_path, "tcp")}
about-networking-sent = {COPY_PATTERN(from_path, "sent")}
about-networking-received = {COPY_PATTERN(from_path, "received")}
about-networking-family = {COPY_PATTERN(from_path, "family")}
about-networking-trr = {COPY_PATTERN(from_path, "trr")}
about-networking-addresses = {COPY_PATTERN(from_path, "addresses")}
about-networking-expires = {COPY_PATTERN(from_path, "expires")}
about-networking-messages-sent = {COPY_PATTERN(from_path, "messages-sent")}
about-networking-messages-received = {COPY_PATTERN(from_path, "messages-received")}
about-networking-bytes-sent = {COPY_PATTERN(from_path, "bytes-sent")}
about-networking-bytes-received = {COPY_PATTERN(from_path, "bytes-received")}
about-networking-logging = {COPY_PATTERN(from_path, "logging")}
about-networking-log-tutorial = {COPY_PATTERN(from_path, "log-tutorial")}
about-networking-current-log-file = {COPY_PATTERN(from_path, "current-log-file")}
about-networking-current-log-modules = {COPY_PATTERN(from_path, "current-log-modules")}
about-networking-set-log-file = {COPY_PATTERN(from_path, "set-log-file")}
about-networking-set-log-modules = {COPY_PATTERN(from_path, "set-log-modules")}
about-networking-start-logging = {COPY_PATTERN(from_path, "start-logging")}
about-networking-stop-logging = {COPY_PATTERN(from_path, "stop-logging")}
about-networking-dns-lookup = {COPY_PATTERN(from_path, "dns-lookup")}
about-networking-dns-lookup-button = {COPY_PATTERN(from_path, "dns-lookup-button")}
about-networking-dns-domain = {COPY_PATTERN(from_path, "dns-domain")}
about-networking-dns-lookup-table-column = {COPY_PATTERN(from_path, "dns-lookup-table-column")}
about-networking-rcwn = {COPY_PATTERN(from_path, "rcwn")}
about-networking-rcwn-status = {COPY_PATTERN(from_path, "rcwn-status")}
about-networking-rcwn-cache-won-count = {COPY_PATTERN(from_path, "rcwn-cache-won-count")}
about-networking-rcwn-net-won-count = {COPY_PATTERN(from_path, "rcwn-net-won-count")}
about-networking-total-network-requests = {COPY_PATTERN(from_path, "total-network-requests")}
about-networking-rcwn-operation = {COPY_PATTERN(from_path, "rcwn-operation")}
about-networking-rcwn-perf-open = {COPY_PATTERN(from_path, "rcwn-perf-open")}
about-networking-rcwn-perf-read = {COPY_PATTERN(from_path, "rcwn-perf-read")}
about-networking-rcwn-perf-write = {COPY_PATTERN(from_path, "rcwn-perf-write")}
about-networking-rcwn-perf-entry-open = {COPY_PATTERN(from_path, "rcwn-perf-entry-open")}
about-networking-rcwn-avg-short = {COPY_PATTERN(from_path, "rcwn-avg-short")}
about-networking-rcwn-avg-long = {COPY_PATTERN(from_path, "rcwn-avg-long")}
about-networking-rcwn-std-dev-long = {COPY_PATTERN(from_path, "rcwn-std-dev-long")}
about-networking-rcwn-cache-slow = {COPY_PATTERN(from_path, "rcwn-cache-slow")}
about-networking-rcwn-cache-not-slow = {COPY_PATTERN(from_path, "rcwn-cache-not-slow")}
about-networking-networkid = {COPY_PATTERN(from_path, "networkid")}
about-networking-networkid-id = {COPY_PATTERN(from_path, "networkid-id")}
about-networking-networkid-is-up = {COPY_PATTERN(from_path, "networkid-isUp")}
about-networking-networkid-status-known = {COPY_PATTERN(from_path, "networkid-statusKnown")}
""", from_path="toolkit/toolkit/about/aboutNetworking.ftl"),
)

Просмотреть файл

@ -9,7 +9,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" />
<title data-l10n-id="title"></title>
<title data-l10n-id="about-networking-title"></title>
<link rel="stylesheet" href="chrome://global/skin/aboutNetworking.css" type="text/css" />
<script src="chrome://global/content/aboutNetworking.js"></script>
<link rel="localization" href="toolkit/about/aboutNetworking.ftl"/>
@ -17,38 +17,38 @@
<body id="body">
<div id="categories">
<div class="category" selected="true" id="category-http">
<span class="category-name" data-l10n-id="http"/>
<span class="category-name" data-l10n-id="about-networking-http"/>
</div>
<div class="category" id="category-sockets">
<span class="category-name" data-l10n-id="sockets"/>
<span class="category-name" data-l10n-id="about-networking-sockets"/>
</div>
<div class="category" id="category-dns">
<span class="category-name" data-l10n-id="dns"/>
<span class="category-name" data-l10n-id="about-networking-dns"/>
</div>
<div class="category" id="category-websockets">
<span class="category-name" data-l10n-id="websockets"/>
<span class="category-name" data-l10n-id="about-networking-websockets"/>
</div>
<hr></hr>
<div class="category" id="category-dnslookuptool">
<span class="category-name" data-l10n-id="dns-lookup"/>
<span class="category-name" data-l10n-id="about-networking-dns-lookup"/>
</div>
<div class="category" id="category-logging">
<span class="category-name" data-l10n-id="logging"/>
<span class="category-name" data-l10n-id="about-networking-logging"/>
</div>
<div class="category" id="category-rcwn">
<span class="category-name" data-l10n-id="rcwn"/>
<span class="category-name" data-l10n-id="about-networking-rcwn"/>
</div>
<div class="category" id="category-networkid">
<span class="category-name" data-l10n-id="networkid"/>
<span class="category-name" data-l10n-id="about-networking-networkid"/>
</div>
</div>
<div class="main-content">
<div class="header">
<div id="sectionTitle" class="header-name" data-l10n-id="http"></div>
<div id="sectionTitle" class="header-name" data-l10n-id="about-networking-http"></div>
<div id="refreshDiv" class="toggle-container-with-text">
<button id="refreshButton" data-l10n-id="refresh"></button>
<button id="refreshButton" data-l10n-id="about-networking-refresh"></button>
<input id="autorefcheck" type="checkbox" name="Autorefresh" role="checkbox" />
<label for="autorefcheck" data-l10n-id="auto-refresh"></label>
<label for="autorefcheck" data-l10n-id="about-networking-auto-refresh"></label>
</div>
</div>
@ -56,12 +56,12 @@
<table>
<thead>
<tr>
<th data-l10n-id="hostname"/>
<th data-l10n-id="port"/>
<th data-l10n-id="about-networking-hostname"/>
<th data-l10n-id="about-networking-port"/>
<th data-l10n-id="about-networking-http-version"/>
<th data-l10n-id="ssl"/>
<th data-l10n-id="active"/>
<th data-l10n-id="idle"/>
<th data-l10n-id="about-networking-ssl"/>
<th data-l10n-id="about-networking-active"/>
<th data-l10n-id="about-networking-idle"/>
</tr>
</thead>
<tbody id="http_content" />
@ -72,12 +72,12 @@
<table>
<thead>
<tr>
<th data-l10n-id="host"/>
<th data-l10n-id="port"/>
<th data-l10n-id="tcp"/>
<th data-l10n-id="active"/>
<th data-l10n-id="sent"/>
<th data-l10n-id="received"/>
<th data-l10n-id="about-networking-host"/>
<th data-l10n-id="about-networking-port"/>
<th data-l10n-id="about-networking-tcp"/>
<th data-l10n-id="about-networking-active"/>
<th data-l10n-id="about-networking-sent"/>
<th data-l10n-id="about-networking-received"/>
</tr>
</thead>
<tbody id="sockets_content" />
@ -88,7 +88,7 @@
<table>
<thead>
<tr>
<th data-l10n-id="dnssuffix"/>
<th data-l10n-id="about-networking-dns-suffix"/>
</tr>
</thead>
<tbody id="dns_suffix_content" />
@ -97,11 +97,11 @@
<table>
<thead>
<tr>
<th data-l10n-id="hostname"/>
<th data-l10n-id="family"/>
<th data-l10n-id="trr"/>
<th data-l10n-id="addresses"/>
<th data-l10n-id="expires"/>
<th data-l10n-id="about-networking-hostname"/>
<th data-l10n-id="about-networking-family"/>
<th data-l10n-id="about-networking-trr"/>
<th data-l10n-id="about-networking-addresses"/>
<th data-l10n-id="about-networking-expires"/>
</tr>
</thead>
<tbody id="dns_content" />
@ -112,12 +112,12 @@
<table>
<thead>
<tr>
<th data-l10n-id="hostname"/>
<th data-l10n-id="ssl"/>
<th data-l10n-id="messages-sent"/>
<th data-l10n-id="messages-received"/>
<th data-l10n-id="bytes-sent"/>
<th data-l10n-id="bytes-received"/>
<th data-l10n-id="about-networking-hostname"/>
<th data-l10n-id="about-networking-ssl"/>
<th data-l10n-id="about-networking-messages-sent"/>
<th data-l10n-id="about-networking-messages-received"/>
<th data-l10n-id="about-networking-bytes-sent"/>
<th data-l10n-id="about-networking-bytes-received"/>
</tr>
</thead>
<tbody id="websockets_content" />
@ -125,14 +125,14 @@
</div>
<div id="dnslookuptool" class="tab" hidden="true">
<label data-l10n-id="dns-domain"></label>
<label data-l10n-id="about-networking-dns-domain"></label>
<input type="text" name="host" id="host"></input>
<button id="dnsLookupButton" data-l10n-id="dns-lookup-button"></button>
<button id="dnsLookupButton" data-l10n-id="about-networking-dns-lookup-button"></button>
<hr/>
<table>
<thead>
<tr>
<th data-l10n-id="dns-lookup-table-column"/>
<th data-l10n-id="about-networking-dns-lookup-table-column"/>
</tr>
</thead>
<tbody id="dnslookuptool_content" />
@ -143,10 +143,10 @@
<table>
<thead>
<tr>
<th data-l10n-id="rcwn-status"/>
<th data-l10n-id="total-network-requests"/>
<th data-l10n-id="rcwn-cache-won-count"/>
<th data-l10n-id="rcwn-net-won-count"/>
<th data-l10n-id="about-networking-rcwn-status"/>
<th data-l10n-id="about-networking-total-network-requests"/>
<th data-l10n-id="about-networking-rcwn-cache-won-count"/>
<th data-l10n-id="about-networking-rcwn-net-won-count"/>
</tr>
</thead>
<tbody id="rcwn_content">
@ -164,33 +164,33 @@
<table>
<thead>
<tr>
<th data-l10n-id="rcwn-operation"/>
<th data-l10n-id="rcwn-avg-short"/>
<th data-l10n-id="rcwn-avg-long"/>
<th data-l10n-id="rcwn-std-dev-long"/>
<th data-l10n-id="about-networking-rcwn-operation"/>
<th data-l10n-id="about-networking-rcwn-avg-short"/>
<th data-l10n-id="about-networking-rcwn-avg-long"/>
<th data-l10n-id="about-networking-rcwn-std-dev-long"/>
</tr>
</thead>
<tbody id="cacheperf_content">
<tr>
<td data-l10n-id="rcwn-perf-open"/>
<td data-l10n-id="about-networking-rcwn-perf-open"/>
<td id="rcwn_perfstats_open_avgShort"> </td>
<td id="rcwn_perfstats_open_avgLong"> </td>
<td id="rcwn_perfstats_open_stddevLong"> </td>
</tr>
<tr>
<td data-l10n-id="rcwn-perf-read"/>
<td data-l10n-id="about-networking-rcwn-perf-read"/>
<td id="rcwn_perfstats_read_avgShort"> </td>
<td id="rcwn_perfstats_read_avgLong"> </td>
<td id="rcwn_perfstats_read_stddevLong"> </td>
</tr>
<tr>
<td data-l10n-id="rcwn-perf-write"/>
<td data-l10n-id="about-networking-rcwn-perf-write"/>
<td id="rcwn_perfstats_write_avgShort"> </td>
<td id="rcwn_perfstats_write_avgLong"> </td>
<td id="rcwn_perfstats_write_stddevLong"> </td>
</tr>
<tr>
<td data-l10n-id="rcwn-perf-entry-open"/>
<td data-l10n-id="about-networking-rcwn-perf-entry-open"/>
<td id="rcwn_perfstats_entryopen_avgShort"> </td>
<td id="rcwn_perfstats_entryopen_avgLong"> </td>
<td id="rcwn_perfstats_entryopen_stddevLong"> </td>
@ -203,8 +203,8 @@
<table>
<thead>
<tr>
<th data-l10n-id="rcwn-cache-slow"/>
<th data-l10n-id="rcwn-cache-not-slow"/>
<th data-l10n-id="about-networking-rcwn-cache-slow"/>
<th data-l10n-id="about-networking-rcwn-cache-not-slow"/>
</tr>
</thead>
<tbody>
@ -218,27 +218,27 @@
<div id="logging" class="tab" hidden="true">
<div>
<button id="start-logging-button" data-l10n-id="start-logging"></button>
<button id="stop-logging-button" data-l10n-id="stop-logging"></button>
<button id="start-logging-button" data-l10n-id="about-networking-start-logging"></button>
<button id="stop-logging-button" data-l10n-id="about-networking-stop-logging"></button>
</div>
<br/>
<br/>
<div>
<label data-l10n-id="current-log-file"></label>
<label data-l10n-id="about-networking-current-log-file"></label>
<div id="current-log-file"></div><br/>
<input type="text" name="log-file" id="log-file"></input>
<button id="set-log-file-button" data-l10n-id="set-log-file"></button>
<button id="set-log-file-button" data-l10n-id="about-networking-set-log-file"></button>
</div>
<div>
<label data-l10n-id="current-log-modules"></label>
<label data-l10n-id="about-networking-current-log-modules"></label>
<div id="current-log-modules"></div><br/>
<input type="text" name="log-modules" id="log-modules" value="timestamp,sync,nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5"></input>
<button id="set-log-modules-button" data-l10n-id="set-log-modules"></button>
<button id="set-log-modules-button" data-l10n-id="about-networking-set-log-modules"></button>
</div>
<br>
<br>
<p id="log-tutorial" data-l10n-id="log-tutorial">
<p id="log-tutorial" data-l10n-id="about-networking-log-tutorial">
<a data-l10n-name="logging" href="https://developer.mozilla.org/docs/Mozilla/Debugging/HTTP_logging"></a>
</p>
</div>
@ -247,9 +247,9 @@
<table>
<thead>
<tr>
<th data-l10n-id="networkid-isUp"/>
<th data-l10n-id="networkid-statusKnown"/>
<th data-l10n-id="networkid-id"/>
<th data-l10n-id="about-networking-networkid-is-up"/>
<th data-l10n-id="about-networking-networkid-status-known"/>
<th data-l10n-id="about-networking-networkid-id"/>
</tr>
</thead>
<tbody id="networkid_content">

Просмотреть файл

@ -2,67 +2,67 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
title = About Networking
http = HTTP
sockets = Sockets
dns = DNS
dnssuffix = DNS suffix
websockets = WebSockets
refresh = Refresh
auto-refresh = Autorefresh every 3 seconds
hostname = Hostname
port = Port
about-networking-title = About Networking
about-networking-http = HTTP
about-networking-sockets = Sockets
about-networking-dns = DNS
about-networking-dns-suffix = DNS suffix
about-networking-websockets = WebSockets
about-networking-refresh = Refresh
about-networking-auto-refresh = Autorefresh every 3 seconds
about-networking-hostname = Hostname
about-networking-port = Port
about-networking-http-version = HTTP Version
ssl = SSL
active = Active
idle = Idle
host = Host
tcp = TCP
sent = Sent
received = Received
family = Family
trr = TRR
addresses = Addresses
expires = Expires (Seconds)
messages-sent = Messages Sent
messages-received = Messages Received
bytes-sent = Bytes Sent
bytes-received = Bytes Received
logging = Logging
log-tutorial =
about-networking-ssl = SSL
about-networking-active = Active
about-networking-idle = Idle
about-networking-host = Host
about-networking-tcp = TCP
about-networking-sent = Sent
about-networking-received = Received
about-networking-family = Family
about-networking-trr = TRR
about-networking-addresses = Addresses
about-networking-expires = Expires (Seconds)
about-networking-messages-sent = Messages Sent
about-networking-messages-received = Messages Received
about-networking-bytes-sent = Bytes Sent
about-networking-bytes-received = Bytes Received
about-networking-logging = Logging
about-networking-log-tutorial =
See <a data-l10n-name="logging">HTTP Logging</a>
for instructions on how to use this tool.
current-log-file = Current Log File:
current-log-modules = Current Log Modules:
set-log-file = Set Log File
set-log-modules = Set Log Modules
start-logging = Start Logging
stop-logging = Stop Logging
dns-lookup = DNS Lookup
dns-lookup-button = Resolve
dns-domain = Domain:
dns-lookup-table-column = IPs
rcwn = RCWN Stats
rcwn-status = RCWN Status
rcwn-cache-won-count = Cache won count
rcwn-net-won-count = Net won count
total-network-requests = Total network request count
rcwn-operation = Cache Operation
rcwn-perf-open = Open
rcwn-perf-read = Read
rcwn-perf-write = Write
rcwn-perf-entry-open = Entry Open
rcwn-avg-short = Short Average
rcwn-avg-long = Long Average
rcwn-std-dev-long = Long Standard Deviation
rcwn-cache-slow = Cache slow count
rcwn-cache-not-slow = Cache not slow count
networkid = Network ID
networkid-id = Network ID
about-networking-current-log-file = Current Log File:
about-networking-current-log-modules = Current Log Modules:
about-networking-set-log-file = Set Log File
about-networking-set-log-modules = Set Log Modules
about-networking-start-logging = Start Logging
about-networking-stop-logging = Stop Logging
about-networking-dns-lookup = DNS Lookup
about-networking-dns-lookup-button = Resolve
about-networking-dns-domain = Domain:
about-networking-dns-lookup-table-column = IPs
about-networking-rcwn = RCWN Stats
about-networking-rcwn-status = RCWN Status
about-networking-rcwn-cache-won-count = Cache won count
about-networking-rcwn-net-won-count = Net won count
about-networking-total-network-requests = Total network request count
about-networking-rcwn-operation = Cache Operation
about-networking-rcwn-perf-open = Open
about-networking-rcwn-perf-read = Read
about-networking-rcwn-perf-write = Write
about-networking-rcwn-perf-entry-open = Entry Open
about-networking-rcwn-avg-short = Short Average
about-networking-rcwn-avg-long = Long Average
about-networking-rcwn-std-dev-long = Long Standard Deviation
about-networking-rcwn-cache-slow = Cache slow count
about-networking-rcwn-cache-not-slow = Cache not slow count
about-networking-networkid = Network ID
about-networking-networkid-id = Network ID
## Link is intended as "network link"
networkid-isUp = Link is up
networkid-statusKnown = Link status is known
about-networking-networkid-is-up = Link is up
about-networking-networkid-status-known = Link status is known
##