Name Description Size
docs 4
fluent.js.patch 15306
Fluent.jsm @fluent/bundle@0.14.0 35415
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 `Localization` class when in `sync` state. This API should be only used in very specialized cases and the uses should be reviewed by the toolkit owner/peer. 24653
Localization.cpp Protected 10501
Localization.h Localization API Methods documentation in Localization.webidl 3144
Localization.jsm fluent-dom@fa25466f (October 12, 2018) 19442
moz.build 809
mozILocalization.idl This is an internal XPIDL used to expose a JS based Localization class to be used by its C++ wrapper. Consumers should use the WebIDL Localization API instead of this one. 1340
README The content of this directory is partially sourced from the fluent.js project. 603
test 9