[tor-bugs] #17248 [Tor Browser]: Investigate new WebExtensions API requirements for our extensions
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Nov 12 15:56:57 UTC 2015
#17248: Investigate new WebExtensions API requirements for our extensions
----------------------------------+--------------------------
Reporter: gk | Owner: tbb-team
Type: task | Status: new
Priority: High | Milestone:
Component: Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: TorBrowserTeam201511 | Actual Points:
Parent ID: | Points:
Sponsor: |
----------------------------------+--------------------------
Comment (by brade):
'''Requirements for which Web Extension APIs have been implemented in
Firefox (D#, aka Done#):'''
D1: Asynchronous communication between code modules
Current Solution: nsIObserverService/nsIObserver
New Solution: chrome.runtime.sendMessage(), chrome.runtime.onMessage()
D2: Get current UI locale (used for language prompt)
Current Solution: nsIXULChromeRegistry.getSelectedLocale("global")
New Solution: Retrieve predefined @@ui_locale message using i18n API,
e.g., let locale = chrome.i18n.getMessage("@@ui_locale"); or use let
language = chrome.i18n.getUILanguage(); (the latter is not yet supported
in Firefox)
D3: Retrieve a localized string
Current Solution:
nsIStringBundle.GetStringFromName()/formatStringFromName()
New Solution: chrome.i18n.getMessage()
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17248#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list