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

Commits:

5 changed files:

Changes:

  • browser/components/torpreferences/content/provideBridgeDialog.jsm
    ... ... @@ -17,7 +17,7 @@ class ProvideBridgeDialog {
    17 17
     
    
    18 18
       static get selectors() {
    
    19 19
         return {
    
    20
    -      header: "#torPreferences-provideBridge-header",
    
    20
    +      description: "#torPreferences-provideBridge-description",
    
    21 21
           textarea: "#torPreferences-provideBridge-textarea",
    
    22 22
         };
    
    23 23
       }
    
    ... ... @@ -25,11 +25,25 @@ class ProvideBridgeDialog {
    25 25
       _populateXUL(window, aDialog) {
    
    26 26
         const selectors = ProvideBridgeDialog.selectors;
    
    27 27
     
    
    28
    +    const openHelp = () => {
    
    29
    +      window.top.openTrustedLinkIn(
    
    30
    +        TorStrings.settings.learnMoreBridgesURL,
    
    31
    +        "tab"
    
    32
    +      );
    
    33
    +    };
    
    34
    +
    
    28 35
         this._dialog = aDialog;
    
    29 36
         const dialogWin = this._dialog.parentElement;
    
    30
    -    dialogWin.setAttribute("title", TorStrings.settings.provideBridgeTitle);
    
    31
    -    this._dialog.querySelector(selectors.header).textContent =
    
    32
    -      TorStrings.settings.provideBridgeHeader;
    
    37
    +    dialogWin.setAttribute("title", TorStrings.settings.provideBridgeTitleAdd);
    
    38
    +    const learnMore = window.document.createXULElement("label");
    
    39
    +    learnMore.className = "learnMore text-link";
    
    40
    +    learnMore.setAttribute("is", "text-link");
    
    41
    +    learnMore.setAttribute("value", TorStrings.settings.learnMore);
    
    42
    +    learnMore.addEventListener("click", openHelp);
    
    43
    +    const descr = this._dialog.querySelector(selectors.description);
    
    44
    +    descr.textContent = "";
    
    45
    +    const pieces = TorStrings.settings.provideBridgeDescription.split("%S");
    
    46
    +    descr.append(pieces[0], learnMore, pieces[1] || "");
    
    33 47
         this._textarea = this._dialog.querySelector(selectors.textarea);
    
    34 48
         this._textarea.setAttribute(
    
    35 49
           "placeholder",
    
    ... ... @@ -42,12 +56,7 @@ class ProvideBridgeDialog {
    42 56
         this._dialog.addEventListener("dialogaccept", e => {
    
    43 57
           this.onSubmit(this._textarea.value);
    
    44 58
         });
    
    45
    -    this._dialog.addEventListener("dialoghelp", e => {
    
    46
    -      window.top.openTrustedLinkIn(
    
    47
    -        TorStrings.settings.learnMoreBridgesURL,
    
    48
    -        "tab"
    
    49
    -      );
    
    50
    -    });
    
    59
    +    this._dialog.addEventListener("dialoghelp", openHelp);
    
    51 60
       }
    
    52 61
     
    
    53 62
       init(window, aDialog) {
    

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

  • browser/components/torpreferences/content/torPreferences.css
    ... ... @@ -586,8 +586,8 @@ groupbox#torPreferences-bridges-group textarea {
    586 586
     }
    
    587 587
     
    
    588 588
     /* Provide bridge dialog */
    
    589
    -#torPreferences-provideBridge-header {
    
    590
    -  margin-top: 8px;
    
    589
    +#torPreferences-provideBridge-textarea {
    
    590
    +  margin-top: 16px;
    
    591 591
     }
    
    592 592
     
    
    593 593
     /* Connection settings dialog */
    

  • browser/modules/TorStrings.jsm
    ... ... @@ -161,8 +161,9 @@ const Loader = {
    161 161
           captchaTextboxPlaceholder: "Enter the characters from the image",
    
    162 162
           incorrectCaptcha: "The solution is not correct. Please try again.",
    
    163 163
           // Provide bridge dialog
    
    164
    -      provideBridgeTitle: "Provide Bridge",
    
    165
    -      provideBridgeHeader: "Enter bridge information from a trusted source",
    
    164
    +      provideBridgeTitleAdd: "Add a Bridge Manually",
    
    165
    +      provideBridgeDescription:
    
    166
    +        "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",
    
    166 167
           provideBridgePlaceholder: "type address:port (one per line)",
    
    167 168
           // Connection settings dialog
    
    168 169
           connectionSettingsDialogTitle: "Connection Settings",
    

  • toolkit/torbutton/chrome/locale/en-US/settings.properties
    ... ... @@ -104,8 +104,9 @@ settings.captchaTextboxPlaceholder=Enter the characters from the image
    104 104
     settings.incorrectCaptcha=The solution is not correct. Please try again.
    
    105 105
     
    
    106 106
     # Provide bridge dialog
    
    107
    -settings.provideBridgeTitle=Provide Bridge
    
    108
    -settings.provideBridgeHeader=Enter bridge information from a trusted source
    
    107
    +settings.provideBridgeTitleAdd=Add a Bridge Manually
    
    108
    +# Translation note: %S is a Learn more link.
    
    109
    +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
    
    109 110
     settings.provideBridgePlaceholder=type address:port (one per line)
    
    110 111
     
    
    111 112
     # Connection settings dialog
    
    ... ... @@ -129,3 +130,7 @@ settings.allowedPortsPlaceholder=Comma-seperated values
    129 130
     # Log dialog
    
    130 131
     settings.torLogDialogTitle=Tor Logs
    
    131 132
     settings.copyLog=Copy Tor Log to Clipboard
    
    133
    +
    
    134
    +# Legacy strings - remove once 12.0 has gone EOL
    
    135
    +settings.provideBridgeTitle=Provide Bridge
    
    136
    +settings.provideBridgeHeader=Enter bridge information from a trusted source