[tor-bugs] #23016 [Applications/Tor Browser]: "Print to File" does not create the expected file in non-English locales

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 24 23:45:30 UTC 2017


#23016: "Print to File" does not create the expected file in non-English locales
-------------------------------------------------+-------------------------
 Reporter:  intrigeri                            |          Owner:
                                                 |  pospeselr
     Type:  defect                               |         Status:
                                                 |  needs_information
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  AffectsTails, tbb-7.0-issues, tbb-   |  Actual Points:
  regression, tbb-e10s                           |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by pospeselr):

 Ok, some good progress today.  A couple things to note: this bug *does*
 repro with the javascript.use_us_english_locale setting, but it takes some
 finagling to get that setting to stick (and regardless of what the *real*
 value is, it will always appear as *true* on browser start).  To get it to
 stick you need to toggle it to false, exit the tab and browser and come
 back.  To toggle it back to true, you have to toggle it twice, exit the
 tab and browser and come back.

 So, the reason this is happening is in part due to localization and multi-
 process printing.  In the multi-process case, the 'Web Content' process
 has to enumerate the printers for itself to find the target printer the
 'firefox' process wants us to print to.  To identify said printer, we're
 doing a string compare on the name of the printers GTK is aware of and
 continues on with printing once it finds the name provided by the parent
 'firefox' process.

 The reason why we fail is that with javascript.use_us_english_locale=true
 is that the firefox process names the 'Print to File' printer as 'Print to
 File' whereas gtk has a GTKPrinter named (in the French case) 'Imprimer
 dans un fichier' due to the system's language settings (which explains why
 this bug does not happen in localized tor-browser on an English system).
 In order for printing to work, we have to send down the name GTK is
 expecting.

 Knowing all this should be relatively straight-forward to track down where
 we're not localizing when we should.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23016#comment:27>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list