Search completed in 1.25 seconds.
nsIStringBundleService
to access this service, use: var string
bundleservice = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistring
bundleservice); method overview nsistringbundle createbundle(in string aurlspec); nsistringbundle createextensiblebundle(in string aregistrykey); void flush
bundles(); wstring formatstatusmessage(in nsresult astatus, in wstring astatusarg); methods createbundle() nsistringbundle createbundle( in str...
... flush
bundles() flushes the string bundle cache - useful when the locale changes or when we need to get some extra memory back.
... (automatically called for the memory-pressure and chrome-flush-caches global observer topics.) void flush
bundles(); parameters none.
...And 2 more matches
Custom app bundles for Mac OS X - Archive of obsolete content
mac os x applications are typically packaged as application
bundles which are then distributed in .dmg (disk image) files.
... application bundle layout application
bundles are essentially just directory structures that conform to a standard layout and naming convention.
... top-level directory info.plist pkginfo see also xulrunner - tips xulrunner - mac faq external links inside application
bundles property list key reference xrtemplate ...
Index - Archive of obsolete content
rdf a multiple item package provides the ability to package multiple installable
bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
... 612
bundles prism in addition to passing simple command line parameters, prism can use a zipped bundle package to install a webapp.
...string
bundles should be placed inside a string
bundleset element.
...And 3 more matches
Getting started with Svelte - Learn web development
the outcome of this approach is not only smaller application
bundles and better performance, but also a developer experience that is more approachable for people that have limited experience of the modern tooling ecosystem.
...initially it's just an empty html5 page that loads the css files and js
bundles generated by svelte.
... this is a much smaller footprint than compiled
bundles from other frameworks.
... take into account that, in the case of code
bundles, it's not just the size of the files you have to download that matter.
Access StringBundle from Overlay
string
bundles are handy for localizing your project by removing all of your strings into a separate, easy to access text file.
... unfortunately adding the
bundles into thunderbird isn't as easy as adding them to your xul overlay.
... the most efficient way to append these strings is by attaching them to an existing string
bundleset as such: <string
bundleset id="string
bundleset"> <stringbundle src="chrome://your_extension/locale/overlay.properties" id="your-extension-strings" /> </string
bundleset> now that your stringbundle is attached you can access it from javascript as follows: var str = document.getelementbyid("your-extension-strings"); //get the stringbundle object itself str.getstring("propertyname"); //get a string (and do something with it) alternative way let string
bundleservice = cc["@mozilla.org/intl/stringbundle;1"].getservice(ci.nsistring
bundleservice); let bundle = string
bundleservice.createbundle("chrome://your_extension/locale/overlay.properties"); let str = bundle.get...
...stringfromname("propertyname"); see nsistring
bundleservice ...
Multiple item extension packaging - Archive of obsolete content
a multiple item package provides the ability to package multiple installable
bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
... when specifying em:targetapplication the minversion specified should be the highest minversion and the maxversion specified should be the lowest maxversion from all of the installable
bundles contained by the multiple item package for the em:targetapplication.
... structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome regist...
The Essentials of an Extension - Archive of obsolete content
helloitem.setattribute("label", somestringbundle.getstring("xulschoolhello.hello2.label")); this is the reason dtd strings are not a solution for all localization cases, and the reason we often need to include string
bundles in xul files: <string
bundleset id="string
bundleset"> <stringbundle id="xulschoolhello-string-bundle" src="chrome://xulschoolhello/locale/browseroverlay.properties" /> </string
bundleset> the string
bundleset element is just a container for stringbundle elements.
... there should only be one per document, which is the reason why we overlay the string
bundleset that is in browser.xul, hence the very generic id.
... we don't include the insertbefore or insertafter attributes because the ordering of string
bundles doesn't make a difference.
Prism - Archive of obsolete content
in addition to the browser engine included in xulrunner, it consists of: web app bundle management: code for creating new web app
bundles and loading existing
bundles.
... documentation frequently asked questions
bundles a web application bundle is a zip archive that holds a configuration file, icons and an optional webapp js script.
...
bundles can be installed locally, or directly from a website using the prism for firefox extension.
Property Files - Archive of obsolete content
string
bundles you could write the code to read properties yourself, however xul provides the stringbundle element which does this for you.
...<string
bundleset id="string
bundleset"> <stringbundle id="strings" src="strings.properties"/> </string
bundleset> including this element will read the properties from the file 'strings.properties' in the same directory as the xul file.
... use a chrome url to read a file from the locale: <string
bundleset id="string
bundleset"> <stringbundle id="strings" src="chrome://myplugin/locale/strings.properties"/> </string
bundleset> like other non-displayed elements, you should declare all your string
bundles inside a string
bundleset element so that they are all kept together.
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
code splitting is the splitting of code into various
bundles or components which can then be loaded on demand or in parallel.
... as an application grows in complexity or is simply maintained, css and javascripts files or
bundles grow in byte size, especially as the number and size of included third-party libraries increases.
... code splitting is a feature supported by bundlers like webpack and browserify which can create multiple
bundles that can be dynamically loaded at runtime.
Index
alternatively, a string bundle can be created within a javascript context with nsistring
bundleservice.
... 925 nsistringbundleoverride interfaces, interfaces:scriptable, string
bundles, xpcom, xpcom interface reference implemented by: @mozilla.org/intl/stringbundle/text-override;1.
... to create an instance, use: 926 nsistring
bundleservice interfaces, interfaces:scriptable, localization, needscontent, xpcom api reference, xpcom interface reference implemented by: @mozilla.org/intl/stringbundle;1.
Plug-in Basics - Plugins
plug-ins within toolkit
bundles.
... plug-ins within toolkit
bundles.
... example fedora 64bit use: /lib/ --> for 32 bit libs /lib64/ --> for 64 bit libs plug-ins within toolkit
bundles.
Miscellaneous - Archive of obsolete content
using string
bundles from javascript assuming the extension has myext.properties with name/value pairs such as: invalid.url=the speficied url, %s, is invalid.
... these properties can be accessed from javascript in the following manner: var common = { _bundle: components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistring
bundleservice) .createbundle("chrome://myext/locale/myext.properties"), getlocalizedmessage: function(msg) { return this._bundle.getstringfromname(msg); } }; alert(common.getlocalizedmessage("invalid.url")) another similar alternative (using both getstringfromname and formatstringfromname), is: var fcbundle = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistring
bundleservice) .createbundle("chrome://myext/locale/myext.properties"); f...
Index of archived content - Archive of obsolete content
ug-n-hack plug-n-hack get involved plug-n-hack phase1 plug-n-hack phase2 plug-n-hack tools supported plugin architecture porting nspr to unix platforms priority content prism blogposts build bundlelibrary
bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf api rdf datasource how-to reading textual data remote xul remote debugging rsyncing the cvs repository running wind...
... xul explorer xulrunner application update article building xulrunner building xulrunner with python commandline components creating xulrunner apps with the mozilla build system creating a windows inno setup installer for xulrunner applications custom app
bundles for mac os x debugging a xulrunner application deploying xulrunner dialogs in xulrunner getting started with xulrunner how to enable locale switching in a xulrunner application macfaq make your xulrunner app match the system locale opening a link in the default browser specifying startup ch...
Localizing an extension - Archive of obsolete content
string
bundles are created by establishing a property file that maps keys to string values.
...we do this by creating a string bundle, using the following code: <string
bundleset id="string
bundleset"> <stringbundle id="string-bundle" src="chrome://stockwatcher2/locale/stockwatcher2.properties"/> </string
bundleset> this establishes a new string bundle, referenced by the id "string-bundle", whose keys and values are to be loaded from the stockwatcher2.properties file we've already created.
BundleLibrary - Archive of obsolete content
note: these
bundles have not be tested with the latest version of prism and probably won't run.
...
bundles gmail: gmail.webapp google calendar: gcalendar.webapp google docs: gdocs.webapp google groups: groups.webapp google analytics: ganalytics.webapp google reader: greader.webapp facebook: facebook.webapp twitter: twitter.webapp user contributed
bundles gmail w/gtalk: gmail.webapp (note: work with latest version of prism!) 32 online todo lists: zip file with web apps for 32 online todo lists anywhere.fm: anywhere.fm@prism.app.webapp a service that lets you upload your entire music library to their servers and listen from anywhere through a slick flash interface.
Index - Archive of obsolete content
string
bundles should be placed inside a string
bundleset element.
... 1181 string
bundleset xul elements, xul reference a container for stringbundle elements.
XUL Reference - Archive of obsolete content
popup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle string
bundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren tree...
...item tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle string
bundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
Building a Theme - Archive of obsolete content
setting up the development environment themes and extensions are packaged and distributed in zip files or
bundles, with the xpi (pronounced “zippy”) file extension.
...css, xul, and other files are part of "chrome packages" -
bundles of user interface components which are loaded via chrome:// uris.
Package management basics - Learn web development
parcel provides an additional command to generate files that are suited to publication, making
bundles (mentioned earlier) with the build option.
... although the list grows by the month, there are three main offerings for tools that generate
bundles from our source code: webpack, rollup, and parcel.
Application Translation with Mercurial
mozilla-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/firefox/
bundles/ the file is not small, but after initially downloading it, you only need to download the latest changes in the future.
...comm-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/thunderbird/
bundles/ in the next step, we will unpack the source code: open an input shell, e.g.
nsIStringBundle
alternatively, a string bundle can be created within a javascript context with nsistring
bundleservice.
... see also xul:stringbundle xul tutorial:property files nsistring
bundleservice ...
XPI
xpi modules (so called "
bundles") are employed to install a wide variety of software, including plugins, extensions, themes, and thunderbird dictionaries.
... see also
bundles xpinstall creating xpi installer modules ...
Web Performance
analyzing javascript
bundles no doubt, javascript is a big part of modern web development.
...in this guide, we'll show you how to analyze your application's script
bundles, so you know what you're using, as well how to detect if your app contains duplicated scripts between
bundles.
Extension Packaging - Archive of obsolete content
official references for toolkit api structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome regist...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
var gmyextensionbundle = components.classes["@mozilla.org/intl/stringbundle;1"].getservice(components.interfaces.nsistring
bundleservice); var _bundle = gmyextensionbundle.createbundle("chrome://myextension/locale/myextension.properties") you can now use your string substitutes in the .js where they are needed: see examples below if ( password == userpassword ) { oprefs.setboolpref("access.authenticated", true); } else { alert (_bundle.getstringfromname("wrongpassmessage")); function clear() { sure = confirm(_bu...
The Box Model - Archive of obsolete content
one possibility is to use special markup in a locale property so that the link can be easily recognized: xulschoolhello.linkedtext.label = go to <a>our site</a> for more information the syntax is similar to html because it's easier to read this way, but string
bundles won't do anything special with it.
Structure of an installable bundle - Archive of obsolete content
official references for toolkit api structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications ...
Printing from a XUL App - Archive of obsolete content
structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps ...
The Joy of XUL - Archive of obsolete content
xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string
bundles in .properties files).
Creating an Installer - Archive of obsolete content
function donefn ( name , result ){ if (result) alert("an error occured: " + result); } var xpi = new object(); xpi["find files"] = "findfile.xpi"; installtrigger.install(xpi,donefn); the xpi archive note: if you want to create a new xulrunner application, extension, or theme, see
bundles.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
treechildren see tree treecol see tree treecols see tree treeitem see tree treerow see tree elements that do not expose anything to screen readers/have no discovered accessibility issues yet: arrowscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle string
bundleset vbox window elements not processed yet: action binding bindings broadcaster broadcasterset conditions content dialog dialogheader editor listcell member observes preference preferences prefpane prefwindow resizer richlistbox richlistitem resizer rule scrollbar scrollbox scrollcorner separator template textnode titlebar toolbar toolbarbutton toolbargrippy ...
elements - Archive of obsolete content
menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcorner separator spacer splitter stack statusbar statusbarpanel stringbundle string
bundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v vbox w window wizard ...
Deploying XULRunner - Archive of obsolete content
runner</string> <key>cfbundlegetinfostring</key> <string>1.0</string> <key>cfbundleiconfile</key> <string>app_icon.icns</string> <key>cfbundleidentifier</key> <string>net.yourcompany.yourapplication</string> <key>cfbundleinfodictionaryversion</key> <string>6.0</string> <key>cfbundlename</key> <string>applicationname</string> <key>cfbundlepackagetype</key> <string>appl</string> <key>cf
bundleshortversionstring</key> <string>1.0</string> <key>cf
bundlesignature</key> <string>????</string> <!--only useful if your app handle urls--> <key>cfbundleurltypes</key> <array> <dict> <key>cfbundleurliconfile</key> <string>app_icon.icns</string> <key>cfbundleurlname</key> <string>yourapp entity</string> <key>cfbundleurlschemes</key> <array> <string>chrome</string...
E4X for templating - Archive of obsolete content
l') { return s.tostring().replace(/"/g, '"').replace(/'/g, '''); } return string(s).replace(/"/g, '"').replace(/'/g, '''); } localization e4x works nicely with a simple utility for localizing strings of a properties file: // localization function $s(msg, args){ //get localized message var strs = cc['@mozilla.org/intl/stringbundle;1'].getservice(ci.nsistring
bundleservice).
Client-side tooling overview - Learn web development
parcel is a particularly clever tool that fits into this category — it can do the above tasks, but also helps to package assets like html, css, and image files into convenient
bundles that you can then go on to deploy, and also adds dependencies for you automatically whenever you try to use them.
Chrome registration
structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome regist...
Old Thunderbird build
it is faster and more efficient to use mercurial
bundles instead the first time you fetch the complete repo.
Simple Instantbird build
it is faster and more efficient to use mercurial
bundles instead the first time you fetch the complete repo.
Error codes returned by Mozilla APIs
ns_base_stream_illegal_args (0x80470004) ns_base_stream_no_converter (0x80470005) ns_base_stream_bad_conversion (0x80470006) this error occurs when the component nsistring
bundleservice has been set with a badly encoded property file.
Services.jsm
ce scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistring
bundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter service vc nsiversioncomparator version comparator service ...
XPCOMUtils.jsm
for example, if an extension named "myextension"
bundles foo.jsm and bar.jsm, and foo.jsm needs to load bar.jsm, it can do so like this: components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.importrelative(this, "bar.jsm"); in other words: importrelative will only work from other code modules (such as jsm files).
Localization and Plurals
downloads.xul: <string
bundleset> <stringbundle id="strings" src="chrome://downloads.properties"/> </string
bundleset> downloads.properties: # localization note (downloadstitlefiles): semi-colon list of plural forms.
Toolkit API
these services include: profile management chrome registration browsing history extension and theme management application update service safe mode printing official references structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications ...
Building the WebLock UI
in addition to dtds, the localization parts of a user interface may also include string
bundles in which strings that are used in the interface javascript can be similarly replaced.
mozilla::services namespace
for example, to obtain a reference to the ioservice: nscomptr<nsiioservice> ioservice = mozilla::services::getioservice(); provided service getters service accessor service interface service name getchromeregistryservice nsichromeregistryservice chrome registry service getioservice nsiioservice io service getobserverservice nsiobserverservice observer service getstring
bundleservice nsistring
bundleservice string bundle service gettoolkitchromeregistryservice nsitoolkitchromeregistry toolkit chrome registry service getxulchromeregistryservice nsixulchromeregistry xul chrome registry service getxuloverlayproviderservice nsixuloverlayprovider xul overlay provider service more services will be added as needed.
nsIErrorService
xpcom/base/nsierrorservice.idlscriptable this is a service that allows nsresult codes to be mapped to string
bundles that can be used to look up error messages.
nsIProcess
note: this function does not work with application
bundles on mac os x, see bug 307463 for details.
nsIStringBundleOverride
to create an instance, use: var string
bundleservice = components.classes["@mozilla.org/intl/stringbundle/text-override;1"] .getservice(components.interfaces.nsistringbundleoverride); note: you should never need to use this service directly.
XPCOM Interface Reference
siselectionprivatensiserversocketnsiserversocketlistenernsiservicemanagernsisessionstartupnsisessionstorensisimpleenumeratornsismsdatabaseservicensismsrequestmanagernsismsservicensisocketprovidernsisocketproviderservicensisockettransportnsisockettransportservicensisoundnsispeculativeconnectnsistackframensistandardurlnsistreamconverternsistreamlistenernsistringbundlensistringbundleoverridensistring
bundleservicensistringenumeratornsistructuredclonecontainernsistylesheetservicensisupportsnsisupports proxiesnsisupportsarraynsisupportscstringnsisupportscharnsisupportsdoublensisupportsfloatnsisupportsidnsisupportsinterfacepointernsisupportsprboolnsisupportsprint16nsisupportsprint32nsisupportsprint64nsisupportsprtimensisupportspruint8nsisupportspruint16nsisupportspruint32nsisupportspruint64nsisupportspr...
XPCOM Interface Reference by grouping
eadervisitor nsiidnservice nsiprotocolhandler nsiprotocolproxycallback nsiprotocolproxyfilter nsiprotocolproxyservice nsiproxyinfo preferences nsiiniparser nsiiniparserfactory nsiprefbranch nsiprefbranch2 nsipreflocalizedstring nsiprefservice nsistringbundle nsistring
bundleservice security cookies nsicookie nsicookie2 nsicookieacceptdialog nsicookieconsent nsicookiemanager nsicookiemanager2 nsicookiepermission nsicookiepromptservice nsicookieservice nsicookiestorage nsisessionstore ...
Using nsISimpleEnumerator
terface(components.interfaces.nsipropertyelement); s += property.key + ' = ' + property.value + ';\n'; } alert(s); example using javascript 1.7 features // creates a generator iterating over enum's values function generatorfromsimpleenumerator(enum, interface) { while (enum.hasmoreelements()) { yield enum.getnext().queryinterface(interface); } } var b = document.getelementbyid("string
bundleset").firstchild var props = generatorfromenumerator(b.strings, components.interfaces.nsipropertyelement); var s = ""; for (let property in props) { s += property.key + ' = ' + property.value + ';\n'; } alert(s); links code based on using_nsipasswordmanager nsisimpleenumerator xul:property:strings ...
Index
75 building a thunderbird extension 2: extension file layout extensions, thunderbird extensions are packaged and distributed in archive files (also known as
bundles), with the xpi (pronounced “zippy”) file extension.
Theme Packaging
structure of an installable bundle: describes the common structure of installable
bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome regist...
Mozilla
xpi modules (so called "
bundles") are employed to install a wide variety of software, including plugins, extensions, themes, and thunderbird dictionaries.