[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 4 commits: fixup! Bug 2176: Rebrand Firefox to TorBrowser

richard (@richard) git at gitlab.torproject.org
Mon Mar 18 21:58:55 UTC 2024



richard pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser


Commits:
ce6c08c3 by Henry Wilkes at 2024-03-14T17:44:43+00:00
fixup! Bug 2176: Rebrand Firefox to TorBrowser

Bug 42203: Migrate about dialog strings to Fluent.

- - - - -
ef8821c9 by Henry Wilkes at 2024-03-14T17:44:44+00:00
fixup! Add TorStrings module for localization

Bug 42203: Migrate about dialog strings to Fluent.

- - - - -
eb190fbe by Henry Wilkes at 2024-03-14T17:45:50+00:00
fixup! Tor Browser strings

Bug 42203: Migrate about dialog strings to Fluent.

Also renew the trademark description:

+ Use double-quotes rather than ASCII single quotes.
+ Capitalize "The" and include it as part of the trademark name and the
  corporation name.
+ Add a note to translators to not translate the trademark names. The
  previous translations often translated "Onion Logo" even though it is
  a trademark name.

- - - - -
52233769 by Henry Wilkes at 2024-03-14T17:45:57+00:00
fixup! Tor Browser localization migration scripts.

Bug 42203: Migrate about dialog strings to Fluent.

We do not migrate the trademark description since the en-US string
changed.

- - - - -


5 changed files:

- browser/base/content/aboutDialog.xhtml
- browser/base/content/browser-doctype.inc
- browser/locales/en-US/browser/tor-browser.ftl
- − toolkit/torbutton/chrome/locale/en-US/aboutDialog.dtd
- + tools/torbrowser/l10n/migrations/bug-42203-about-dialog.py


Changes:

=====================================
browser/base/content/aboutDialog.xhtml
=====================================
@@ -9,11 +9,6 @@
 <?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/aboutDialogTor.css" type="text/css"?>
 
-<!-- We need to include the localization DTDs until we migrate to Fluent -->
-<!DOCTYPE window [
-#include browser-doctype.inc
-]>
-
 <window xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="aboutDialog"
@@ -37,6 +32,7 @@
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="browser/aboutDialog.ftl"/>
     <html:link rel="localization" href="browser/base-browser.ftl"/>
+    <html:link rel="localization" href="browser/tor-browser.ftl"/>
   </linkset>
 
   <html:div id="aboutDialogContainer">
@@ -135,35 +131,26 @@
             </description>
           </vbox>
           <!-- Keep communityDesc and contributeDesc to avoid JS errors trying to hide them -->
-          <description class="text-blurb" id="communityDesc" data-l10n-id="community-2" hidden="true"></description>
-          <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus" hidden="true"></description>
-          <description class="text-blurb" id="projectDesc">
-            &project.start;
-            <label is="text-link" href="https://www.torproject.org/">
-              &project.tpoLink;
-            </label>&project.end;
+          <description class="text-blurb" id="communityDesc" hidden="true"></description>
+          <description class="text-blurb" id="contributeDesc" hidden="true"></description>
+          <description class="text-blurb" id="projectDesc" data-l10n-id="about-dialog-tor-project">
+            <label is="text-link" href="https://www.torproject.org/" data-l10n-name="project-link"></label>
           </description>
-          <description class="text-blurb" id="helpDesc">
-            &help.start;
-            <label is="text-link" href="https://donate.torproject.org/">
-              &help.donateLink;
-            </label>
-            &help.or;
-            <label is="text-link" href="https://community.torproject.org/">
-              &help.getInvolvedLink;
-            </label>&help.end;
+          <description class="text-blurb" id="helpDesc" data-l10n-id="about-dialog-help-out">
+            <label is="text-link" href="https://donate.torproject.org/" data-l10n-name="donate-link"></label>
+            <label is="text-link" href="https://community.torproject.org/" data-l10n-name="community-link"></label>
           </description>
         </vbox>
       </vbox>
     </hbox>
     <vbox id="bottomBox">
       <hbox id="newBottom" pack="center" position="1">
-        <label is="text-link" class="bottom-link" href="https://support.torproject.org/">&bottomLinks.questions;</label>
-        <label is="text-link" class="bottom-link" href="https://community.torproject.org/relay/">&bottomLinks.grow;</label>
-        <label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
+        <label is="text-link" class="bottom-link" href="https://support.torproject.org/" data-l10n-id="about-dialog-questions-link"></label>
+        <label is="text-link" class="bottom-link" href="https://community.torproject.org/relay/" data-l10n-id="about-dialog-grow-tor-network-link"></label>
+        <label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="about-dialog-browser-license-link"></label>
       </hbox>
       <description id="trademark" data-l10n-id="trademarkInfo"></description>
-      <description id="trademarkTor">&tor.TrademarkStatement;</description>
+      <description id="trademarkTor" data-l10n-id="about-dialog-trademark-statement"></description>
     </vbox>
   </html:div>
 


=====================================
browser/base/content/browser-doctype.inc
=====================================
@@ -2,5 +2,3 @@
 %brandDTD;
 <!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
 %torbuttonDTD;
-<!ENTITY % aboutDialogDTD SYSTEM "chrome://torbutton/locale/aboutDialog.dtd">
-%aboutDialogDTD;


=====================================
browser/locales/en-US/browser/tor-browser.ftl
=====================================
@@ -304,3 +304,25 @@ user-provide-bridge-dialog-next-button =
 # The "aria-label" should use the same text, but include some ending punctuation to separate it from the sentence that follows. This is used for screen reader users.
 built-in-dialog-current-bridge-label = Current bridge
     .aria-label = Current bridge.
+
+## About Tor Browser dialog.
+
+# '<label data-l10n-name="project-link">' and '</label>' should wrap the link text for the Tor Project, and will link to the Tor Project web page.
+# -brand-short-name refers to 'Tor Browser', localized.
+# -vendor-short-name refers to 'Tor Project', localized.
+about-dialog-tor-project =  { -brand-short-name } is developed by <label data-l10n-name="project-link">the { -vendor-short-name }</label>, a nonprofit working to defend your privacy and freedom online.
+
+# '<label data-l10n-name="donate-link">' and '</label>' should wrap the link text for donating to Tor Project, and will link to the Tor Project donation page.
+# '<label data-l10n-name="community-link">' and '</label>' should wrap the link text for getting involved with Tor Project, and will link to the Tor Project community page.
+about-dialog-help-out = Want to help? <label data-l10n-name="donate-link">Donate</label> or <label data-l10n-name="community-link">get involved</label>!
+
+# Link text for the Tor Project support page.
+about-dialog-questions-link = Questions?
+# Link text for the Tor Project page for Tor Network relay operators.
+about-dialog-grow-tor-network-link = Help the Tor Network Grow!
+# Link text for the Tor Browser license page (about:license).
+about-dialog-browser-license-link = Licensing Information
+
+# "Tor" and "The Onion Logo" are trademark names, so should not be translated (not including the quote marks, which can be localized).
+# "The Tor Project, Inc." is an organisation name.
+about-dialog-trademark-statement = “Tor” and “The Onion Logo” are registered trademarks of The Tor Project, Inc.


=====================================
toolkit/torbutton/chrome/locale/en-US/aboutDialog.dtd deleted
=====================================
@@ -1,24 +0,0 @@
-<!-- Copyright (c) 2022, The Tor Project, Inc.
-   - 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 project.start           "&brandShortName; is developed by ">
-<!-- LOCALIZATION NOTE (project.tpoLink): This is a link title that links to https://www.torproject.org -->
-<!ENTITY project.tpoLink         "the &vendorShortName;">
-<!ENTITY project.end             ", a nonprofit working to defend your privacy and freedom online.">
-
-<!ENTITY help.start              "Want to help? ">
-<!-- LOCALIZATION NOTE (help.donate): This is a link title that links to https://donate.torproject.org/ -->
-<!ENTITY help.donateLink         "Donate">
-<!ENTITY help.or                 " or ">
-<!-- LOCALIZATION NOTE (help.getInvolvedLink): This is a link title that links to https://community.torproject.org/ -->
-<!ENTITY help.getInvolvedLink    "get involved">
-<!ENTITY help.end                "!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://support.torproject.org/ -->
-<!ENTITY bottomLinks.questions   "Questions?">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://community.torproject.org/relay/ -->
-<!ENTITY bottomLinks.grow        "Help the Tor Network Grow!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to about:license -->
-<!ENTITY bottomLinks.license  "Licensing Information">
-<!ENTITY tor.TrademarkStatement   "'Tor' and the 'Onion Logo' are registered trademarks of the Tor Project, Inc.">


=====================================
tools/torbrowser/l10n/migrations/bug-42203-about-dialog.py
=====================================
@@ -0,0 +1,75 @@
+import fluent.syntax.ast as FTL
+from fluent.migrate.helpers import TERM_REFERENCE, transforms_from
+from fluent.migrate.transforms import CONCAT, COPY, REPLACE
+
+
+def migrate(ctx):
+    legacy_path = "aboutDialog.dtd"
+    ctx.add_transforms(
+        "tor-browser.ftl",
+        "tor-browser.ftl",
+        transforms_from(
+            """
+about-dialog-questions-link = { COPY(path, "bottomLinks.questions") }
+about-dialog-grow-tor-network-link = { COPY(path, "bottomLinks.grow") }
+about-dialog-browser-license-link = { COPY(path, "bottomLinks.license") }
+""",
+            path=legacy_path,
+        )
+        + [
+            # Concatenate as
+            #  &project.start;
+            #  <label data-l10n-name="project-link">&project.tpoLink;</a>
+            #  &project.end;
+            #
+            # And replace any occurrence of "&brandShortName;" and
+            # "&vendorShortName;" with "-brand-short-name" and
+            # "-vendor-short-name", wherever they may appear.
+            FTL.Message(
+                id=FTL.Identifier("about-dialog-tor-project"),
+                value=CONCAT(
+                    REPLACE(
+                        legacy_path,
+                        "project.start",
+                        {
+                            "&brandShortName;": TERM_REFERENCE("brand-short-name"),
+                            "&vendorShortName;": TERM_REFERENCE("vendor-short-name"),
+                        },
+                    ),
+                    FTL.TextElement('<label data-l10n-name="project-link">'),
+                    REPLACE(
+                        legacy_path,
+                        "project.tpoLink",
+                        {
+                            "&brandShortName;": TERM_REFERENCE("brand-short-name"),
+                            "&vendorShortName;": TERM_REFERENCE("vendor-short-name"),
+                        },
+                    ),
+                    FTL.TextElement("</label>"),
+                    REPLACE(
+                        legacy_path,
+                        "project.end",
+                        {
+                            "&brandShortName;": TERM_REFERENCE("brand-short-name"),
+                            "&vendorShortName;": TERM_REFERENCE("vendor-short-name"),
+                        },
+                    ),
+                ),
+            ),
+            # Concatenate with two link labels.
+            FTL.Message(
+                id=FTL.Identifier("about-dialog-help-out"),
+                value=CONCAT(
+                    COPY(legacy_path, "help.start"),
+                    FTL.TextElement('<label data-l10n-name="donate-link">'),
+                    COPY(legacy_path, "help.donateLink"),
+                    FTL.TextElement("</label>"),
+                    COPY(legacy_path, "help.or"),
+                    FTL.TextElement('<label data-l10n-name="community-link">'),
+                    COPY(legacy_path, "help.getInvolvedLink"),
+                    FTL.TextElement("</label>"),
+                    COPY(legacy_path, "help.end"),
+                ),
+            ),
+        ],
+    )



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/018c552bf646b23afca9734b448b8172ecaba6f3...52233769c0b98cc8e1d415d6bd26ed893184e7b8

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/018c552bf646b23afca9734b448b8172ecaba6f3...52233769c0b98cc8e1d415d6bd26ed893184e7b8
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/tbb-commits/attachments/20240318/3493488f/attachment-0001.htm>


More information about the tbb-commits mailing list