From MozillaWiki
Jump to: navigation, search
Please use "Edit with form" above to edit this page.


Jetpack HTML Localization
Stage Development
Status In progress
Release target `
Health OK
Status note `


Product manager Dave Mason
Directly Responsible Individual Alex Poirot
Lead engineer Alex Poirot
Security lead `
Privacy lead `
Localization lead `
Accessibility lead `
QA lead `
UX lead `
Product marketing lead `
Operations lead `
Additional members `

Open issues/risks


Stage 1: Definition

1. Feature overview

As we continue to answer the localization efforts for add-ons created with jetpack we must take a look at the HTML files included or referenced within these add-ons. Currently the Mozilla platform supports the localization of XUL and XHTML via their DTDs and entity references, but there is no support for localizing HTML. In addition, we have answered the localization of strings within jetpack code elements via an l10n module which uses .properties files.

This feature is to complement the work already done for localization by allowing text within HTML files used in jetpack add-ons to be localized.

2. Users & use cases

There are two uses of HTML in jetpack currently: static and dynamic. Static usage is text included in HTML files that are displayed in elements provided by Jetpack. Dynamic usage is when a script is altering existing HTML with page scripts.


The developer creating a new add-on with jetpack who makes use of html files in her add-on adds a property reference within the HTML as such ${foo}. This reference then looks to the .properties file to retrieve the text within the used locale. The locale's processor parser would be responsible for processing the property references and creating the localized text in the proper HTML files to be used in the add-on.

Dynamic The localization of Dynamic HTML in jetpack should work more like the localization of strings in code elements. For the text to be localized, the developer would add her plain-text string like so: alert(_("foo"));

This would be parsed and processed exactly as strings are currently processed in the exiting l10n module in jetpack

A full, detailed proposal can be found on github

3. Dependencies


4. Requirements



1. Dynamic Localization of HTML: processing HTML content with locale-specific plaintext strings that is dynamically inserted into a page.

This feature page covers this:

document.body.appendChild(_("Hello, World!"));

But not this:

document.body.innerHTML = _("



At some point we should tackle the latter case of dynamic localization of HTML containing embedded plaintext strings.

2. Generic Template Processing: this proposal aims, instead, for interoperability with third-party template processors.

Stage 2: Design

5. Functional specification


6. User experience design


Stage 3: Planning

7. Implementation plan


8. Reviews

Security review


Privacy review


Localization review




Quality Assurance review


Operations review


Stage 4: Development

9. Implementation


Stage 5: Release

10. Landing criteria


Feature details

Priority P1
Rank 999
Theme / Goal `
Roadmap Jetpack
Secondary roadmap `
Feature list Jetpack
Project `
Engineering team Jetpack

Team status notes

  status notes
Products ` `
Engineering ` `
Security ` `
Privacy ` `
Localization ` `
Accessibility ` `
Quality assurance ` `
User experience ` `
Product marketing ` `
Operations ` `

A full, detailed proposal can be found on github