[tor-bugs] #26543 [Circumvention/BridgeDB]: Provide a language switcher menu on BridgeDB

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 2 16:33:33 UTC 2019


#26543: Provide a language switcher menu on BridgeDB
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  (none)
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:
Component:  Circumvention/BridgeDB               |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  anti-censorship-roadmap-september,   |  Actual Points:
  s30-o22a3                                      |
Parent ID:  #31279                               |         Points:  3
 Reviewer:  cohosh                               |        Sponsor:
                                                 |  Sponsor30-must
-------------------------------------------------+-------------------------
Changes (by phw):

 * status:  assigned => needs_review
 * reviewer:   => cohosh


Comment:

 Here's a patch that implements a language switcher:
 https://github.com/NullHypothesis/bridgedb/compare/develop...fix/26543

 Here's what it looks like:

 [[Image(switcher.jpg)]]

 The patch makes BridgeDB pass all supported languages in an argument to
 the Mako module (which creates the HTML that's served to the user). Mako
 then uses a for loop to create the language options in the  switcher. The
 language switcher uses the `lang` HTTP GET parameter: you can add
 `?lang=ru` to any BridgeDB page, and make it Russian.

 Some implementation considerations and questions:
 * If a user changes the language, we need to keep track of this change
 somehow; otherwise it's lost when the user navigates to another page. I
 wanted to avoid cookies, so I decided to keep state by passing the
 `?lang=CC` argument from page to page. It's not elegant. Is there a better
 way?
 * The patch supports every language for which there is some kind of
 translation. Some of these languages have few translations. We could only
 show translations that are, say, 80% complete but I figured that even some
 translations are better than none.
 * Each language in the language switcher is translated to the respective
 language, i.e., it says "espaƱol" instead of "spanish". Is this
 reasonable?
 * The patch treats en, en_US, and en_GB as different languages, which
 leads to three (unnecessary?) options in the dropdown menu. Is this
 reasonable? (Note that we cannot just remove any language with a region
 code in it because Chinese only exists as zh_CN, zh_HK, and zh_TW.)

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


More information about the tor-bugs mailing list