Opened 12 months ago

Closed 11 days ago

Last modified 11 days ago

#28196 closed defect (fixed)

about:preferences#general is not properly translated anymore starting with Tor Browser 8.5a4

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-regression, TorBrowserTeam201910R
Cc: mcs, brade, intrigeri, viktorj, eduaddad, emmapeel, antonela, steph Actual Points:
Parent ID: Points: 0.75
Reviewer: Sponsor:

Description

about:preferences#general contains almost only en-US strings independent of the locale used in Tor Browser 8.5a4. This is likey fallout from #27905.

Child Tickets

Change History (20)

comment:1 Changed 11 months ago by gk

Keywords: TorBrowserTeam201811 added; TorBrowserTeam201810 removed

Moving our tickets to November.

comment:2 Changed 11 months ago by gk

Keywords: tbb-regression added

comment:3 Changed 11 months ago by mcs

So far our investigation shows that .ftl files (Fluent) behave differently than .properties and and .dtd files. Specifically, fallback to en-US does not occur on a per-string basis for strings that are missing from a locale's files. Our patch for #27905 introduced a new .ftl file that just contains one string (-brand-short-name). To fix this ticket we may need to include that file in each language pack. Therefore, it may make sense to revisit this in conjunction with the work for #27466 (although I don't know if that ticket will require unzipping of the language packs).

comment:4 Changed 10 months ago by intrigeri

Cc: intrigeri added

comment:5 Changed 5 months ago by gk

Cc: viktorj added

#30529 is a duplicate.

comment:6 Changed 4 months ago by gk

Cc: eduaddad emmapeel added

#30892 is a duplicate.

comment:7 Changed 3 weeks ago by acat

Status: newneeds_information

In esr68 the situation is worse, since there are more usages of tor-browser-brand.ftl, which means more parts of the UI are not localized.

I looked a bit how Fluent loads the resources, and wanted to suggest the following to solve this issue. We could move tor-browser-brand.ftl to toolkit/torproject/torbutton/chrome/locale/* and localize it there (starting with the English version for all locales we support). Then we can use the L10nRegistry.registerSource to register our own Fluent source so that it finds our tor-browser-brand.ftl and possibly other *.ftl resources in the future (see https://searchfox.org/mozilla-esr68/rev/baaa20d01cd7e63135c29a5f62717f29581f579f/browser/components/BrowserGlue.jsm#1144 or https://searchfox.org/mozilla-esr68/rev/baaa20d01cd7e63135c29a5f62717f29581f579f/toolkit/components/extensions/Extension.jsm#2474). Now tor-browser-brand.ftl is identical for the three brands we support (alpha, nightly, official), so that would simplify things a bit.

Do you think this is an ok plan to solve the issue?

comment:8 in reply to:  7 Changed 3 weeks ago by gk

Replying to acat:

In esr68 the situation is worse, since there are more usages of tor-browser-brand.ftl, which means more parts of the UI are not localized.

I looked a bit how Fluent loads the resources, and wanted to suggest the following to solve this issue. We could move tor-browser-brand.ftl to toolkit/torproject/torbutton/chrome/locale/* and localize it there (starting with the English version for all locales we support). Then we can use the L10nRegistry.registerSource to register our own Fluent source so that it finds our tor-browser-brand.ftl and possibly other *.ftl resources in the future (see https://searchfox.org/mozilla-esr68/rev/baaa20d01cd7e63135c29a5f62717f29581f579f/browser/components/BrowserGlue.jsm#1144 or https://searchfox.org/mozilla-esr68/rev/baaa20d01cd7e63135c29a5f62717f29581f579f/toolkit/components/extensions/Extension.jsm#2474). Now tor-browser-brand.ftl is identical for the three brands we support (alpha, nightly, official), so that would simplify things a bit.

Do you think this is an ok plan to solve the issue?

Yes, thanks!

comment:9 Changed 3 weeks ago by acat

Keywords: TorBrowserTeam201909R11 added; TorBrowserTeam201811 removed
Status: needs_informationneeds_review

Patches for review in https://github.com/acatarineu/tor-browser/commit/28196 and https://github.com/acatarineu/torbutton/commit/28196.

I realized that now we have tor-browser-brand.ftl in many more places than esr60, but this file is not shipped in mobile, which means that some UI is broken right now (not so critical though, some about: pages like about:telemetry or about:rights...). This patch should fix it, but there will be some inconsistencies with branding on mobile.

In mobile/android/branding/nightly/locales/en-US/brand.dtd (similarly in the .properties version) we have:

<!-- 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  brandShortName  "Nightly">
<!ENTITY  brandFullName   "Tor Browser Nightly">
<!-- LOCALIZATION NOTE (brandProductName):
   This brand name can be used in messages where the product name needs to
   remain unchanged across different versions (Nightly, Beta, etc.). -->
<!ENTITY  brandProductName "Tor Browser">
<!ENTITY  vendorShortName "The Tor Project">

<!ENTITY  brandPocket     "">

while on the desktop one we always have "Tor Browser" as brand, for example in browser/branding/nightly/locales/en-US/brand.dtd:

<!-- 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  brandShorterName      "Tor Browser">
<!ENTITY  brandShortName        "Tor Browser">
<!ENTITY  brandFullName         "Tor Browser">
<!-- LOCALIZATION NOTE (brandProductName):
   This brand name can be used in messages where the product name needs to
   remain unchanged across different versions (Nightly, Beta, etc.). -->
<!ENTITY  brandProductName      "Tor Browser">
<!ENTITY  vendorShortName       "Tor Project">
<!ENTITY  trademarkInfo.part1   "Firefox and the Firefox logos are trademarks of the Mozilla Foundation.">

So in mobile after this patch, in places where tor-browser-brand.ftl is used the brand will be Tor Browser, while in some other places in UI it might be Nightly or Alpha. Not sure if this is ok, or we should fix these branding inconsistencies between mobile and desktop.

comment:10 Changed 3 weeks ago by cypherpunks

TorBrowserTeam201909R11->TorBrowserTeam201909R

Not sure if this is ok, or we should fix these branding inconsistencies between mobile and desktop.

and Firefox.

comment:11 Changed 3 weeks ago by gk

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909R11 removed

comment:12 in reply to:  9 Changed 3 weeks ago by gk

Cc: antonela steph added
Status: needs_reviewneeds_information

Replying to acat:

[snip]

So in mobile after this patch, in places where tor-browser-brand.ftl is used the brand will be Tor Browser, while in some other places in UI it might be Nightly or Alpha. Not sure if this is ok, or we should fix these branding inconsistencies between mobile and desktop.

We looked a bit at the branding Mozilla ships and it seems they are using essentially the same branding on desktop and mobile (there is a small difference for the nightly channel but that seems to me more an oversight than an actual intentional decision). I think we should follow Mozilla here, in particular as giving the same branding across platforms seems to be an important goal. So, let's fix the branding inconsistencies while we are at it.

Anto: Steph: what do you think?

comment:13 Changed 3 weeks ago by antonela

I think we should follow Mozilla here, in particular as giving the same branding across platforms seems to be an important goal. So, let's fix the branding inconsistencies while we are at it.

Agreed. I'm not sure about the specifics of trademarkInfo, though. Perhaps, Steph can help us with that.

comment:14 Changed 3 weeks ago by steph

I'm for the alignment as well.
brandProductName Tor Browser
vendorShortName The Tor Project
trademarkInfo.part1 Tor and Tor onion logos are trademarks of The Tor Project, Inc.

comment:15 Changed 2 weeks ago by gk

Keywords: TorBrowserTeam201909 added; TorBrowserTeam201909R removed
Status: needs_informationneeds_revision

Thanks for the input. Let's fix the branding inconsistencies here while we are at it then.

comment:16 Changed 2 weeks ago by gk

See: #27989 as well.

comment:17 in reply to:  14 Changed 2 weeks ago by acat

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: needs_revisionneeds_review

Revised patches in https://github.com/acatarineu/tor-browser/commits/28196+1 (4 commits) and https://github.com/acatarineu/torbutton/commit/28196+1

Replying to steph:

I'm for the alignment as well.
brandProductName Tor Browser
vendorShortName The Tor Project
trademarkInfo.part1 Tor and Tor onion logos are trademarks of The Tor Project, Inc.

I reused tor.TrademarkStatement from torbutton which is very close to the suggested Tor and Tor onion logos are trademarks of The Tor Project, Inc.. And used the en-US one as fallback for locales that do not have that string yet.

comment:18 Changed 13 days ago by pili

Keywords: TorBrowserTeam201910R added; TorBrowserTeam201909R removed

We're now in October, moving September outstanding reviews to October

comment:19 Changed 11 days ago by gk

Resolution: fixed
Status: needs_reviewclosed

Thanks! We are good here (sorry for my stupid questions on #tor-dev, acat). I applied the patches to torbutton's master (commit 2d8ae8086b2fa0ed1c25a741a8bdcc269b290301) and tor-browser's tor-browser-68.1.0esr-9.0-2 (commits 358aee2900917eb945eb2f4d9b350ba40dd6447f, 41edabfde0fc2b9317519530924102238ab02eb1, 4648902eeda584ebe14339ac632ff0ba483e1de2, and d32d150709d2bf24ae329878281f27bddfea2dc5)

comment:20 Changed 11 days ago by acat

Points: 0.75

I didn't see any stupid question :)

Note: See TracTickets for help on using tickets.