author | Zibi Braniecki <zbraniecki@mozilla.com> |
Thu, 05 Apr 2018 14:14:51 +0200 | |
changeset 780751 | d571eec4f0267560c885e03b5f64cafe33764993 |
parent 780750 | a4dfcb237bc77d574dd028a8400e183d29c506d5 |
child 780752 | 981f9584b09ffd51240839e333750e5e7ade57b3 |
push id | 106121 |
push user | bmo:gandalf@aviary.pl |
push date | Thu, 12 Apr 2018 00:27:59 +0000 |
reviewers | gijs, gandalf |
bugs | 1451992 |
milestone | 61.0a1 |
--- a/browser/components/preferences/connection.xul +++ b/browser/components/preferences/connection.xul @@ -1,163 +1,152 @@ <?xml version="1.0"?> <!-- This Source Code Form is subject to the terms of the Mozilla Public - 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/. --> -<!DOCTYPE dialog [ - <!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd"> - %preferencesDTD; - <!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd"> - %connectionDTD; - <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd"> - %mainDTD; -]> - <?xml-stylesheet href="chrome://global/skin/"?> <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?> <dialog id="ConnectionsDialog" type="child" class="prefwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - title="&connectionsDialog.title;" + data-l10n-id="connection-window" + data-l10n-attrs="title, style" buttons="accept,cancel,help" persist="lastSelected screenX screenY" role="dialog" onbeforeaccept="return gConnectionsDialog.beforeAccept();" onload="gConnectionsDialog.checkForSystemProxy();" helpTopic="prefs-connection-settings" - ondialoghelp="openPrefsHelp()" + ondialoghelp="openPrefsHelp()"> -#ifdef XP_MACOSX - style="width: &window.macWidth2; !important;"> -#else - style="width: &window.width2; !important;"> -#endif + <link rel="localization" href="browser/preferences/connection.ftl"/> + <script type="application/javascript" src="chrome://global/content/l10n.js"></script> <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/> <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/> <script type="application/javascript" src="chrome://browser/content/preferences/in-content/extensionControlled.js"/> <keyset> - <key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/> + <key data-l10n-id="connection-close-key" modifiers="accel" oncommand="Preferences.close(event)"/> </keyset> <vbox id="ConnectionsDialogPane" class="prefpane largeDialogContainer"> <stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/> <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/> <script type="application/javascript" src="chrome://browser/content/preferences/connection.js"/> <hbox id="proxyExtensionContent" align="top" hidden="true"> <description control="disableProxyExtension" flex="1" /> <button id="disableProxyExtension" class="extension-controlled-button accessory-button" - label="&disableExtension.label;" /> + data-l10n-id="connection-disable-extension" /> </hbox> <groupbox> - <caption><label>&proxyTitle.label2;</label></caption> + <caption><label data-l10n-id="connection-proxy-configure" /></caption> <radiogroup id="networkProxyType" preference="network.proxy.type" onsyncfrompreference="return gConnectionsDialog.readProxyType();"> - <radio value="0" label="&noProxyTypeRadio.label;" accesskey="&noProxyTypeRadio.accesskey;"/> - <radio value="4" label="&WPADTypeRadio.label;" accesskey="&WPADTypeRadio.accesskey;"/> - <radio value="5" label="&systemTypeRadio.label;" accesskey="&systemTypeRadio.accesskey;" id="systemPref" hidden="true"/> - <radio value="1" label="&manualTypeRadio2.label;" accesskey="&manualTypeRadio2.accesskey;"/> + <radio value="0" data-l10n-id="connection-proxy-option-no" /> + <radio value="4" data-l10n-id="connection-proxy-option-system" /> + <radio value="5" data-l10n-id="connection-proxy-option-auto" id="systemPref" hidden="true" /> + <radio value="1" data-l10n-id="connection-proxy-option-manual"/> <grid class="indent" flex="1"> <columns> <column/> <column flex="1"/> </columns> <rows> <row align="center"> <hbox pack="end"> - <label accesskey="&http2.accesskey;" control="networkProxyHTTP">&http2.label;</label> + <label data-l10n-id="connection-proxy-http" control="networkProxyHTTP" /> </hbox> <hbox align="center"> <textbox id="networkProxyHTTP" flex="1" preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/> - <label accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port">&port2.label;</label> + <label data-l10n-id="connection-proxy-http-port" control="networkProxyHTTP_Port" /> <textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true" preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/> </hbox> </row> <row> <hbox/> <hbox> - <checkbox id="shareAllProxies" label="&shareproxy.label;" accesskey="&shareproxy.accesskey;" + <checkbox id="shareAllProxies" data-l10n-id="connection-proxy-http-share" preference="network.proxy.share_proxy_settings" onsyncfrompreference="return gConnectionsDialog.updateProtocolPrefs();"/> </hbox> </row> <row align="center"> <hbox pack="end"> - <label accesskey="&ssl2.accesskey;" control="networkProxySSL">&ssl2.label;</label> + <label data-l10n-id="connection-proxy-ssl" control="networkProxySSL"/> </hbox> <hbox align="center"> <textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/> - <label accesskey="&SSLport.accesskey;" control="networkProxySSL_Port">&port2.label;</label> + <label data-l10n-id="connection-proxy-ssl-port" control="networkProxySSL_Port" /> <textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port" hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/> </hbox> </row> <row align="center"> <hbox pack="end"> - <label accesskey="&ftp2.accesskey;" control="networkProxyFTP">&ftp2.label;</label> + <label data-l10n-id="connection-proxy-ftp" control="networkProxyFTP"/> </hbox> <hbox align="center"> <textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/> - <label accesskey="&FTPport.accesskey;" control="networkProxyFTP_Port">&port2.label;</label> + <label data-l10n-id="connection-proxy-ftp-port" control="networkProxyFTP_Port"/> <textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port" hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/> </hbox> </row> <row align="center"> <hbox pack="end"> - <label accesskey="&socks2.accesskey;" control="networkProxySOCKS">&socks2.label;</label> + <label data-l10n-id="connection-proxy-socks" control="networkProxySOCKS"/> </hbox> <hbox align="center"> <textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/> - <label accesskey="&SOCKSport.accesskey;" control="networkProxySOCKS_Port">&port2.label;</label> + <label data-l10n-id="connection-proxy-socks-port" control="networkProxySOCKS_Port"/> <textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port" hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/> </hbox> </row> <row> <spacer/> <box pack="start"> <radiogroup id="networkProxySOCKSVersion" orient="horizontal" preference="network.proxy.socks_version"> - <radio id="networkProxySOCKSVersion4" value="4" label="&socks4.label;" accesskey="&socks4.accesskey;" /> - <radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;" /> + <radio id="networkProxySOCKSVersion4" value="4" data-l10n-id="connection-proxy-socks4" /> + <radio id="networkProxySOCKSVersion5" value="5" data-l10n-id="connection-proxy-socks5" /> </radiogroup> </box> </row> - <label accesskey="&noproxy2.accesskey;" control="networkProxyNone">&noproxy2.label;</label> + <label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/> <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/> - <label control="networkProxyNone">&noproxyExplain.label;</label> + <label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" /> </rows> </grid> - <radio value="2" label="&autoTypeRadio2.label;" accesskey="&autoTypeRadio2.accesskey;"/> + <radio value="2" data-l10n-id="connection-proxy-autotype" /> <hbox class="indent" flex="1" align="center"> <textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url" oninput="gConnectionsDialog.updateReloadButton();"/> <button id="autoReload" icon="refresh" - label="&reload.label;" accesskey="&reload.accesskey;" + data-l10n-id="connection-proxy-reload" oncommand="gConnectionsDialog.reloadPAC();" preference="pref.advanced.proxies.disable_button.reload"/> </hbox> </radiogroup> </groupbox> <separator class="thin"/> <checkbox id="autologinProxy" - label="&autologinproxy.label;" - accesskey="&autologinproxy.accesskey;" - preference="signon.autologin.proxy" - tooltiptext="&autologinproxy.tooltip;"/> - <checkbox id="networkProxySOCKSRemoteDNS" preference="network.proxy.socks_remote_dns" label="&socksRemoteDNS.label2;" accesskey="&socksRemoteDNS.accesskey;" /> + data-l10n-id="connection-proxy-autologin" + preference="signon.autologin.proxy" /> + <checkbox id="networkProxySOCKSRemoteDNS" + preference="network.proxy.socks_remote_dns" + data-l10n-id="connection-proxy-socks-remote-dns" /> <separator/> </vbox> </dialog>
--- a/browser/components/preferences/in-content/main.xul +++ b/browser/components/preferences/in-content/main.xul @@ -671,30 +671,32 @@ </hbox> <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. --> <hbox> <button id="connectionSettings" class="accessory-button" icon="network" data-l10n-id="network-proxy-connection-settings" - searchkeywords="&connectionsDialog.title; - &noProxyTypeRadio.label; - &WPADTypeRadio.label; - &systemTypeRadio.label; - &manualTypeRadio2.label; - &http2.label; - &ssl2.label; - &ftp2.label; - &port2.label; - &socks2.label; - &socks4.label; - &socks5.label; - &noproxy2.label; - &noproxyExplain.label; - &shareproxy.label; - &autoTypeRadio2.label; - &reload.label; - &autologinproxy.label; - &socksRemoteDNS.label2;"/> + search-l10n-ids=" + connection-window.title, + connection-proxy-option-no.label, + connection-proxy-option-auto.label, + connection-proxy-option-system.label, + connection-proxy-option-manual.label, + connection-proxy-http, + connection-proxy-ssl, + connection-proxy-ftp, + connection-proxy-http-port, + connection-proxy-socks, + connection-proxy-socks4, + connection-proxy-socks5, + connection-proxy-noproxy, + connection-proxy-noproxy-desc, + connection-proxy-http-share.label, + connection-proxy-autotype.label, + connection-proxy-reload.label, + connection-proxy-autologin.label, + connection-proxy-socks-remote-dns.label + " /> </hbox> </hbox> </groupbox>
--- a/browser/components/preferences/in-content/preferences.xul +++ b/browser/components/preferences/in-content/preferences.xul @@ -22,44 +22,40 @@ "chrome://browser/locale/preferences/selectBookmark.dtd"> <!ENTITY % languagesDTD SYSTEM "chrome://browser/locale/preferences/languages.dtd"> <!ENTITY % fontDTD SYSTEM "chrome://browser/locale/preferences/fonts.dtd"> <!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd"> <!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd"> <!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd"> <!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd"> <!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd"> -<!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd"> <!ENTITY % siteDataSettingsDTD SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" > <!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd"> <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd"> <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd"> <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd"> -<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd"> <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd"> <!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd"> <!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" > %aboutDialogDTD; %brandDTD; %selectBookmarkDTD; %languagesDTD; %fontDTD; %permissionsDTD; %passwordManagerDTD; %historyDTD; %certManagerDTD; %deviceManangerDTD; -%connectionDTD; %siteDataSettingsDTD; %privacyDTD; %syncBrandDTD; %syncDTD; %sanitizeDTD; -%mainDTD; %aboutHomeDTD; %contentDTD; ]> #ifdef XP_WIN #define USE_WIN_TITLE_STYLE #endif @@ -72,16 +68,17 @@ <link rel="localization" href="branding/brand.ftl"/> <link rel="localization" href="browser/branding/sync-brand.ftl"/> <link rel="localization" href="browser/preferences/preferences.ftl"/> <!-- Links below are only used for search-l10n-ids into subdialogs --> <link rel="localization" href="browser/preferences/blocklists.ftl"/> <link rel="localization" href="browser/preferences/clearSiteData.ftl"/> <link rel="localization" href="browser/preferences/colors.ftl"/> + <link rel="localization" href="browser/preferences/connection.ftl"/> <script type="text/javascript" src="chrome://global/content/l10n.js"></script> <html:link rel="shortcut icon" href="chrome://browser/skin/settings.svg"/> <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
--- a/browser/components/preferences/jar.mn +++ b/browser/components/preferences/jar.mn @@ -7,17 +7,17 @@ browser.jar: content/browser/preferences/applicationManager.js content/browser/preferences/blocklists.xul content/browser/preferences/blocklists.js content/browser/preferences/clearSiteData.css content/browser/preferences/clearSiteData.js content/browser/preferences/clearSiteData.xul * content/browser/preferences/colors.xul content/browser/preferences/colors.js -* content/browser/preferences/connection.xul + content/browser/preferences/connection.xul content/browser/preferences/connection.js content/browser/preferences/fonts.xul content/browser/preferences/fonts.js content/browser/preferences/handlers.xml content/browser/preferences/handlers.css content/browser/preferences/languages.xul content/browser/preferences/languages.js content/browser/preferences/permissions.xul
new file mode 100644 --- /dev/null +++ b/browser/locales/en-US/browser/preferences/connection.ftl @@ -0,0 +1,83 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +connection-window = + .title = Connection Settings + .style = + { PLATFORM() -> + [macos] width: 44em + *[other] width: 49em + } + +connection-close-key = + .key = w + +connection-disable-extension = + .label = Disable Extension + +connection-proxy-configure = Configure Proxy Access to the Internet + +connection-proxy-option-no = + .label = No proxy + .accesskey = y +connection-proxy-option-system = + .label = Use system proxy settings + .accesskey = U +connection-proxy-option-auto = + .label = Auto-detect proxy settings for this network + .accesskey = w +connection-proxy-option-manual = + .label = Manual proxy configuration + .accesskey = M + +connection-proxy-http = HTTP Proxy + .accesskey = x +connection-proxy-http-port = Port + .accesskey = P +connection-proxy-http-share = + .label = Use this proxy server for all protocols + .accesskey = s + +connection-proxy-ssl = SSL Proxy + .accesskey = L +connection-proxy-ssl-port = Port + .accesskey = o + +connection-proxy-ftp = FTP Proxy + .accesskey = F +connection-proxy-ftp-port = Port + .accesskey = r + +connection-proxy-socks = SOCKS Host + .accesskey = C +connection-proxy-socks-port = Port + .accesskey = t + +connection-proxy-socks4 = + .label = SOCKS v4 + .accesskey = K +connection-proxy-socks5 = + .label = SOCKS v5 + .accesskey = v +connection-proxy-noproxy = No Proxy for + .accesskey = N + +connection-proxy-noproxy-desc = Example: .mozilla.org, .net.nz, 192.168.1.0/24 + +connection-proxy-autotype = + .label = Automatic proxy configuration URL + .accesskey = A + +connection-proxy-reload = + .label = Reload + .accesskey = e + +connection-proxy-autologin = + .label = Do not prompt for authentication if password is saved + .accesskey = i + .tooltip = This option silently authenticates you to proxies when you have saved credentials for them. You will be prompted if authentication fails. + +connection-proxy-socks-remote-dns = + .label = Proxy DNS when using SOCKS v5 + .accesskey = D
deleted file mode 100644 --- a/browser/locales/en-US/chrome/browser/preferences/connection.dtd +++ /dev/null @@ -1,49 +0,0 @@ -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - 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/. --> - - -<!ENTITY connectionsDialog.title "Connection Settings"> -<!ENTITY window.width2 "49em"> -<!ENTITY window.macWidth2 "44em"> - -<!ENTITY proxyTitle.label2 "Configure Proxy Access to the Internet"> -<!ENTITY noProxyTypeRadio.label "No proxy"> -<!ENTITY noProxyTypeRadio.accesskey "y"> -<!ENTITY systemTypeRadio.label "Use system proxy settings"> -<!ENTITY systemTypeRadio.accesskey "u"> -<!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network"> -<!ENTITY WPADTypeRadio.accesskey "w"> -<!ENTITY manualTypeRadio2.label "Manual proxy configuration"> -<!ENTITY manualTypeRadio2.accesskey "m"> -<!ENTITY autoTypeRadio2.label "Automatic proxy configuration URL"> -<!ENTITY autoTypeRadio2.accesskey "A"> -<!ENTITY reload.label "Reload"> -<!ENTITY reload.accesskey "e"> -<!ENTITY ftp2.label "FTP Proxy"> -<!ENTITY ftp2.accesskey "F"> -<!ENTITY http2.label "HTTP Proxy"> -<!ENTITY http2.accesskey "x"> -<!ENTITY ssl2.label "SSL Proxy"> -<!ENTITY ssl2.accesskey "L"> -<!ENTITY socks2.label "SOCKS Host"> -<!ENTITY socks2.accesskey "C"> -<!ENTITY socks4.label "SOCKS v4"> -<!ENTITY socks4.accesskey "K"> -<!ENTITY socks5.label "SOCKS v5"> -<!ENTITY socks5.accesskey "v"> -<!ENTITY socksRemoteDNS.label2 "Proxy DNS when using SOCKS v5"> -<!ENTITY socksRemoteDNS.accesskey "d"> -<!ENTITY port2.label "Port"> -<!ENTITY HTTPport.accesskey "P"> -<!ENTITY SSLport.accesskey "o"> -<!ENTITY FTPport.accesskey "r"> -<!ENTITY SOCKSport.accesskey "t"> -<!ENTITY noproxy2.label "No Proxy for"> -<!ENTITY noproxy2.accesskey "n"> -<!ENTITY noproxyExplain.label "Example: .mozilla.org, .net.nz, 192.168.1.0/24"> -<!ENTITY shareproxy.label "Use this proxy server for all protocols"> -<!ENTITY shareproxy.accesskey "s"> -<!ENTITY autologinproxy.label "Do not prompt for authentication if password is saved"> -<!ENTITY autologinproxy.accesskey "i"> -<!ENTITY autologinproxy.tooltip "This option silently authenticates you to proxies when you have saved credentials for them. You will be prompted if authentication fails.">
deleted file mode 100644 --- a/browser/locales/en-US/chrome/browser/preferences/main.dtd +++ /dev/null @@ -1,1 +0,0 @@ -<!ENTITY disableExtension.label "Disable Extension">
--- a/browser/locales/jar.mn +++ b/browser/locales/jar.mn @@ -51,21 +51,19 @@ locale/browser/safebrowsing/phishing-afterload-warning-message.dtd (%chrome/browser/safebrowsing/phishing-afterload-warning-message.dtd) locale/browser/safebrowsing/report-phishing.dtd (%chrome/browser/safebrowsing/report-phishing.dtd) locale/browser/safebrowsing/safebrowsing.properties (%chrome/browser/safebrowsing/safebrowsing.properties) locale/browser/feeds/subscribe.dtd (%chrome/browser/feeds/subscribe.dtd) locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties) locale/browser/migration/migration.dtd (%chrome/browser/migration/migration.dtd) locale/browser/migration/migration.properties (%chrome/browser/migration/migration.properties) locale/browser/preferences/clearSiteData.properties (%chrome/browser/preferences/clearSiteData.properties) - locale/browser/preferences/connection.dtd (%chrome/browser/preferences/connection.dtd) locale/browser/preferences/content.dtd (%chrome/browser/preferences/content.dtd) locale/browser/preferences/fonts.dtd (%chrome/browser/preferences/fonts.dtd) locale/browser/preferences/languages.dtd (%chrome/browser/preferences/languages.dtd) - locale/browser/preferences/main.dtd (%chrome/browser/preferences/main.dtd) locale/browser/preferences/permissions.dtd (%chrome/browser/preferences/permissions.dtd) locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties) locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd) locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd) locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd) locale/browser/preferences/siteDataSettings.dtd (%chrome/browser/preferences/siteDataSettings.dtd) locale/browser/preferences/sync.dtd (%chrome/browser/preferences/sync.dtd) locale/browser/preferences/translation.dtd (%chrome/browser/preferences/translation.dtd)
new file mode 100644 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1451992_preferences_connection.py @@ -0,0 +1,467 @@ +# 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 MESSAGE_REFERENCE +from fluent.migrate import COPY, CONCAT, REPLACE + +def migrate(ctx): + """Bug 1451992 - Migrate Preferences::Subdialogs::Connection to Fluent, part {index}.""" + + ctx.add_transforms( + 'browser/browser/preferences/connection.ftl', + 'browser/browser/preferences/connection.ftl', + [ + FTL.Message( + id=FTL.Identifier('connection-window'), + attributes=[ + FTL.Attribute( + FTL.Identifier('title'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'connectionsDialog.title' + ) + ), + FTL.Attribute( + FTL.Identifier('style'), + FTL.Pattern( + elements=[ + FTL.Placeable( + expression=FTL.SelectExpression( + expression=FTL.CallExpression( + callee=FTL.Function('PLATFORM') + ), + variants=[ + FTL.Variant( + key=FTL.VariantName('macos'), + default=False, + value=CONCAT( + FTL.TextElement('width: '), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'window.macWidth2' + ) + ) + ), + FTL.Variant( + key=FTL.VariantName('other'), + default=True, + value=CONCAT( + FTL.TextElement('width: '), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'window.width2' + ) + ) + ) + ] + ) + ) + ] + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-close-key'), + attributes=[ + FTL.Attribute( + FTL.Identifier('key'), + COPY( + 'toolkit/chrome/global/preferences.dtd', + 'windowClose.key' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-disable-extension'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/main.dtd', + 'disableExtension.label' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-configure'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'proxyTitle.label2' + ) + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-option-no'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'noProxyTypeRadio.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'noProxyTypeRadio.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-option-system'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'systemTypeRadio.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'systemTypeRadio.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-option-auto'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'WPADTypeRadio.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'WPADTypeRadio.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-option-manual'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'manualTypeRadio2.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'manualTypeRadio2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-http'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'http2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'http2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-http-port'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'port2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'HTTPport.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-http-share'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'shareproxy.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'shareproxy.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-ssl'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'ssl2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'ssl2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-ssl-port'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'port2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'SSLport.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-ftp'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'ftp2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'ftp2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-ftp-port'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'port2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'FTPport.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-socks'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-socks-port'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'port2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'SOCKSport.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-socks4'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks4.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks4.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-socks5'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks5.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socks5.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-noproxy'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'noproxy2.label' + ), + attributes=[ + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'noproxy2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-noproxy-desc'), + value=COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'noproxyExplain.label' + ) + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-autotype'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'autoTypeRadio2.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'autoTypeRadio2.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-reload'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'reload.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'reload.accesskey' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-autologin'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'autologinproxy.label' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'autologinproxy.accesskey' + ) + ), + FTL.Attribute( + FTL.Identifier('tooltip'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'autologinproxy.tooltip' + ) + ) + ] + ), + FTL.Message( + id=FTL.Identifier('connection-proxy-socks-remote-dns'), + attributes=[ + FTL.Attribute( + FTL.Identifier('label'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socksRemoteDNS.label2' + ) + ), + FTL.Attribute( + FTL.Identifier('accesskey'), + COPY( + 'browser/chrome/browser/preferences/connection.dtd', + 'socksRemoteDNS.accesskey' + ) + ) + ] + ) + ] + )