diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2019-03-13 07:49:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 07:49:07 +0100 |
commit | bf0413359245579e9509146d42cd5547e35da695 (patch) | |
tree | 8218d4f60d9eccacbf42df8cb88094a082d401b4 /toolkit/components/webextensions/ext-i18n.js | |
parent | 51b821b3fdc5a7eab2369cb6a6680598a6264b08 (diff) | |
parent | 709bc24e9110eba12f94cfcb8db00a8338ac4098 (diff) | |
download | UXP-bf0413359245579e9509146d42cd5547e35da695.tar UXP-bf0413359245579e9509146d42cd5547e35da695.tar.gz UXP-bf0413359245579e9509146d42cd5547e35da695.tar.lz UXP-bf0413359245579e9509146d42cd5547e35da695.tar.xz UXP-bf0413359245579e9509146d42cd5547e35da695.zip |
Merge pull request #998 from MoonchildProductions/master
Merge master into Sync-weave
Diffstat (limited to 'toolkit/components/webextensions/ext-i18n.js')
-rw-r--r-- | toolkit/components/webextensions/ext-i18n.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/toolkit/components/webextensions/ext-i18n.js b/toolkit/components/webextensions/ext-i18n.js deleted file mode 100644 index bb4bde4bd..000000000 --- a/toolkit/components/webextensions/ext-i18n.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -var {classes: Cc, interfaces: Ci, utils: Cu} = Components; - -Cu.import("resource://gre/modules/ExtensionUtils.jsm"); -var { - detectLanguage, -} = ExtensionUtils; - -function i18nApiFactory(context) { - let {extension} = context; - return { - i18n: { - getMessage: function(messageName, substitutions) { - return extension.localizeMessage(messageName, substitutions, {cloneScope: context.cloneScope}); - }, - - getAcceptLanguages: function() { - let result = extension.localeData.acceptLanguages; - return Promise.resolve(result); - }, - - getUILanguage: function() { - return extension.localeData.uiLocale; - }, - - detectLanguage: function(text) { - return detectLanguage(text); - }, - }, - }; -} -extensions.registerSchemaAPI("i18n", "addon_child", i18nApiFactory); -extensions.registerSchemaAPI("i18n", "content_child", i18nApiFactory); |