Name Description Size
docs 3
DocumentL10n.cpp 18237
DocumentL10n.h This class maintains localization status of the document. The document will initialize it lazily when a link with a localization resource is added to the document. Once initialized, DocumentL10n relays all API methods to an instance of mozIDOMLocalization and maintains a single promise which gets resolved the first time the document gets translated. 4607
DOMLocalization.jsm Based on fluent-dom@fa25466f (October 12, 2018) 14239
fluent.js.patch 51137
Fluent.jsm fluent@0.12.0 35775
FluentSyntax.jsm fluent-syntax@0.12.0 45146
L10nRegistry.jsm L10nRegistry is a localization resource management system for Gecko. It manages the list of resource sources provided with the app and allows for additional sources to be added and updated. It's primary purpose is to allow for building an iterator over FluentBundle objects that will be utilized by a localization API. The generator creates all possible permutations of locales and sources to allow for complete fallbacking. Example: FileSource1: name: 'app' locales: ['en-US', 'de'] resources: [ '/browser/menu.ftl', '/platform/toolkit.ftl', ] FileSource2: name: 'platform' locales: ['en-US', 'de'] resources: [ '/platform/toolkit.ftl', ] If the user will request: L10nRegistry.generateBundles(['de', 'en-US'], [ '/browser/menu.ftl', '/platform/toolkit.ftl' ]); the generator will return an async iterator over the following contexts: { locale: 'de', resources: [ ['app', '/browser/menu.ftl'], ['app', '/platform/toolkit.ftl'], ] }, { locale: 'de', resources: [ ['app', '/browser/menu.ftl'], ['platform', '/platform/toolkit.ftl'], ] }, { locale: 'en-US', resources: [ ['app', '/browser/menu.ftl'], ['app', '/platform/toolkit.ftl'], ] }, { locale: 'en-US', resources: [ ['app', '/browser/menu.ftl'], ['platform', '/platform/toolkit.ftl'], ] } This allows the localization API to consume the FluentBundle and lazily fallback on the next in case of a missing string or error. If during the life-cycle of the app a new source is added, the generator can be called again and will produce a new set of permutations placing the language pack provided resources at the top. Notice: L10nRegistry is primarily an asynchronous API, but it does provide a synchronous version of it's main method for use by the `LocalizationSync` class. This API should be only used in very specialized cases and the uses should be reviewed by the toolkit owner/peer. 23781
Localization.jsm fluent-dom@fa25466f (October 12, 2018) 17863 924
mozIDOMLocalization.idl 1210
README The content of this directory is partially sourced from the fluent.js project. 626
test 14