[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] 2 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Mon Jun 5 16:53:21 UTC 2023



Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser


Commits:
f8d0eb2d by Pier Angelo Vendrame at 2023-06-05T18:52:53+02:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

Bug 40552: Improve the description of the modal to provide a bridge
manually.

- - - - -
fc0557ed by Pier Angelo Vendrame at 2023-06-05T18:52:54+02:00
fixup! Add TorStrings module for localization

Bug 40552: New texts for the add a bridge manually modal

- - - - -


5 changed files:

- browser/components/torpreferences/content/provideBridgeDialog.jsm
- browser/components/torpreferences/content/provideBridgeDialog.xhtml
- browser/components/torpreferences/content/torPreferences.css
- browser/modules/TorStrings.jsm
- toolkit/torbutton/chrome/locale/en-US/settings.properties


Changes:

=====================================
browser/components/torpreferences/content/provideBridgeDialog.jsm
=====================================
@@ -17,7 +17,7 @@ class ProvideBridgeDialog {
 
   static get selectors() {
     return {
-      header: "#torPreferences-provideBridge-header",
+      description: "#torPreferences-provideBridge-description",
       textarea: "#torPreferences-provideBridge-textarea",
     };
   }
@@ -25,11 +25,25 @@ class ProvideBridgeDialog {
   _populateXUL(window, aDialog) {
     const selectors = ProvideBridgeDialog.selectors;
 
+    const openHelp = () => {
+      window.top.openTrustedLinkIn(
+        TorStrings.settings.learnMoreBridgesURL,
+        "tab"
+      );
+    };
+
     this._dialog = aDialog;
     const dialogWin = this._dialog.parentElement;
-    dialogWin.setAttribute("title", TorStrings.settings.provideBridgeTitle);
-    this._dialog.querySelector(selectors.header).textContent =
-      TorStrings.settings.provideBridgeHeader;
+    dialogWin.setAttribute("title", TorStrings.settings.provideBridgeTitleAdd);
+    const learnMore = window.document.createXULElement("label");
+    learnMore.className = "learnMore text-link";
+    learnMore.setAttribute("is", "text-link");
+    learnMore.setAttribute("value", TorStrings.settings.learnMore);
+    learnMore.addEventListener("click", openHelp);
+    const descr = this._dialog.querySelector(selectors.description);
+    descr.textContent = "";
+    const pieces = TorStrings.settings.provideBridgeDescription.split("%S");
+    descr.append(pieces[0], learnMore, pieces[1] || "");
     this._textarea = this._dialog.querySelector(selectors.textarea);
     this._textarea.setAttribute(
       "placeholder",
@@ -42,12 +56,7 @@ class ProvideBridgeDialog {
     this._dialog.addEventListener("dialogaccept", e => {
       this.onSubmit(this._textarea.value);
     });
-    this._dialog.addEventListener("dialoghelp", e => {
-      window.top.openTrustedLinkIn(
-        TorStrings.settings.learnMoreBridgesURL,
-        "tab"
-      );
-    });
+    this._dialog.addEventListener("dialoghelp", openHelp);
   }
 
   init(window, aDialog) {


=====================================
browser/components/torpreferences/content/provideBridgeDialog.xhtml
=====================================
@@ -8,7 +8,9 @@
         xmlns:html="http://www.w3.org/1999/xhtml">
 <dialog id="torPreferences-provideBridge-dialog"
         buttons="help,accept,cancel">
-  <html:h3 id="torPreferences-provideBridge-header">​</html:h3>
+  <description>
+    <html:div id="torPreferences-provideBridge-description">​<br/>​</html:div>
+  </description>
   <html:textarea id="torPreferences-provideBridge-textarea" multiline="true" rows="3"/>
   <script type="application/javascript"><![CDATA[
     "use strict";


=====================================
browser/components/torpreferences/content/torPreferences.css
=====================================
@@ -586,8 +586,8 @@ groupbox#torPreferences-bridges-group textarea {
 }
 
 /* Provide bridge dialog */
-#torPreferences-provideBridge-header {
-  margin-top: 8px;
+#torPreferences-provideBridge-textarea {
+  margin-top: 16px;
 }
 
 /* Connection settings dialog */


=====================================
browser/modules/TorStrings.jsm
=====================================
@@ -161,8 +161,9 @@ const Loader = {
       captchaTextboxPlaceholder: "Enter the characters from the image",
       incorrectCaptcha: "The solution is not correct. Please try again.",
       // Provide bridge dialog
-      provideBridgeTitle: "Provide Bridge",
-      provideBridgeHeader: "Enter bridge information from a trusted source",
+      provideBridgeTitleAdd: "Add a Bridge Manually",
+      provideBridgeDescription:
+        "Add a bridge provided by a trusted organization or someone you know. If you don’t have a bridge, you can request one from the Tor Project. %S",
       provideBridgePlaceholder: "type address:port (one per line)",
       // Connection settings dialog
       connectionSettingsDialogTitle: "Connection Settings",


=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -104,8 +104,9 @@ settings.captchaTextboxPlaceholder=Enter the characters from the image
 settings.incorrectCaptcha=The solution is not correct. Please try again.
 
 # Provide bridge dialog
-settings.provideBridgeTitle=Provide Bridge
-settings.provideBridgeHeader=Enter bridge information from a trusted source
+settings.provideBridgeTitleAdd=Add a Bridge Manually
+# Translation note: %S is a Learn more link.
+settings.provideBridgeDescription=Add a bridge provided by a trusted organization or someone you know. If you don’t have a bridge, you can request one from the Tor Project. %S
 settings.provideBridgePlaceholder=type address:port (one per line)
 
 # Connection settings dialog
@@ -129,3 +130,7 @@ settings.allowedPortsPlaceholder=Comma-seperated values
 # Log dialog
 settings.torLogDialogTitle=Tor Logs
 settings.copyLog=Copy Tor Log to Clipboard
+
+# Legacy strings - remove once 12.0 has gone EOL
+settings.provideBridgeTitle=Provide Bridge
+settings.provideBridgeHeader=Enter bridge information from a trusted source



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/014f6414068e3d535a8c8c93910d0e5e01c45bf3...fc0557ed23a4012fe3c978b3d229f917d8d99460

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/014f6414068e3d535a8c8c93910d0e5e01c45bf3...fc0557ed23a4012fe3c978b3d229f917d8d99460
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230605/85deb05b/attachment-0001.htm>


More information about the tor-commits mailing list